old remnants

This commit is contained in:
nek0 2016-09-07 17:32:56 +02:00
parent 82a82d533f
commit 62e44aeea6
12 changed files with 15 additions and 19 deletions

View file

@ -127,10 +127,6 @@ renderLayout widget = do
withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet")
formLayout :: Widget -> Handler Html
formLayout widget =
renderLayout $(widgetFile "form-widget")
approotRequest :: App -> Request -> T.Text
approotRequest master req =
case requestHeaderHost req of

View file

@ -32,7 +32,7 @@ getActivateR token = do
Just (Entity _ uToken) -> do
user <- runDB $ getJust (fromJust $ tokenUser uToken)
let hexSalt = toHex $ userSalt user
formLayout $ do
defaultLayout $ do
setTitle "Activate your account"
$(widgetFile "activate")
_ -> do
@ -44,7 +44,7 @@ getActivateR token = do
case mToken of
Just (Entity _ _) -> do
let hexSalt = toHex uSalt
formLayout $
defaultLayout $
$(widgetFile "activate")
_ -> do
setMessage "Invalid token!"

View file

@ -69,7 +69,7 @@ getAdminAlbumSettingsR albumId = do
(adminAlbumSettingsWidget, enctype) <- generateFormPost $
renderBootstrap3 BootstrapBasicForm $
adminAlbumSettingsForm album albumId users
formLayout $ do
defaultLayout $ do
setTitle "Administration: Album settings"
$(widgetFile "adminAlbumSet")
Nothing -> do

View file

@ -29,7 +29,7 @@ getAdminCommentR = do
media <- runDB $ selectList [] [Desc MediumTime]
comments <- runDB $ selectList [CommentParent ==. Nothing] [Desc CommentTime]
replies <- runDB $ selectList [CommentParent !=. Nothing] [Desc CommentTime]
formLayout $ do
defaultLayout $ do
setTitle "Administration: Comments"
$(widgetFile "adminComments")
Left (errorMsg, route) -> do

View file

@ -47,7 +47,7 @@ getAdminMediumSettingsR mediumId = do
(adminMediumSetWidget, enctype) <- generateFormPost $
renderBootstrap3 BootstrapBasicForm $
adminMediumSetForm medium
formLayout $ do
defaultLayout $ do
setTitle "Administration: Medium Settings"
$(widgetFile "adminMediumSet")
Nothing -> do

View file

@ -88,7 +88,7 @@ getAdminProfileSettingsR ownerId = do
(adminProfileSetWidget, enctype) <- generateFormPost $
renderBootstrap3 BootstrapBasicForm $
adminProfileForm owner
formLayout $ do
defaultLayout $ do
setTitle "Administration: Profile settings"
$(widgetFile "adminProfileSettings")
Nothing -> do

View file

@ -41,7 +41,7 @@ getAlbumSettingsR albumId = do
(albumSettingsWidget, enctype) <- generateFormPost $
renderBootstrap3 BootstrapBasicForm $
albumSettingsForm album albumId users
formLayout $ do
defaultLayout $ do
setTitle "Eidolon :: Album Settings"
$(widgetFile "albumSettings")
False -> do
@ -152,7 +152,7 @@ getAlbumDeleteR albumId = do
if
userId == ownerId
then do
formLayout $ do
defaultLayout $ do
setTitle $ toHtml ("Eidolon :: Delete album" `T.append` (albumTitle album))
$(widgetFile "albumDelete")
else do

View file

@ -138,7 +138,7 @@ getCommentReplyR commentId = do
(replyWidget, enctype) <- generateFormPost $
renderBootstrap3 BootstrapBasicForm $
commentForm userId userSl mediumId (Just commentId)
formLayout $ do
defaultLayout $ do
setTitle "Eidolon :: Reply to comment"
$(widgetFile "commentReply")
Nothing -> do
@ -217,7 +217,7 @@ getCommentDeleteR commentId = do
if
Just userId == Just (commentAuthor comment)
then do
formLayout $ do
defaultLayout $ do
setTitle "Eidolon :: Delete comment"
$(widgetFile "commentDelete")
else do

View file

@ -31,7 +31,7 @@ getMediumSettingsR mediumId = do
(mediumSettingsWidget, enctype) <- generateFormPost $
renderBootstrap3 BootstrapBasicForm $
mediumSettingsForm medium
formLayout $ do
defaultLayout $ do
setTitle "Eidolon :: Medium Settings"
$(widgetFile "mediumSettings")
Left (errorMsg, route) -> do
@ -81,7 +81,7 @@ getMediumDeleteR mediumId = do
checkRes <- mediumCheck mediumId
case checkRes of
Right medium ->
formLayout $ do
defaultLayout $ do
setTitle "Eidolon :: Delete Medium"
$(widgetFile "mediumDelete")
Left (errorMsg, route) -> do

View file

@ -29,7 +29,7 @@ getProfileDeleteR userId = do
checkRes <- profileCheck userId
case checkRes of
Right user ->
formLayout $ do
defaultLayout $ do
setTitle "Eidolon :: Delete user profile"
$(widgetFile "profileDelete")
Left (errorMsg, route) -> do

View file

@ -27,7 +27,7 @@ getProfileSettingsR userId = do
Right user -> do
(profileSettingsWidget, enctype) <- generateFormPost $
renderBootstrap3 BootstrapBasicForm $ profileSettingsForm user
formLayout $ do
defaultLayout $ do
setTitle "Eidolon :: Profile settings"
$(widgetFile "profileSettings")
Left (errorMsg, route) -> do

View file

@ -23,7 +23,7 @@ import Data.Text.Encoding
getReactivateR :: Handler Html
getReactivateR = do
(reactivateWidget, enctype) <- generateFormPost $ renderBootstrap3 BootstrapBasicForm $ reactivateForm
formLayout $ do
defaultLayout $ do
setTitle "Eidolon :: Reactivate account"
$(widgetFile "reactivate")