changed list order of album sample pics. also fixed error in AdminAlbumSettings
This commit is contained in:
parent
abc74cd078
commit
8ae3622aff
2 changed files with 3 additions and 3 deletions
|
@ -126,8 +126,8 @@ adminAlbumSettingsForm album albumId users = renderDivs $ Album
|
||||||
<*> aopt (selectField media) "Sample picture" (Just $ albumSamplePic album)
|
<*> aopt (selectField media) "Sample picture" (Just $ albumSamplePic album)
|
||||||
where
|
where
|
||||||
media = do
|
media = do
|
||||||
entities <- runDB $ selectList [MediumAlbum ==. albumId] [Desc MediumTitle]
|
entities <- runDB $ selectList [MediumAlbum ==. albumId] [Asc MediumTitle]
|
||||||
optionsPairs $ map (\med -> (mediumTitle $ entityVal med, mediumPath (entityVal med))) entities
|
optionsPairs $ map (\med -> (mediumTitle $ entityVal med, mediumThumb (entityVal med))) entities
|
||||||
-- userNames =
|
-- userNames =
|
||||||
-- let entities = runDB $ selectList [UserId !=. (albumOwner album)] [Desc UserName]
|
-- let entities = runDB $ selectList [UserId !=. (albumOwner album)] [Desc UserName]
|
||||||
-- in map (\ent -> (userName $ entityVal ent, entityKey ent)) entities
|
-- in map (\ent -> (userName $ entityVal ent, entityKey ent)) entities
|
||||||
|
|
|
@ -110,7 +110,7 @@ albumSettingsForm album albumId users = renderDivs $ Album
|
||||||
<*> aopt (selectField media) "Sample picture" (Just $ albumSamplePic album)
|
<*> aopt (selectField media) "Sample picture" (Just $ albumSamplePic album)
|
||||||
where
|
where
|
||||||
media = do
|
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
|
optionsPairs $ map (\med -> (mediumTitle $ entityVal med, mediumThumb (entityVal med))) entities
|
||||||
-- users = do
|
-- users = do
|
||||||
-- entities <- runDB $ selectList [UserId !=. (albumOwner album)] [Desc UserName]
|
-- entities <- runDB $ selectList [UserId !=. (albumOwner album)] [Desc UserName]
|
||||||
|
|
Loading…
Reference in a new issue