From 0357e5dd915e490b91962fb7b80c78a6c49fffd0 Mon Sep 17 00:00:00 2001 From: nek0 Date: Sun, 11 Jan 2015 08:57:38 +0100 Subject: [PATCH] more toying with parallelism --- Handler/AlbumSettings.hs | 3 ++- Handler/ProfileDelete.hs | 2 +- Handler/ProfileSettings.hs | 2 +- templates/home.hamlet | 5 ----- templates/profile.hamlet | 4 ++-- templates/profileDelete.hamlet | 16 +++++++++------- templates/profileSettings.hamlet | 14 +++++++------- 7 files changed, 22 insertions(+), 24 deletions(-) diff --git a/Handler/AlbumSettings.hs b/Handler/AlbumSettings.hs index 84c024e..03e8f96 100644 --- a/Handler/AlbumSettings.hs +++ b/Handler/AlbumSettings.hs @@ -2,6 +2,7 @@ module Handler.AlbumSettings where import Import import qualified Data.Text as T +import Data.Maybe import System.Directory import System.FilePath import qualified Data.List as L @@ -84,7 +85,7 @@ postAlbumSettingsR albumId = do False -> do return [()] -- nothing to do here - width <- getThumbWidth $ albumSamplePic temp + width <- getThumbWidth $ Just $ L.tail $ fromMaybe ['a'] $ albumSamplePic temp _ <- runDB $ update albumId [ AlbumTitle =. albumTitle temp , AlbumShares =. newShares diff --git a/Handler/ProfileDelete.hs b/Handler/ProfileDelete.hs index 946575d..5c8d9e0 100644 --- a/Handler/ProfileDelete.hs +++ b/Handler/ProfileDelete.hs @@ -12,7 +12,7 @@ getProfileDeleteR userId = do checkRes <- profileCheck userId case checkRes of Right user -> do - defaultLayout $ do + formLayout $ do setTitle "Eidolon :: Delete user profile" $(widgetFile "profileDelete") Left (errorMsg, route) -> do diff --git a/Handler/ProfileSettings.hs b/Handler/ProfileSettings.hs index 0a749ca..d0e6a36 100644 --- a/Handler/ProfileSettings.hs +++ b/Handler/ProfileSettings.hs @@ -9,7 +9,7 @@ getProfileSettingsR userId = do case checkRes of Right user -> do (profileSettingsWidget, enctype) <- generateFormPost $ profileSettingsForm user - defaultLayout $ do + formLayout $ do setTitle "Eidolon :: Profile settings" $(widgetFile "profileSettings") Left (errorMsg, route) -> do diff --git a/templates/home.hamlet b/templates/home.hamlet index 790253f..2f1466f 100644 --- a/templates/home.hamlet +++ b/templates/home.hamlet @@ -10,8 +10,3 @@ $forall (Entity mediumId medium) <- recentMedia
#{mediumTitle medium} -