From f5737e0ee662c0d63f847ff7b1eb9b6f76f8717c Mon Sep 17 00:00:00 2001 From: Remi Date: Tue, 23 Feb 2016 12:02:58 +0100 Subject: [PATCH] bug fixes in adm_list: filter implementation and screen display --- bureau/admin/adm_list.php | 52 +++++++++++++++++++++-------------- bureau/admin/styles/style.css | 13 +++++++++ 2 files changed, 44 insertions(+), 21 deletions(-) diff --git a/bureau/admin/adm_list.php b/bureau/admin/adm_list.php index b66ceee1..c4db0a6a 100644 --- a/bureau/admin/adm_list.php +++ b/bureau/admin/adm_list.php @@ -52,7 +52,6 @@ if ($short != -1) { } $subadmin = variable_get("subadmin_restriction", 0); - // If we ask for all account but we aren't "admin" and // subadmin var is not 1 if ($show == "all" && !$subadmin == 1 && $cuid != 2000) { @@ -61,6 +60,9 @@ if ($show == "all" && !$subadmin == 1 && $cuid != 2000) { exit(); } +// show all accounts by default for admin-like accounts +if (($show=="")&&($subadmin == 1 || $cuid == 2000)) $show=all; + if ($pattern && $pattern_type) { $accountList = $admin->get_list($show == 'all' ? 1 : 0, $creator, $pattern, $pattern_type); } else { @@ -86,34 +88,42 @@ if ($mem->user["admlist"] == 0) { // Normal (large) mode
-
+

- />  - /> - " /> + + + + " /> + +

get_creator_list(); if ($subadmin == 1 || $cuid == 2000) { + $class=($show=="all") ? "inb" : "ina"; + echo '

' . _('List all AlternC accounts') . ''; + + $class=($show!="all") ? "inb" : "ina"; + echo ' ' . _('List only my accounts') . '

'; + if ($show != 'all') { - echo '

' . _('List all AlternC accounts') . ''; + $infos_creators = array(); - if ($subadmin == 1 || $cuid == 2000) { - $infos_creators = array(); + foreach ($list_creators as $key => $val) { + $infos_creators[] = '' . $val['login'] . ''; + } - foreach ($list_creators as $key => $val) { - $infos_creators[] = '' . $val['login'] . ''; - } - - if (count($infos_creators)) { - echo ' (' . _("Or only the accounts of:") . " " . implode(', ', $infos_creators) . ')'; - } - } - echo "

"; - } else { // if show != all - echo '

' . _('List only my accounts') . '

'; + if (count($infos_creators)) { + echo ' (' . _("Or only the accounts of:") . " " . implode(', ', $infos_creators) . ')'; + } } }// END ($subadmin==1 || $cuid==2000) ?> @@ -126,7 +136,7 @@ if (!empty($error)) { ?>

- () + ()

@@ -256,7 +266,7 @@ if ($mem->user["admlist"] == 1) { // SHORT MODE " title="">[  ] " title="">[  ] - checkcreator($val['uid'])) { ?> + checkcreator($val['uid'])||($show=="all")) { ?> " title="">[  ]checkcreator $creator_name = ( ($val['creator'] == '0') ? _("himself") : $list_creators[$val['creator']]['login']) diff --git a/bureau/admin/styles/style.css b/bureau/admin/styles/style.css index 07935739..86e2be63 100644 --- a/bureau/admin/styles/style.css +++ b/bureau/admin/styles/style.css @@ -401,6 +401,19 @@ img { background-color: #F0F0F4; } +@media screen and (min-width: 1000px) { + #global { + margin: 20px 50px; + width: auto; + display: flex; + } + + #content { + flex: 1; + width: auto; + } +} + /* Main container */ #menu {