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.
|
||||
|
||||
<p>
|
||||
Be careful with your actions here, every click will perform directly the advertised action.
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href=@{AdminProfilesR}>User profiles
|
||||
<li>
|
||||
<a href=@{AdminAlbumsR}>Albums
|
||||
<li>
|
||||
<a href=@{AdminMediaR}>Media
|
||||
<li>
|
||||
<a href=@{AdminCommentR}>Comments
|
||||
<div id="header" class="item" data-width="400">
|
||||
<div class="inner">
|
||||
<p>
|
||||
<a href=@{AdminProfilesR}>User profiles
|
||||
|
||||
<div id="header" class="item" data-width="400">
|
||||
<div class="inner">
|
||||
<p>
|
||||
<a href=@{AdminAlbumsR}>Albums
|
||||
|
||||
<div id="header" class="item" data-width="400">
|
||||
<div class="inner">
|
||||
<p>
|
||||
<a href=@{AdminMediaR}>Media
|
||||
|
||||
<div id="header" class="item" data-width="400">
|
||||
<div class="inner">
|
||||
<p>
|
||||
<a href=@{AdminCommentR}>Comments
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
$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">
|
||||
<ul>
|
||||
<li>
|
||||
<a href=@{AdminUserAlbumsR ownerId}>Albums of this user
|
||||
<li>
|
||||
<a href=@{AdminUserMediaR ownerId}>Media of this user
|
||||
<div id="header" class="item" data-width="200">
|
||||
<div class="inner">
|
||||
<ul>
|
||||
<li>
|
||||
<a href=@{AdminUserAlbumsR ownerId}>Albums of this user
|
||||
<li>
|
||||
<a href=@{AdminUserMediaR ownerId}>Media 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?)
|
||||
|
||||
$if null profiles
|
||||
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}
|
||||
|
|
|
@ -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
|
||||
|
||||
$if null albums
|
||||
#{userSlug owner} has no albums yet
|
||||
$else
|
||||
<ul>
|
||||
$forall (Entity aId a) <- albums
|
||||
<li>
|
||||
<a href=@{AdminAlbumSettingsR aId}>#{albumTitle a}
|
||||
$forall (Entity aId a) <- albums
|
||||
<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
|
||||
|
||||
$if null media
|
||||
#{userSlug owner} has no media yet
|
||||
$else
|
||||
<ul>
|
||||
$forall (Entity mId m) <- media
|
||||
<li>
|
||||
<a href=@{AdminMediumSettingsR mId}>#{mediumTitle m}
|
||||
$forall (Entity mId m) <- media
|
||||
<div id="header" class="item" data-width="200">
|
||||
<div class="inner">
|
||||
<p>
|
||||
<a href=@{AdminMediumSettingsR mId}>#{mediumTitle m}
|
||||
|
|
Loading…
Reference in a new issue