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)
|
return (userId == ownerId)
|
||||||
Nothing ->
|
Nothing ->
|
||||||
return False
|
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
|
defaultLayout $ do
|
||||||
$(widgetFile "album")
|
$(widgetFile "album")
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
|
|
|
@ -9,7 +9,8 @@ by <a href=@{ProfileR ownerId}>#{ownerName}</a>
|
||||||
This album is empty
|
This album is empty
|
||||||
$else
|
$else
|
||||||
Images in this album:
|
Images in this album:
|
||||||
$forall (medium) <- media
|
$forall (Entity mediumId medium) <- media
|
||||||
<div class="thumbnails">
|
<div class="thumbnails">
|
||||||
|
<a href=@{MediumR mediumId}>
|
||||||
<img src=#{mediumPath medium}><br>
|
<img src=#{mediumPath medium}><br>
|
||||||
#{mediumTitle medium}
|
#{mediumTitle medium}
|
||||||
|
|
Loading…
Reference in a new issue