introducing parallelism template in admin interface
This commit is contained in:
parent
23ceabc253
commit
3b2d37e057
7 changed files with 67 additions and 46 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,15 +1,27 @@
|
|||
$newline always
|
||||
<h3>Admin interface
|
||||
|
||||
<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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
$newline always
|
||||
<h3>User 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>
|
||||
<div id="header" class="item" data-width="200">
|
||||
<div class="inner">
|
||||
<a href=@{AdminProfileSettingsR uId}>#{userSlug u}
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
$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
|
||||
#{userSlug owner} has no albums yet
|
||||
$else
|
||||
<ul>
|
||||
|
||||
$forall (Entity aId a) <- albums
|
||||
<li>
|
||||
<div id="header" class="item" data-width="200">
|
||||
<div class="inner">
|
||||
<p>
|
||||
<a href=@{AdminAlbumSettingsR aId}>#{albumTitle a}
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
$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
|
||||
<p>
|
||||
#{userSlug owner} has no media yet
|
||||
$else
|
||||
<ul>
|
||||
|
||||
$forall (Entity mId m) <- media
|
||||
<li>
|
||||
<div id="header" class="item" data-width="200">
|
||||
<div class="inner">
|
||||
<p>
|
||||
<a href=@{AdminMediumSettingsR mId}>#{mediumTitle m}
|
||||
|
|
Loading…
Reference in a new issue