more toying with parallelism

This commit is contained in:
nek0 2015-01-11 08:57:38 +01:00
parent 4185083984
commit 0357e5dd91
7 changed files with 22 additions and 24 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -10,8 +10,3 @@ $forall (Entity mediumId medium) <- recentMedia
<figure>
<img src=#{mediumThumb medium}>
<figcaption>#{mediumTitle medium}
<div id="header" class="item" data-width="400">
<div class="inner">
<h1>Test
<p>
foo bar baz

View file

@ -2,6 +2,8 @@ $newline always
<div id="header" class="item" data-width="400">
<div class="inner">
<h1>Profile of #{ownerSlug}
$if presence == True
<a href=@{ProfileSettingsR ownerId}>Change your profile settings
<div id="header" class="item" data-width="400">
<div class="inner">
@ -55,5 +57,3 @@ $else
get a feed from this:
<a href=@{UserFeedAtomR ownerId}>Atom
<a href=@{UserFeedRssR ownerId}>RSS
$if presence == True
<a href=@{ProfileSettingsR ownerId}>Change your profile settings

View file

@ -1,10 +1,12 @@
$newline always
<h3>Delete User #{userSlug user}
<div id="header" class="item" data-width="300">
<div class="inner">
<h1>Delete User #{userSlug user}
<p>
Do you wish to delete this user and all his albums in images?
<p>
Do you wish to delete this user and all his albums and images?
<form method="POST" action=@{ProfileDeleteR userId}>
<label for="confirm">Really delete this user
<input type="checkbox" id="confirm" name="confirm" value="confirm" required>
<input id="delete" type="submit" value="Delete user">
<form method="POST" action=@{ProfileDeleteR userId}>
<label for="confirm">Really delete this user
<input type="checkbox" id="confirm" name="confirm" value="confirm" required>
<input id="delete" type="submit" value="Delete user">

View file

@ -1,9 +1,9 @@
$newline always
<h3>Profile settings
<div id="header" class="item" data-width="300">
<form class="inner" method="post" enctype=#{enctype}>
<h1>Profile settings
^{profileSettingsWidget}
<div>
<input type=submit value="Change settings">
<form method="post" enctype=#{enctype}>
^{profileSettingsWidget}
<div>
<input type=submit value="Change settings">
<a href=@{ProfileDeleteR userId}>Delete user
<a href=@{ProfileDeleteR userId}>Delete user