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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,10 +1,12 @@
$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
<input type="checkbox" id="confirm" name="confirm" value="confirm" required> <input type="checkbox" id="confirm" name="confirm" value="confirm" required>
<input id="delete" type="submit" value="Delete user"> <input id="delete" type="submit" value="Delete user">

View file

@ -1,9 +1,9 @@
$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">
<a href=@{ProfileDeleteR userId}>Delete user <a href=@{ProfileDeleteR userId}>Delete user