private Guid getTagID(TagAddress tagAddress) { Tag tag = tagService.GetTag(tagAddress); if (tag != null) { return(tag.ID); } return(Guid.Empty); }
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 }); }
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); }
public static TagAddress ondblclick(this TagAddress tag, string value) { tag.OnDblClick = value; return(tag); }
public static TagAddress dir(this TagAddress tag, Dir value) { tag.Dir = value; return(tag); }
public static TagAddress xmllang(this TagAddress tag, string value) { tag.XmlLang = value; return(tag); }
public static TagAddress lang(this TagAddress tag, LangCode value) { tag.Lang = value; return(tag); }
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); }
public static TagAddress onmousemove(this TagAddress tag, string value) { tag.OnMouseMove = value; return(tag); }
public static TagAddress onkeyup(this TagAddress tag, string value) { tag.OnKeyUp = value; return(tag); }
public static TagAddress onkeydown(this TagAddress tag, string value) { tag.OnKeyDown = value; return(tag); }
public static TagAddress onkeypress(this TagAddress tag, string value) { tag.OnKeyPress = value; return(tag); }
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 }); }
public Tag GetTag(TagAddress tagAddress) { return(repository.GetTag(tagAddress.TagName)); }
public static TagAddress onmousedown(this TagAddress tag, string value) { tag.OnMouseDown = value; return(tag); }
public static TagAddress onmouseup(this TagAddress tag, string value) { tag.OnMouseUp = value; return(tag); }
public static TagAddress id(this TagAddress tag, string value) { tag.Id = value; return(tag); }
public static TagAddress onmouseout(this TagAddress tag, string value) { tag.OnMouseOut = value; return(tag); }
public static TagAddress @class(this TagAddress tag, string value) { tag.Class = value; return(tag); }
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 }); }
public static TagAddress title(this TagAddress tag, string value) { tag.Title = value; return(tag); }