changed order

This commit is contained in:
nek0 2014-09-21 18:42:07 +02:00
parent 3ab4b2ba4f
commit 1684e2c3f9
4 changed files with 5 additions and 5 deletions

View file

@ -14,7 +14,7 @@ getAdminAlbumsR = do
user <- runDB $ getJust userId user <- runDB $ getJust userId
case userAdmin user of case userAdmin user of
True -> do True -> do
albums <- runDB $ selectList [] [Desc AlbumTitle] albums <- runDB $ selectList [] [Asc AlbumTitle]
defaultLayout $ do defaultLayout $ do
$(widgetFile "adminAlbums") $(widgetFile "adminAlbums")
False -> do False -> do
@ -36,7 +36,7 @@ getAdminAlbumMediaR albumId = do
tempAlbum <- runDB $ get albumId tempAlbum <- runDB $ get albumId
case tempAlbum of case tempAlbum of
Just album -> do Just album -> do
media <- runDB $ selectList [MediumAlbum ==. albumId] [Desc MediumTitle] media <- runDB $ selectList [MediumAlbum ==. albumId] [Asc MediumTitle]
defaultLayout $ do defaultLayout $ do
$(widgetFile "adminAlbumMedia") $(widgetFile "adminAlbumMedia")
Nothing -> do Nothing -> do

View file

@ -14,7 +14,7 @@ getAdminMediaR = do
user <- runDB $ getJust userId user <- runDB $ getJust userId
case userAdmin user of case userAdmin user of
True -> do True -> do
media <- runDB $ selectList [] [Desc MediumTitle] media <- runDB $ selectList [] [Asc MediumTitle]
defaultLayout $ do defaultLayout $ do
$(widgetFile "adminMedia") $(widgetFile "adminMedia")
False -> do False -> do

View file

@ -8,7 +8,7 @@ getProfileR :: UserId -> Handler Html
getProfileR ownerId = do getProfileR ownerId = do
owner <- runDB $ get ownerId owner <- runDB $ get ownerId
ownerSlug <- lift $ pure $ userSlug $ fromJust owner ownerSlug <- lift $ pure $ userSlug $ fromJust owner
userAlbs <- runDB $ selectList [AlbumOwner ==. ownerId] [Desc AlbumTitle] userAlbs <- runDB $ selectList [AlbumOwner ==. ownerId] [Asc AlbumTitle]
recentMedia <- (runDB $ selectList [MediumOwner ==. ownerId] [Desc MediumTime]) recentMedia <- (runDB $ selectList [MediumOwner ==. ownerId] [Desc MediumTime])
msu <- lookupSession "userId" msu <- lookupSession "userId"
presence <- case msu of presence <- case msu of

View file

@ -5,7 +5,7 @@ import Data.Maybe
getTagR :: Text -> Handler Html getTagR :: Text -> Handler Html
getTagR tag = do getTagR tag = do
tempMedia <- runDB $ selectList [] [Desc MediumTitle] tempMedia <- runDB $ selectList [] [Asc MediumTitle]
almostMedia <- mapM (\a -> do almostMedia <- mapM (\a -> do
case tag `elem` (mediumTags $ entityVal a) of case tag `elem` (mediumTags $ entityVal a) of
True -> return (Just a) True -> return (Just a)