albummedia now displayed correctly, but talking with DB is ugly
This commit is contained in:
parent
72e4f16125
commit
d8d4b5b306
2 changed files with 4 additions and 2 deletions
|
@ -17,7 +17,8 @@ getAlbumR albumId = do
|
|||
return (userId == ownerId)
|
||||
Nothing ->
|
||||
return False
|
||||
media <- mapM (\a -> runDB $ getJust a) (albumContent album)
|
||||
-- media <- mapM (\a -> runDB $ getJust a) (albumContent album)
|
||||
media <- runDB $ selectList [MediumAlbum ==. albumId] [Desc MediumTime]
|
||||
defaultLayout $ do
|
||||
$(widgetFile "album")
|
||||
Nothing -> do
|
||||
|
|
|
@ -9,7 +9,8 @@ by <a href=@{ProfileR ownerId}>#{ownerName}</a>
|
|||
This album is empty
|
||||
$else
|
||||
Images in this album:
|
||||
$forall (medium) <- media
|
||||
$forall (Entity mediumId medium) <- media
|
||||
<div class="thumbnails">
|
||||
<a href=@{MediumR mediumId}>
|
||||
<img src=#{mediumPath medium}><br>
|
||||
#{mediumTitle medium}
|
||||
|
|
Loading…
Reference in a new issue