Ejemplo n.º 1
0
        public ActivityFeedTabModel GetMainFeedTab(IPublishedContent currentPage, Guid groupId)
        {
            var groupRoom = _contentProvider.GetGroupRoomPage();
            var type      = GetFeedTabType(groupRoom);
            var result    = new ActivityFeedTabModel
            {
                Content  = groupRoom,
                Type     = type,
                IsActive = groupRoom.Id == currentPage.Id,
                Links    = _feedLinkService.GetCreateLinks(type, groupId)
            };

            return(result);
        }
        private List <BreadcrumbItemViewModel> GetGroupBreadcrumbsItems(List <BreadcrumbItemViewModel> items)
        {
            var groupId          = Request.QueryString.GetGroupId();
            var group            = _groupService.Get(groupId.Value);
            var groupRoomPageUrl = _groupContentProvider.GetGroupRoomPage().Url;

            var groupRoomItem = items.Single(item => item.Url.Equals(groupRoomPageUrl));

            groupRoomItem.Name = group.Title;

            var groupRoomItems = items.SkipWhile(item => item != groupRoomItem).Where(item => item.IsClickable);

            foreach (var item in groupRoomItems)
            {
                item.Url = item.Url.AddGroupId(groupId.Value);
            }

            return(items);
        }
Ejemplo n.º 3
0
 public UintraLinkModel GetGroupRoomLink(Guid id)
 {
     return(_contentProvider.GetGroupRoomPage()?.Url.AddGroupId(id)?.ToLinkModel());
 }
Ejemplo n.º 4
0
 public bool IsGroupRoomPage(IPublishedContent currentPage) =>
 _contentProvider.GetGroupRoomPage().IsAncestorOrSelf(currentPage);
Ejemplo n.º 5
0
 public string GetGroupLink(Guid groupId)
 {
     return(_contentProvider.GetGroupRoomPage().Url.AddGroupId(groupId));
 }