From e909beee040217c8164ebb13d34d8b118cb3ac59 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Thu, 19 Apr 2018 18:17:46 +0200 Subject: [PATCH] Frio: admin/users template - move checkboxes on first column - move select/deselect all as button group on panel footer - use existing jquery in mod_admin.js for select/deselect all functionality - add page content wrapper, without padding - fix user avatar size in "pending deletion" table --- view/theme/frio/css/mod_admin.css | 2 + view/theme/frio/js/mod_admin.js | 29 ++++---- view/theme/frio/templates/admin/users.tpl | 83 +++++++++++++---------- 3 files changed, 65 insertions(+), 49 deletions(-) diff --git a/view/theme/frio/css/mod_admin.css b/view/theme/frio/css/mod_admin.css index 5f9ac1d92..7a8c6f659 100644 --- a/view/theme/frio/css/mod_admin.css +++ b/view/theme/frio/css/mod_admin.css @@ -1,4 +1,6 @@ +#admin-users.adminpage { padding-left:0; padding-right: 0;} +#admin-users.adminpage > h1 { padding: 0 15px; } #users img.icon, #deleted img.icon { height: 24px; } .opened .caret { transform: rotate(180deg); } tr.details td, diff --git a/view/theme/frio/js/mod_admin.js b/view/theme/frio/js/mod_admin.js index 8d573816c..dc8abe054 100644 --- a/view/theme/frio/js/mod_admin.js +++ b/view/theme/frio/js/mod_admin.js @@ -20,25 +20,24 @@ $(function() { } }); + + function selectall(cls) { + $('.' + cls).prop('checked', true); + return false; + } + function selectnone(cls) { + $('.' + cls).prop('checked', false); + return false; + } + + }); -function selectall(cls) { - $('.' + cls).prop('checked', true); - return false; -} -function selectnone(cls) { - $('.' + cls).prop('checked', false); - return false; -} - - // Users -function confirm_delete(uname){ - return confirm( "{{$confirm_delete}}".format(uname)); -} -function confirm_delete_multi(){ - return confirm("{{$confirm_delete_multi}}"); +function confirm_delete(msg, uname){ + return confirm(msg.format(uname)); } + function details(uid) { $("#user-"+uid+"-detail").toggleClass("hidden"); $("#user-"+uid).toggleClass("opened"); diff --git a/view/theme/frio/templates/admin/users.tpl b/view/theme/frio/templates/admin/users.tpl index 1c56982c3..b5d8abd2a 100644 --- a/view/theme/frio/templates/admin/users.tpl +++ b/view/theme/frio/templates/admin/users.tpl @@ -2,9 +2,7 @@
-
-

{{$title}} - {{$page}}

-
+

{{$title}} - {{$page}}

@@ -24,36 +22,44 @@ + {{foreach $th_pending as $th}}{{/foreach}} - {{foreach $pending as $u}} + - + - + {{/foreach}}
{{$th}} - - -
{{$u.created}}{{$u.name}}{{$u.name}} {{$u.email}}
{{$pendingnotetext}} {{$u.note}}
-