Ejemplo n.º 1
0
        public void SiteFeedList(
            SiteFeedListHeadFootTemplate head
            , SiteFeedListHeadFootTemplate foot
            , SiteFeedListItemTemplate item)
        {
            FeedCollection feeds = FeedBO.Instance.GetAllSiteFeeds();
            int            total = feeds.Count;
            int            i     = 0;

            AuthUser user        = User.Current;
            int      loginUserID = user.UserID;

            bool canManageSiteFeed = FeedBO.Instance.ManagePermission.Can(user, BackendPermissions.Action.Manage_Feed_SiteFeed);

            head(total > 0, total, canManageSiteFeed);


            float timeDiffrence = UserBO.Instance.GetUserTimeDiffrence(user);

            foreach (Feed feed in feeds)
            {
                string title       = FeedBO.Instance.FormatFeedTitle(loginUserID, timeDiffrence, FeedType.AllUserFeed, feed);
                string description = FeedBO.Instance.FormatFeedDescription(loginUserID, feed);
                item(i++, feed, canManageSiteFeed, canManageSiteFeed, title, description);
            }

            foot(total > 0, total, canManageSiteFeed);
        }
Ejemplo n.º 2
0
        public void SiteFeedList(
             SiteFeedListHeadFootTemplate head
            ,SiteFeedListHeadFootTemplate foot
            ,SiteFeedListItemTemplate item)
        {
            FeedCollection feeds = FeedBO.Instance.GetAllSiteFeeds();
            int total = feeds.Count;
            int i = 0;

            AuthUser user = User.Current;
            int loginUserID = user.UserID;

            bool canManageSiteFeed = FeedBO.Instance.ManagePermission.Can(user, BackendPermissions.Action.Manage_Feed_SiteFeed);
            head(total > 0, total, canManageSiteFeed);


            float timeDiffrence = UserBO.Instance.GetUserTimeDiffrence(user);

            foreach (Feed feed in feeds)
            {
                string title = FeedBO.Instance.FormatFeedTitle(loginUserID, timeDiffrence, FeedType.AllUserFeed, feed);
                string description = FeedBO.Instance.FormatFeedDescription(loginUserID, feed);
                item(i++, feed, canManageSiteFeed, canManageSiteFeed, title, description);
            }

            foot(total > 0, total, canManageSiteFeed);
        }