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));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets the back URL.
 /// </summary>
 /// <param name="cookie">The cookie.</param>
 public string GetBackUrl(SiteCookie cookie)
 {
     return(HttpUtility.UrlDecode(cookie.Get(_backUrlCookieName)));
 }
 /// <summary>
 /// Gets the back URL.
 /// </summary>
 /// <param name="cookie">The cookie.</param>
 public string GetBackUrl(SiteCookie cookie)
 {
     return HttpUtility.UrlDecode(cookie.Get(_backUrlCookieName));
 }