introducing parallelism template in admin interface

This commit is contained in:
nek0 2015-01-11 17:59:02 +01:00
parent 23ceabc253
commit 3b2d37e057
7 changed files with 67 additions and 46 deletions

View file

@ -70,7 +70,7 @@ getAdminProfileSettingsR ownerId = do
tempUserId <- lookupSession "userId"
userId <- return $ getUserIdFromText $ fromJust tempUserId
(adminProfileSetWidget, enctype) <- generateFormPost $ adminProfileForm owner
defaultLayout $ do
formLayout $ do
setTitle "Administration: Profile settings"
$(widgetFile "adminProfileSettings")
Nothing -> do

View file

@ -133,6 +133,7 @@ var parallelism = (function($) { var _ = {
// Window.
_.objects.window._parallelism_update = function() {
var i, j, x, y, t;
console.log(itemsWidth,itemHeight)
// Calculate number of rows we can fit on the screen.
rows = Math.min(Math.max(Math.floor(windowHeight / itemHeight) - 1, 1), _.settings.maxRows);

View file

@ -1,15 +1,27 @@
$newline always
<h3>Admin interface
<p>
<div id="header" class="item" data-width="400">
<div class="inner">
<h1>Admin interface
<p>
Be careful with your actions here, every click will perform directly the advertised action.
<ul>
<li>
<div id="header" class="item" data-width="400">
<div class="inner">
<p>
<a href=@{AdminProfilesR}>User profiles
<li>
<div id="header" class="item" data-width="400">
<div class="inner">
<p>
<a href=@{AdminAlbumsR}>Albums
<li>
<div id="header" class="item" data-width="400">
<div class="inner">
<p>
<a href=@{AdminMediaR}>Media
<li>
<div id="header" class="item" data-width="400">
<div class="inner">
<p>
<a href=@{AdminCommentR}>Comments

View file

@ -1,15 +1,15 @@
$newline always
<h3>Profile settings
<div class="left">
<form method="post" enctype=#{enctype}>
<div id="header" class="item" data-width="400">
<form class="inner" method="post" enctype=#{enctype}>
<h1>Profile Settings
^{adminProfileSetWidget}
<div>
<input type=submit value="Change settings">
<a href=@{AdminProfileDeleteR userId}>Delete user
<div class="right">
<div id="header" class="item" data-width="200">
<div class="inner">
<ul>
<li>
<a href=@{AdminUserAlbumsR ownerId}>Albums of this user

View file

@ -1,10 +1,12 @@
$newline always
<h3>User profiles
$if null profiles
<div id="header" class="item" data-width="400">
<div class="inner">
<h1>User profiles
$if null profiles
<p>
There are no profiles yet (How can you even see this?)
$else
<ul>
$forall (Entity uId u) <- profiles
<li>
$forall (Entity uId u) <- profiles
<div id="header" class="item" data-width="200">
<div class="inner">
<a href=@{AdminProfileSettingsR uId}>#{userSlug u}

View file

@ -1,10 +1,13 @@
$newline always
<h3>Albums of #{userSlug owner}
$if null albums
<div id="header" class="item" data-width="400">
<div class="inner">
<h1>Albums of #{userSlug owner}
<p>
$if null albums
#{userSlug owner} has no albums yet
$else
<ul>
$forall (Entity aId a) <- albums
<li>
$forall (Entity aId a) <- albums
<div id="header" class="item" data-width="200">
<div class="inner">
<p>
<a href=@{AdminAlbumSettingsR aId}>#{albumTitle a}

View file

@ -1,10 +1,13 @@
$newline always
<h3>Media of #{userSlug owner}
$if null media
<div id="header" class="item" data-width="400">
<div class="inner">
<h1>Media of #{userSlug owner}
$if null media
<p>
#{userSlug owner} has no media yet
$else
<ul>
$forall (Entity mId m) <- media
<li>
$forall (Entity mId m) <- media
<div id="header" class="item" data-width="200">
<div class="inner">
<p>
<a href=@{AdminMediumSettingsR mId}>#{mediumTitle m}