From 4a4815bbe330b7d9fe4c079b5a2e9b26a116284b Mon Sep 17 00:00:00 2001 From: nek0 Date: Sun, 11 Jan 2015 20:06:44 +0100 Subject: [PATCH] more parallelism --- Handler/AdminAlbumSettings.hs | 5 +++-- templates/adminAlbumMedia.hamlet | 19 +++++++++++-------- templates/adminAlbumSet.hamlet | 13 ++++++------- templates/adminAlbums.hamlet | 22 ++++++++++++++-------- templates/adminMedia.hamlet | 19 +++++++++++-------- templates/adminUserAlbums.hamlet | 12 ++++++++---- templates/adminUserMedia.hamlet | 9 +++++---- templates/profile.hamlet | 4 ++-- 8 files changed, 60 insertions(+), 43 deletions(-) diff --git a/Handler/AdminAlbumSettings.hs b/Handler/AdminAlbumSettings.hs index 65bd86c..e6f1995 100644 --- a/Handler/AdminAlbumSettings.hs +++ b/Handler/AdminAlbumSettings.hs @@ -4,6 +4,7 @@ import Import import Handler.Commons import qualified Data.Text as T import qualified Data.List as L +import Data.Maybe import System.FilePath import System.Directory @@ -50,7 +51,7 @@ getAdminAlbumSettingsR albumId = do entities <- runDB $ selectList [UserId !=. (albumOwner album)] [Desc UserName] users <- return $ map (\u -> (userName $ entityVal u, entityKey u)) entities (adminAlbumSettingsWidget, enctype) <- generateFormPost $ adminAlbumSettingsForm album albumId users - defaultLayout $ do + formLayout $ do setTitle "Administration: Album settings" $(widgetFile "adminAlbumSet") Nothing -> do @@ -73,7 +74,7 @@ postAdminAlbumSettingsR albumId = do ((res, _), _) <- runFormPost $ adminAlbumSettingsForm album albumId users case res of FormSuccess temp -> do - width <- getThumbWidth $ albumSamplePic temp + width <- getThumbWidth $ Just $ L.tail $ fromMaybe ['a'] $ albumSamplePic temp _ <- runDB $ update albumId [ AlbumTitle =. albumTitle temp , AlbumShares =. albumShares temp diff --git a/templates/adminAlbumMedia.hamlet b/templates/adminAlbumMedia.hamlet index defcf68..69331b0 100644 --- a/templates/adminAlbumMedia.hamlet +++ b/templates/adminAlbumMedia.hamlet @@ -1,10 +1,13 @@ $newline always -

Media from #{albumTitle album} +