From 8ae3622aff87d17d27a544e9c9cf7fea6091131b Mon Sep 17 00:00:00 2001 From: nek0 Date: Tue, 23 Dec 2014 21:40:17 +0100 Subject: [PATCH] changed list order of album sample pics. also fixed error in AdminAlbumSettings --- Handler/AdminAlbumSettings.hs | 4 ++-- Handler/AlbumSettings.hs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Handler/AdminAlbumSettings.hs b/Handler/AdminAlbumSettings.hs index 6f2f621..d3feee3 100644 --- a/Handler/AdminAlbumSettings.hs +++ b/Handler/AdminAlbumSettings.hs @@ -126,8 +126,8 @@ adminAlbumSettingsForm album albumId users = renderDivs $ Album <*> aopt (selectField media) "Sample picture" (Just $ albumSamplePic album) where media = do - entities <- runDB $ selectList [MediumAlbum ==. albumId] [Desc MediumTitle] - optionsPairs $ map (\med -> (mediumTitle $ entityVal med, mediumPath (entityVal med))) entities + entities <- runDB $ selectList [MediumAlbum ==. albumId] [Asc MediumTitle] + optionsPairs $ map (\med -> (mediumTitle $ entityVal med, mediumThumb (entityVal med))) entities -- userNames = -- let entities = runDB $ selectList [UserId !=. (albumOwner album)] [Desc UserName] -- in map (\ent -> (userName $ entityVal ent, entityKey ent)) entities diff --git a/Handler/AlbumSettings.hs b/Handler/AlbumSettings.hs index 2b83af3..0a34219 100644 --- a/Handler/AlbumSettings.hs +++ b/Handler/AlbumSettings.hs @@ -110,7 +110,7 @@ albumSettingsForm album albumId users = renderDivs $ Album <*> aopt (selectField media) "Sample picture" (Just $ albumSamplePic album) where media = do - entities <- runDB $ selectList [MediumAlbum ==. albumId] [Desc MediumTitle] + entities <- runDB $ selectList [MediumAlbum ==. albumId] [Asc MediumTitle] optionsPairs $ map (\med -> (mediumTitle $ entityVal med, mediumThumb (entityVal med))) entities -- users = do -- entities <- runDB $ selectList [UserId !=. (albumOwner album)] [Desc UserName]