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" tempUserId <- lookupSession "userId"
userId <- return $ getUserIdFromText $ fromJust tempUserId userId <- return $ getUserIdFromText $ fromJust tempUserId
(adminProfileSetWidget, enctype) <- generateFormPost $ adminProfileForm owner (adminProfileSetWidget, enctype) <- generateFormPost $ adminProfileForm owner
defaultLayout $ do formLayout $ do
setTitle "Administration: Profile settings" setTitle "Administration: Profile settings"
$(widgetFile "adminProfileSettings") $(widgetFile "adminProfileSettings")
Nothing -> do Nothing -> do

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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