old remnants
This commit is contained in:
parent
82a82d533f
commit
62e44aeea6
12 changed files with 15 additions and 19 deletions
|
@ -127,10 +127,6 @@ renderLayout widget = do
|
||||||
|
|
||||||
withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet")
|
withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet")
|
||||||
|
|
||||||
formLayout :: Widget -> Handler Html
|
|
||||||
formLayout widget =
|
|
||||||
renderLayout $(widgetFile "form-widget")
|
|
||||||
|
|
||||||
approotRequest :: App -> Request -> T.Text
|
approotRequest :: App -> Request -> T.Text
|
||||||
approotRequest master req =
|
approotRequest master req =
|
||||||
case requestHeaderHost req of
|
case requestHeaderHost req of
|
||||||
|
|
|
@ -32,7 +32,7 @@ getActivateR token = do
|
||||||
Just (Entity _ uToken) -> do
|
Just (Entity _ uToken) -> do
|
||||||
user <- runDB $ getJust (fromJust $ tokenUser uToken)
|
user <- runDB $ getJust (fromJust $ tokenUser uToken)
|
||||||
let hexSalt = toHex $ userSalt user
|
let hexSalt = toHex $ userSalt user
|
||||||
formLayout $ do
|
defaultLayout $ do
|
||||||
setTitle "Activate your account"
|
setTitle "Activate your account"
|
||||||
$(widgetFile "activate")
|
$(widgetFile "activate")
|
||||||
_ -> do
|
_ -> do
|
||||||
|
@ -44,7 +44,7 @@ getActivateR token = do
|
||||||
case mToken of
|
case mToken of
|
||||||
Just (Entity _ _) -> do
|
Just (Entity _ _) -> do
|
||||||
let hexSalt = toHex uSalt
|
let hexSalt = toHex uSalt
|
||||||
formLayout $
|
defaultLayout $
|
||||||
$(widgetFile "activate")
|
$(widgetFile "activate")
|
||||||
_ -> do
|
_ -> do
|
||||||
setMessage "Invalid token!"
|
setMessage "Invalid token!"
|
||||||
|
|
|
@ -69,7 +69,7 @@ getAdminAlbumSettingsR albumId = do
|
||||||
(adminAlbumSettingsWidget, enctype) <- generateFormPost $
|
(adminAlbumSettingsWidget, enctype) <- generateFormPost $
|
||||||
renderBootstrap3 BootstrapBasicForm $
|
renderBootstrap3 BootstrapBasicForm $
|
||||||
adminAlbumSettingsForm album albumId users
|
adminAlbumSettingsForm album albumId users
|
||||||
formLayout $ do
|
defaultLayout $ do
|
||||||
setTitle "Administration: Album settings"
|
setTitle "Administration: Album settings"
|
||||||
$(widgetFile "adminAlbumSet")
|
$(widgetFile "adminAlbumSet")
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
|
|
|
@ -29,7 +29,7 @@ getAdminCommentR = do
|
||||||
media <- runDB $ selectList [] [Desc MediumTime]
|
media <- runDB $ selectList [] [Desc MediumTime]
|
||||||
comments <- runDB $ selectList [CommentParent ==. Nothing] [Desc CommentTime]
|
comments <- runDB $ selectList [CommentParent ==. Nothing] [Desc CommentTime]
|
||||||
replies <- runDB $ selectList [CommentParent !=. Nothing] [Desc CommentTime]
|
replies <- runDB $ selectList [CommentParent !=. Nothing] [Desc CommentTime]
|
||||||
formLayout $ do
|
defaultLayout $ do
|
||||||
setTitle "Administration: Comments"
|
setTitle "Administration: Comments"
|
||||||
$(widgetFile "adminComments")
|
$(widgetFile "adminComments")
|
||||||
Left (errorMsg, route) -> do
|
Left (errorMsg, route) -> do
|
||||||
|
|
|
@ -47,7 +47,7 @@ getAdminMediumSettingsR mediumId = do
|
||||||
(adminMediumSetWidget, enctype) <- generateFormPost $
|
(adminMediumSetWidget, enctype) <- generateFormPost $
|
||||||
renderBootstrap3 BootstrapBasicForm $
|
renderBootstrap3 BootstrapBasicForm $
|
||||||
adminMediumSetForm medium
|
adminMediumSetForm medium
|
||||||
formLayout $ do
|
defaultLayout $ do
|
||||||
setTitle "Administration: Medium Settings"
|
setTitle "Administration: Medium Settings"
|
||||||
$(widgetFile "adminMediumSet")
|
$(widgetFile "adminMediumSet")
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
|
|
|
@ -88,7 +88,7 @@ getAdminProfileSettingsR ownerId = do
|
||||||
(adminProfileSetWidget, enctype) <- generateFormPost $
|
(adminProfileSetWidget, enctype) <- generateFormPost $
|
||||||
renderBootstrap3 BootstrapBasicForm $
|
renderBootstrap3 BootstrapBasicForm $
|
||||||
adminProfileForm owner
|
adminProfileForm owner
|
||||||
formLayout $ do
|
defaultLayout $ do
|
||||||
setTitle "Administration: Profile settings"
|
setTitle "Administration: Profile settings"
|
||||||
$(widgetFile "adminProfileSettings")
|
$(widgetFile "adminProfileSettings")
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
|
|
|
@ -41,7 +41,7 @@ getAlbumSettingsR albumId = do
|
||||||
(albumSettingsWidget, enctype) <- generateFormPost $
|
(albumSettingsWidget, enctype) <- generateFormPost $
|
||||||
renderBootstrap3 BootstrapBasicForm $
|
renderBootstrap3 BootstrapBasicForm $
|
||||||
albumSettingsForm album albumId users
|
albumSettingsForm album albumId users
|
||||||
formLayout $ do
|
defaultLayout $ do
|
||||||
setTitle "Eidolon :: Album Settings"
|
setTitle "Eidolon :: Album Settings"
|
||||||
$(widgetFile "albumSettings")
|
$(widgetFile "albumSettings")
|
||||||
False -> do
|
False -> do
|
||||||
|
@ -152,7 +152,7 @@ getAlbumDeleteR albumId = do
|
||||||
if
|
if
|
||||||
userId == ownerId
|
userId == ownerId
|
||||||
then do
|
then do
|
||||||
formLayout $ do
|
defaultLayout $ do
|
||||||
setTitle $ toHtml ("Eidolon :: Delete album" `T.append` (albumTitle album))
|
setTitle $ toHtml ("Eidolon :: Delete album" `T.append` (albumTitle album))
|
||||||
$(widgetFile "albumDelete")
|
$(widgetFile "albumDelete")
|
||||||
else do
|
else do
|
||||||
|
|
|
@ -138,7 +138,7 @@ getCommentReplyR commentId = do
|
||||||
(replyWidget, enctype) <- generateFormPost $
|
(replyWidget, enctype) <- generateFormPost $
|
||||||
renderBootstrap3 BootstrapBasicForm $
|
renderBootstrap3 BootstrapBasicForm $
|
||||||
commentForm userId userSl mediumId (Just commentId)
|
commentForm userId userSl mediumId (Just commentId)
|
||||||
formLayout $ do
|
defaultLayout $ do
|
||||||
setTitle "Eidolon :: Reply to comment"
|
setTitle "Eidolon :: Reply to comment"
|
||||||
$(widgetFile "commentReply")
|
$(widgetFile "commentReply")
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
|
@ -217,7 +217,7 @@ getCommentDeleteR commentId = do
|
||||||
if
|
if
|
||||||
Just userId == Just (commentAuthor comment)
|
Just userId == Just (commentAuthor comment)
|
||||||
then do
|
then do
|
||||||
formLayout $ do
|
defaultLayout $ do
|
||||||
setTitle "Eidolon :: Delete comment"
|
setTitle "Eidolon :: Delete comment"
|
||||||
$(widgetFile "commentDelete")
|
$(widgetFile "commentDelete")
|
||||||
else do
|
else do
|
||||||
|
|
|
@ -31,7 +31,7 @@ getMediumSettingsR mediumId = do
|
||||||
(mediumSettingsWidget, enctype) <- generateFormPost $
|
(mediumSettingsWidget, enctype) <- generateFormPost $
|
||||||
renderBootstrap3 BootstrapBasicForm $
|
renderBootstrap3 BootstrapBasicForm $
|
||||||
mediumSettingsForm medium
|
mediumSettingsForm medium
|
||||||
formLayout $ do
|
defaultLayout $ do
|
||||||
setTitle "Eidolon :: Medium Settings"
|
setTitle "Eidolon :: Medium Settings"
|
||||||
$(widgetFile "mediumSettings")
|
$(widgetFile "mediumSettings")
|
||||||
Left (errorMsg, route) -> do
|
Left (errorMsg, route) -> do
|
||||||
|
@ -81,7 +81,7 @@ getMediumDeleteR mediumId = do
|
||||||
checkRes <- mediumCheck mediumId
|
checkRes <- mediumCheck mediumId
|
||||||
case checkRes of
|
case checkRes of
|
||||||
Right medium ->
|
Right medium ->
|
||||||
formLayout $ do
|
defaultLayout $ do
|
||||||
setTitle "Eidolon :: Delete Medium"
|
setTitle "Eidolon :: Delete Medium"
|
||||||
$(widgetFile "mediumDelete")
|
$(widgetFile "mediumDelete")
|
||||||
Left (errorMsg, route) -> do
|
Left (errorMsg, route) -> do
|
||||||
|
|
|
@ -29,7 +29,7 @@ getProfileDeleteR userId = do
|
||||||
checkRes <- profileCheck userId
|
checkRes <- profileCheck userId
|
||||||
case checkRes of
|
case checkRes of
|
||||||
Right user ->
|
Right user ->
|
||||||
formLayout $ do
|
defaultLayout $ do
|
||||||
setTitle "Eidolon :: Delete user profile"
|
setTitle "Eidolon :: Delete user profile"
|
||||||
$(widgetFile "profileDelete")
|
$(widgetFile "profileDelete")
|
||||||
Left (errorMsg, route) -> do
|
Left (errorMsg, route) -> do
|
||||||
|
|
|
@ -27,7 +27,7 @@ getProfileSettingsR userId = do
|
||||||
Right user -> do
|
Right user -> do
|
||||||
(profileSettingsWidget, enctype) <- generateFormPost $
|
(profileSettingsWidget, enctype) <- generateFormPost $
|
||||||
renderBootstrap3 BootstrapBasicForm $ profileSettingsForm user
|
renderBootstrap3 BootstrapBasicForm $ profileSettingsForm user
|
||||||
formLayout $ do
|
defaultLayout $ do
|
||||||
setTitle "Eidolon :: Profile settings"
|
setTitle "Eidolon :: Profile settings"
|
||||||
$(widgetFile "profileSettings")
|
$(widgetFile "profileSettings")
|
||||||
Left (errorMsg, route) -> do
|
Left (errorMsg, route) -> do
|
||||||
|
|
|
@ -23,7 +23,7 @@ import Data.Text.Encoding
|
||||||
getReactivateR :: Handler Html
|
getReactivateR :: Handler Html
|
||||||
getReactivateR = do
|
getReactivateR = do
|
||||||
(reactivateWidget, enctype) <- generateFormPost $ renderBootstrap3 BootstrapBasicForm $ reactivateForm
|
(reactivateWidget, enctype) <- generateFormPost $ renderBootstrap3 BootstrapBasicForm $ reactivateForm
|
||||||
formLayout $ do
|
defaultLayout $ do
|
||||||
setTitle "Eidolon :: Reactivate account"
|
setTitle "Eidolon :: Reactivate account"
|
||||||
$(widgetFile "reactivate")
|
$(widgetFile "reactivate")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue