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 | 27 ++++---- view/theme/frio/templates/admin/users.tpl | 83 +++++++++++++---------- 3 files changed, 64 insertions(+), 48 deletions(-) diff --git a/view/theme/frio/css/mod_admin.css b/view/theme/frio/css/mod_admin.css index 5f9ac1d924..7a8c6f659e 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 8d573816cf..dc8abe054b 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 1c56982c30..b5d8abd2a8 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}}
-