changed list order of album sample pics. also fixed error in AdminAlbumSettings

This commit is contained in:
nek0 2014-12-23 21:40:17 +01:00
parent abc74cd078
commit 8ae3622aff
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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]