コード例 #1
0
        public ActionResult Details(Album album)
        {
            string albumCrumbs = GetAlbumCrumbs(album);
            IDictionary <string, string> breadCrumbs = GetBreadCrumbs();

            breadCrumbs.Add(album.Name, UrlService.UserUrl("albums/#/show/" + album.AlbumId));
            breadCrumbs.Add("details", string.Empty);

            string message = SiteCookie.Get(_removePhotosFromAlbumMessageCookieKey);

            if (!string.IsNullOrEmpty(message))
            {
                SiteCookie.Set(_removePhotosFromAlbumMessageCookieKey, string.Empty);
            }

            Media media = null;

            if (album.CoverMediaId.HasValue)
            {
                media = _mediaRepository.RetrieveByPrimaryKeyAndUserId(album.CoverMediaId.GetValueOrDefault(), Owner.Id);
            }

            ManageDetailsView manageView = ModelFactory <ManageDetailsView>(new{ Album = album, CoverMedia = media, albumCrumbs, UIMessage = message });

            return(View(manageView, breadCrumbs));
        }
コード例 #2
0
 /// <summary>
 /// Sets the back URL.
 /// </summary>
 /// <param name="backUrl">The back URL.</param>
 /// <param name="cookie">The cookie.</param>
 public void SetBackUrl(string backUrl, SiteCookie cookie)
 {
     cookie.Set(_backUrlCookieName, HttpUtility.UrlEncode(backUrl));
 }
コード例 #3
0
 /// <summary>
 /// Sets the back URL.
 /// </summary>
 /// <param name="backUrl">The back URL.</param>
 /// <param name="cookie">The cookie.</param>
 public void SetBackUrl(string backUrl, SiteCookie cookie)
 {
     cookie.Set(_backUrlCookieName, HttpUtility.UrlEncode(backUrl));
 }