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

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

            return(Guid.Empty);
        }
Esempio n. 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
            });
        }
Esempio n. 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);
        }
Esempio n. 4
0
 public static TagAddress ondblclick(this TagAddress tag, string value)
 {
     tag.OnDblClick = value; return(tag);
 }
Esempio n. 5
0
 public static TagAddress dir(this TagAddress tag, Dir value)
 {
     tag.Dir = value; return(tag);
 }
Esempio n. 6
0
 public static TagAddress xmllang(this TagAddress tag, string value)
 {
     tag.XmlLang = value; return(tag);
 }
Esempio n. 7
0
 public static TagAddress lang(this TagAddress tag, LangCode value)
 {
     tag.Lang = value; return(tag);
 }
Esempio n. 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);
        }
Esempio n. 9
0
 public static TagAddress onmousemove(this TagAddress tag, string value)
 {
     tag.OnMouseMove = value; return(tag);
 }
Esempio n. 10
0
 public static TagAddress onkeyup(this TagAddress tag, string value)
 {
     tag.OnKeyUp = value; return(tag);
 }
Esempio n. 11
0
 public static TagAddress onkeydown(this TagAddress tag, string value)
 {
     tag.OnKeyDown = value; return(tag);
 }
Esempio n. 12
0
 public static TagAddress onkeypress(this TagAddress tag, string value)
 {
     tag.OnKeyPress = value; return(tag);
 }
Esempio n. 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
            });
        }
Esempio n. 14
0
 public Tag GetTag(TagAddress tagAddress)
 {
     return(repository.GetTag(tagAddress.TagName));
 }
Esempio n. 15
0
 public static TagAddress onmousedown(this TagAddress tag, string value)
 {
     tag.OnMouseDown = value; return(tag);
 }
Esempio n. 16
0
 public static TagAddress onmouseup(this TagAddress tag, string value)
 {
     tag.OnMouseUp = value; return(tag);
 }
Esempio n. 17
0
 public static TagAddress id(this TagAddress tag, string value)
 {
     tag.Id = value; return(tag);
 }
Esempio n. 18
0
 public static TagAddress onmouseout(this TagAddress tag, string value)
 {
     tag.OnMouseOut = value; return(tag);
 }
Esempio n. 19
0
 public static TagAddress @class(this TagAddress tag, string value)
 {
     tag.Class = value; return(tag);
 }
Esempio n. 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
            });
        }
Esempio n. 21
0
 public static TagAddress title(this TagAddress tag, string value)
 {
     tag.Title = value; return(tag);
 }