more toying with parallelism
This commit is contained in:
parent
4185083984
commit
0357e5dd91
7 changed files with 22 additions and 24 deletions
|
@ -2,6 +2,7 @@ module Handler.AlbumSettings where
|
||||||
|
|
||||||
import Import
|
import Import
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
|
import Data.Maybe
|
||||||
import System.Directory
|
import System.Directory
|
||||||
import System.FilePath
|
import System.FilePath
|
||||||
import qualified Data.List as L
|
import qualified Data.List as L
|
||||||
|
@ -84,7 +85,7 @@ postAlbumSettingsR albumId = do
|
||||||
False -> do
|
False -> do
|
||||||
return [()]
|
return [()]
|
||||||
-- nothing to do here
|
-- nothing to do here
|
||||||
width <- getThumbWidth $ albumSamplePic temp
|
width <- getThumbWidth $ Just $ L.tail $ fromMaybe ['a'] $ albumSamplePic temp
|
||||||
_ <- runDB $ update albumId
|
_ <- runDB $ update albumId
|
||||||
[ AlbumTitle =. albumTitle temp
|
[ AlbumTitle =. albumTitle temp
|
||||||
, AlbumShares =. newShares
|
, AlbumShares =. newShares
|
||||||
|
|
|
@ -12,7 +12,7 @@ getProfileDeleteR userId = do
|
||||||
checkRes <- profileCheck userId
|
checkRes <- profileCheck userId
|
||||||
case checkRes of
|
case checkRes of
|
||||||
Right user -> do
|
Right user -> do
|
||||||
defaultLayout $ do
|
formLayout $ do
|
||||||
setTitle "Eidolon :: Delete user profile"
|
setTitle "Eidolon :: Delete user profile"
|
||||||
$(widgetFile "profileDelete")
|
$(widgetFile "profileDelete")
|
||||||
Left (errorMsg, route) -> do
|
Left (errorMsg, route) -> do
|
||||||
|
|
|
@ -9,7 +9,7 @@ getProfileSettingsR userId = do
|
||||||
case checkRes of
|
case checkRes of
|
||||||
Right user -> do
|
Right user -> do
|
||||||
(profileSettingsWidget, enctype) <- generateFormPost $ profileSettingsForm user
|
(profileSettingsWidget, enctype) <- generateFormPost $ profileSettingsForm user
|
||||||
defaultLayout $ do
|
formLayout $ do
|
||||||
setTitle "Eidolon :: Profile settings"
|
setTitle "Eidolon :: Profile settings"
|
||||||
$(widgetFile "profileSettings")
|
$(widgetFile "profileSettings")
|
||||||
Left (errorMsg, route) -> do
|
Left (errorMsg, route) -> do
|
||||||
|
|
|
@ -10,8 +10,3 @@ $forall (Entity mediumId medium) <- recentMedia
|
||||||
<figure>
|
<figure>
|
||||||
<img src=#{mediumThumb medium}>
|
<img src=#{mediumThumb medium}>
|
||||||
<figcaption>#{mediumTitle medium}
|
<figcaption>#{mediumTitle medium}
|
||||||
<div id="header" class="item" data-width="400">
|
|
||||||
<div class="inner">
|
|
||||||
<h1>Test
|
|
||||||
<p>
|
|
||||||
foo bar baz
|
|
||||||
|
|
|
@ -2,6 +2,8 @@ $newline always
|
||||||
<div id="header" class="item" data-width="400">
|
<div id="header" class="item" data-width="400">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h1>Profile of #{ownerSlug}
|
<h1>Profile of #{ownerSlug}
|
||||||
|
$if presence == True
|
||||||
|
<a href=@{ProfileSettingsR ownerId}>Change your profile settings
|
||||||
|
|
||||||
<div id="header" class="item" data-width="400">
|
<div id="header" class="item" data-width="400">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
@ -55,5 +57,3 @@ $else
|
||||||
get a feed from this:
|
get a feed from this:
|
||||||
<a href=@{UserFeedAtomR ownerId}>Atom
|
<a href=@{UserFeedAtomR ownerId}>Atom
|
||||||
<a href=@{UserFeedRssR ownerId}>RSS
|
<a href=@{UserFeedRssR ownerId}>RSS
|
||||||
$if presence == True
|
|
||||||
<a href=@{ProfileSettingsR ownerId}>Change your profile settings
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
$newline always
|
$newline always
|
||||||
<h3>Delete User #{userSlug user}
|
<div id="header" class="item" data-width="300">
|
||||||
|
<div class="inner">
|
||||||
|
<h1>Delete User #{userSlug user}
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Do you wish to delete this user and all his albums in images?
|
Do you wish to delete this user and all his albums and images?
|
||||||
|
|
||||||
<form method="POST" action=@{ProfileDeleteR userId}>
|
<form method="POST" action=@{ProfileDeleteR userId}>
|
||||||
<label for="confirm">Really delete this user
|
<label for="confirm">Really delete this user
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
$newline always
|
$newline always
|
||||||
<h3>Profile settings
|
<div id="header" class="item" data-width="300">
|
||||||
|
<form class="inner" method="post" enctype=#{enctype}>
|
||||||
<form method="post" enctype=#{enctype}>
|
<h1>Profile settings
|
||||||
^{profileSettingsWidget}
|
^{profileSettingsWidget}
|
||||||
<div>
|
<div>
|
||||||
<input type=submit value="Change settings">
|
<input type=submit value="Change settings">
|
||||||
|
|
Loading…
Reference in a new issue