From 9159bdfd067b829a4445bec781fdefc506fab3b1 Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 11 Nov 2013 11:49:27 +0000 Subject: feature 2890: small changes to the new design of group manager. Tab (with icon), javascript open for "add group" form, use a "link style" for "Permissions" on each album, add icon for "Permissions" link, use same colors for "selected" items as for photos batch manager or comments manager, replace "-" by "·" and make it less visible (softer color) for user separator. git-svn-id: http://piwigo.org/svn/trunk@25449 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/group_list.php | 15 +++++++++- admin/include/add_core_tabs.inc.php | 6 +++- admin/themes/clear/theme.css | 8 ++++-- admin/themes/default/template/group_list.tpl | 41 ++++++++++++++++++++++------ admin/themes/roma/theme.css | 10 +++++-- 5 files changed, 65 insertions(+), 15 deletions(-) diff --git a/admin/group_list.php b/admin/group_list.php index 15a98fa83..10e9cd7f8 100644 --- a/admin/group_list.php +++ b/admin/group_list.php @@ -28,6 +28,19 @@ if( !defined("PHPWG_ROOT_PATH") ) include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); +// +-----------------------------------------------------------------------+ +// | tabs | +// +-----------------------------------------------------------------------+ + +include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); + +$my_base_url = get_root_url().'admin.php?page='; + +$tabsheet = new tabsheet(); +$tabsheet->set_id('groups'); +$tabsheet->select('group_list'); +$tabsheet->assign(); + // +-----------------------------------------------------------------------+ // | Check Access and exit when user status is not ok | // +-----------------------------------------------------------------------+ @@ -400,7 +413,7 @@ SELECT username 'ID' => $row['id'], 'IS_DEFAULT' => (get_boolean($row['is_default']) ? ' ['.l10n('default').']' : ''), 'NB_MEMBERS' => count($members), - 'L_MEMBERS' => implode(' - ', $members), + 'L_MEMBERS' => implode(' · ', $members), 'MEMBERS' => l10n_dec('%d member', '%d members', count($members)), 'U_MEMBERS' => $members_url.$row['id'], 'U_DELETE' => $del_url.$row['id'].'&pwg_token='.get_pwg_token(), diff --git a/admin/include/add_core_tabs.inc.php b/admin/include/add_core_tabs.inc.php index 69fd5a0be..3a25a7cdb 100644 --- a/admin/include/add_core_tabs.inc.php +++ b/admin/include/add_core_tabs.inc.php @@ -65,7 +65,11 @@ function add_core_tabs($sheets, $tab_id) case 'users': $sheets[''] = array('caption' => ' '.l10n('User list'), 'url' => ''); break; - + + case 'groups': + $sheets[''] = array('caption' => ' '.l10n('Groups'), 'url' => ''); + break; + case 'configuration': global $conf_link; $sheets['main'] = array('caption' => l10n('General'), 'url' => $conf_link.'main'); diff --git a/admin/themes/clear/theme.css b/admin/themes/clear/theme.css index 722404d3d..1a74c6caf 100644 --- a/admin/themes/clear/theme.css +++ b/admin/themes/clear/theme.css @@ -329,6 +329,10 @@ p.albumTitle img {margin-bottom:-3px;} background-color:#ccc; } label>p.group_select { - color: #666; - background-color:#F9F9F9; + color: #000; + background-color:#C2F5C2; +} + +.userSeparator { + color:#999; } \ No newline at end of file diff --git a/admin/themes/default/template/group_list.tpl b/admin/themes/default/template/group_list.tpl index 1c1d20c9e..726cb2c33 100644 --- a/admin/themes/default/template/group_list.tpl +++ b/admin/themes/default/template/group_list.tpl @@ -1,6 +1,20 @@ {footer_script} {literal} $(document).ready(function() { + /** + * Add group + */ + jQuery("#addGroup").click(function() { + jQuery("#addGroupForm").toggle(); + jQuery("input[name=groupname]").focus(); + return false; + }); + + jQuery("#addGroupClose").click(function() { + jQuery("#addGroupForm").hide(); + return false; + }); + $('.groups input').change(function () { $(this).parent('p').toggleClass('group_select'); }); $(".grp_action").hide(); $("input.group_selection").click(function() { @@ -51,18 +65,29 @@ $(document).ready(function() {

{'Group management'|@translate}

-
+

+ {'Add group'|translate} +

+ +
{'Add group'|@translate} - - - - - - + +

+ {'Group name'|translate}
+ +

+ +

+ + {'Cancel'|@translate} +

+ +
+
@@ -72,7 +97,7 @@ $(document).ready(function() {
  • {if $group.MEMBERS>0}{$group.MEMBERS}
    {$group.L_MEMBERS}{else}{$group.MEMBERS}{/if}

    - {'Manage Permissions'|@translate} + {'Permissions'|translate}
  • {/foreach} {/if} diff --git a/admin/themes/roma/theme.css b/admin/themes/roma/theme.css index 4eff90e81..eb1d3685d 100644 --- a/admin/themes/roma/theme.css +++ b/admin/themes/roma/theme.css @@ -303,10 +303,14 @@ div.token-input-dropdown ul li.token-input-selected-dropdown-item {background-co background-color:#111; } label>p.group_select { - color: #111; - background-color:#ccc; + color: #fff; + background-color:#555; +} + +.userSeparator { + color:#666; } #configContent fieldset:not(.no-border) { border-top-color:#444; -} \ No newline at end of file +} -- cgit v1.2.3