Exemple #1
0
        public TimelineShortcut GetTimelineShortcut(Timeline timeline)
        {
            string superCollectionPath = "/" + timeline.Collection.SuperCollection.Title;
            string collectionPath      = "/" + timeline.Collection.Path;
            string contentPath         = "#" + GetContentPath(timeline.Collection.Id, timeline.Id, null);

            if (timeline.Collection.Default)
            {
                collectionPath = "";

                if (timeline.Collection.SuperCollection.Title == ConfigurationManager.AppSettings["DefaultSuperCollection"])
                {
                    superCollectionPath = "/";
                }
            }

            var timelineShortcut = new TimelineShortcut()
            {
                Title       = timeline.Title,
                TimelineUrl = superCollectionPath + collectionPath + contentPath,
                Author      = timeline.Collection.User == null ? "" : timeline.Collection.User.DisplayName,
                ImageUrl    = GetTimelineImageUrl(timeline)
            };

            return(timelineShortcut);
        }
Exemple #2
0
        /// <summary>
        /// Get TimelineShortctu from Timeline
        /// </summary>
        /// <param name="timeline">Timeline object</param>
        /// <returns>TimelineShortcut</returns>
        public TimelineShortcut GetTimelineShortcut(Timeline timeline)
        {
            var ts = new TimelineShortcut()
            {
                Title = timeline.Title
            };

            if (timeline.Collection.Title == "Beta Content")
            {
                ts.TimelineUrl = String.Format("/#{0}", GetContentPath(timeline.Collection.Id, timeline.Id, null));
                ts.Author      = "Chronozoom";
            }
            else
            {
                ts.TimelineUrl = String.Format("/{0}/{1}/#{2}", timeline.Collection.User.DisplayName, timeline.Collection.Title, GetContentPath(timeline.Collection.Id, timeline.Id, null));
                ts.Author      = timeline.Collection.User.DisplayName;
            }
            ts.ImageUrl = GetTimelineImageUrl(timeline);
            return(ts);
        }
Exemple #3
0
        /// <summary>
        /// Get TimelineShortctu from Timeline
        /// </summary>
        /// <param name="timeline">Timeline object</param>
        /// <returns>TimelineShortcut</returns>
        public TimelineShortcut GetTimelineShortcut(Timeline timeline)
        {
            var ts = new TimelineShortcut()
            {
                Title = timeline.Title
            };

            if (timeline.Collection.Title == "Beta Content")
            {
                ts.TimelineUrl = String.Format("/#{0}", GetContentPath(timeline.Collection.Id, timeline.Id, null));
                ts.Author = "Chronozoom";
            }
            else
            {
                ts.TimelineUrl = String.Format("/{0}/{1}/#{2}", timeline.Collection.User.DisplayName, timeline.Collection.Title, GetContentPath(timeline.Collection.Id, timeline.Id, null));
                ts.Author = timeline.Collection.User.DisplayName;
            }
            ts.ImageUrl = GetTimelineImageUrl(timeline);
            return ts;
        }
Exemple #4
0
        public TimelineShortcut GetTimelineShortcut(Timeline timeline)
        {
            string superCollectionPath  = "/" + timeline.Collection.SuperCollection.Title;
            string collectionPath       = "/" + timeline.Collection.Path;
            string contentPath          = "#" + GetContentPath(timeline.Collection.Id, timeline.Id, null);

            if (timeline.Collection.Default)
            {
                collectionPath = "";

                if (timeline.Collection.SuperCollection.Title == ConfigurationManager.AppSettings["DefaultSuperCollection"])
                {
                    superCollectionPath = "/";
                }
            }

            var timelineShortcut = new TimelineShortcut()
            {
                Title       = timeline.Title,
                TimelineUrl = superCollectionPath + collectionPath + contentPath,
                Author      = timeline.Collection.User == null ? "" : timeline.Collection.User.DisplayName,
                ImageUrl    = GetTimelineImageUrl(timeline)
            };

            return timelineShortcut;
        }