Example #1
0
        private Guid getTagID(TagAddress tagAddress)
        {
            Tag tag = tagService.GetTag(tagAddress);

            if (tag != null)
            {
                return(tag.ID);
            }

            return(Guid.Empty);
        }
Example #2
0
        public OxiteViewModelItems <Post> ListByTag(int?pageNumber, int pageSize, TagAddress tagAddress)
        {
            int pageIndex             = pageNumber.HasValue ? pageNumber.Value - 1 : 0;
            Tag tag                   = tagService.GetTag(tagAddress);
            IPageOfItems <Post> posts = postService.GetPosts(pageIndex, pageSize, tagAddress);

            if (tag == null || posts.TotalItemCount == 0)
            {
                return(null);
            }

            return(new OxiteViewModelItems <Post>(posts)
            {
                Container = tag
            });
        }
Example #3
0
        public IPageOfItems <Post> GetPosts(int pageIndex, int pageSize, TagAddress tagAddress)
        {
            IPageOfItems <Post> posts =
                cache.GetItems <IPageOfItems <Post>, Post>(
                    string.Format("GetPosts-Tag:{0}", tagAddress.TagName),
                    new CachePartition(pageIndex, pageSize),
                    () => pluginEngine.ProcessDisplayOfPosts(context, () => repository.GetPostsByTag(context.Site.ID, getTagID(tagAddress)).GetPage(pageIndex, pageSize).FillTags(tagService).FillComments(commentService)),
                    p => p.GetDependencies()
                    );

            if (context.RequestDataFormat.IsFeed())
            {
                posts = posts.Since(p => p.Published.Value, context.HttpContext.Request.IfModifiedSince());
            }

            return(posts);
        }
Example #4
0
 public static TagAddress ondblclick(this TagAddress tag, string value)
 {
     tag.OnDblClick = value; return(tag);
 }
Example #5
0
 public static TagAddress dir(this TagAddress tag, Dir value)
 {
     tag.Dir = value; return(tag);
 }
Example #6
0
 public static TagAddress xmllang(this TagAddress tag, string value)
 {
     tag.XmlLang = value; return(tag);
 }
Example #7
0
 public static TagAddress lang(this TagAddress tag, LangCode value)
 {
     tag.Lang = value; return(tag);
 }
Example #8
0
        public OxiteViewModelItems <ScheduleItem> ListByEventAndWorkshops(EventAddress eventAddress, TagAddress tagAddress, ScheduleItemFilterCriteria scheduleItemFilterCriteria)
        {
            Event evnt = eventService.GetEvent(eventAddress);

            if (evnt == null)
            {
                return(null);
            }

            Tag tag = tagService.GetTag(tagAddress);

            if (!string.IsNullOrEmpty(tagAddress.TagName) && tag == null)
            {
                return(null);
            }

            ScheduleItemTag scheduleItemTag = scheduleItemService.GetScheduleItemTag(tagService.GetTag(tagAddress));

            if (!string.IsNullOrEmpty(tagAddress.TagName) && scheduleItemTag == null)
            {
                return(null);
            }
            scheduleItemFilterCriteria.PageSize = 100; //show all workshops on workshop page
            IPageOfItems <ScheduleItem> scheduleItems = scheduleItemService.GetScheduleItemsByTag(eventAddress, scheduleItemTag != null ? scheduleItemTag.ID : Guid.Empty, scheduleItemFilterCriteria);

            SetUserScheduleStatus();

            var model = new OxiteViewModelItems <ScheduleItem>(scheduleItems)
            {
                Container = evnt
            };

            model.AddModelItem(scheduleItemTag);

            return(model);
        }
Example #9
0
 public static TagAddress onmousemove(this TagAddress tag, string value)
 {
     tag.OnMouseMove = value; return(tag);
 }
Example #10
0
 public static TagAddress onkeyup(this TagAddress tag, string value)
 {
     tag.OnKeyUp = value; return(tag);
 }
Example #11
0
 public static TagAddress onkeydown(this TagAddress tag, string value)
 {
     tag.OnKeyDown = value; return(tag);
 }
Example #12
0
 public static TagAddress onkeypress(this TagAddress tag, string value)
 {
     tag.OnKeyPress = value; return(tag);
 }
Example #13
0
        public OxiteViewModelItems <PostComment> ListByTag(int?pageNumber, int pageSize, TagAddress tagAddress)
        {
            int pageIndex = pageNumber.HasValue ? pageNumber.Value - 1 : 0;
            Tag tag       = tagService.GetTag(tagAddress);

            if (tag == null)
            {
                return(null);
            }

            IPageOfItems <PostComment> comments = commentService.GetComments(pageIndex, pageSize, tag);

            return(new OxiteViewModelItems <PostComment>(comments)
            {
                Container = tag
            });
        }
Example #14
0
 public Tag GetTag(TagAddress tagAddress)
 {
     return(repository.GetTag(tagAddress.TagName));
 }
Example #15
0
 public static TagAddress onmousedown(this TagAddress tag, string value)
 {
     tag.OnMouseDown = value; return(tag);
 }
Example #16
0
 public static TagAddress onmouseup(this TagAddress tag, string value)
 {
     tag.OnMouseUp = value; return(tag);
 }
Example #17
0
 public static TagAddress id(this TagAddress tag, string value)
 {
     tag.Id = value; return(tag);
 }
Example #18
0
 public static TagAddress onmouseout(this TagAddress tag, string value)
 {
     tag.OnMouseOut = value; return(tag);
 }
Example #19
0
 public static TagAddress @class(this TagAddress tag, string value)
 {
     tag.Class = value; return(tag);
 }
Example #20
0
        public OxiteViewModelItemItems <ScheduleItemTag, ScheduleItem> ListByEventAndTagAndUser(EventAddress eventAddress, TagAddress tagAddress, ScheduleItemFilterCriteria scheduleItemFilterCriteria)
        {
            Event evnt = eventService.GetEvent(eventAddress);

            if (evnt == null)
            {
                return(null);
            }

            Tag tag = tagService.GetTag(tagAddress);

            if (!string.IsNullOrEmpty(tagAddress.TagName) && tag == null)
            {
                return(null);
            }

            scheduleItemFilterCriteria.ForUser = true;

            ScheduleItemTag scheduleItemTag = scheduleItemService.GetScheduleItemTag(tagService.GetTag(tagAddress));

            if (!string.IsNullOrEmpty(tagAddress.TagName) && scheduleItemTag == null)
            {
                return(null);
            }

            IPageOfItems <ScheduleItem> scheduleItems = scheduleItemService.GetScheduleItemsByTag(eventAddress, scheduleItemTag != null ? scheduleItemTag.ID : Guid.Empty, scheduleItemFilterCriteria);

            SetUserScheduleStatus();

            return(new OxiteViewModelItemItems <ScheduleItemTag, ScheduleItem>(scheduleItemTag, scheduleItems)
            {
                Container = evnt
            });
        }
Example #21
0
 public static TagAddress title(this TagAddress tag, string value)
 {
     tag.Title = value; return(tag);
 }