From 6b8347e5604c3ad702a055edcdf31af8dfcb3cfc Mon Sep 17 00:00:00 2001 From: Ryan Mathis Date: Wed, 24 Feb 2021 12:24:57 -0700 Subject: [PATCH] Styled email list pages, updated color scheme --- Controller/GrouperGroupsController.php | 34 ++++++++-- Lib/lang.php | 17 +++-- View/CoGrouperLites/display.ctp | 65 ++++++++++++++----- View/Elements/Components/groupattributes.ctp | 2 +- .../Components/navigation-emaillists.ctp | 55 ++++++++++++++++ .../{navigation.ctp => navigation-groups.ctp} | 26 +------- View/Elements/Components/optAction.ctp | 5 +- View/Elements/Components/pagination.ctp | 2 +- View/Elements/Components/search.ctp | 18 ++--- View/Elements/base-styles.ctp | 57 ++++++++++++++++ View/GrouperGroups/base.ctp | 4 +- View/GrouperGroups/emaillistinfo.ctp | 4 +- ...llistsmanaged.ctp => emaillistsmanage.ctp} | 34 ++++++---- View/GrouperGroups/emaillistsmember.ctp | 35 ++++++++++ View/GrouperGroups/emaillistsoptin.ctp | 14 ++-- View/GrouperGroups/fields.inc | 4 +- View/GrouperGroups/groupinfo.ctp | 8 +-- View/GrouperGroups/groupmember.ctp | 4 +- View/GrouperGroups/groupoptin.ctp | 14 ++-- View/GrouperGroups/groupowner.ctp | 20 +++--- webroot/css/co-grouper-base.css | 36 +++++----- webroot/css/co-grouper-plugin.css | 25 ++++--- 22 files changed, 338 insertions(+), 145 deletions(-) create mode 100644 View/Elements/Components/navigation-emaillists.ctp rename View/Elements/Components/{navigation.ctp => navigation-groups.ctp} (68%) create mode 100644 View/Elements/base-styles.ctp rename View/GrouperGroups/{emaillistsmanaged.ctp => emaillistsmanage.ctp} (50%) create mode 100644 View/GrouperGroups/emaillistsmember.ctp diff --git a/Controller/GrouperGroupsController.php b/Controller/GrouperGroupsController.php index 5e6f072..3f91687 100644 --- a/Controller/GrouperGroupsController.php +++ b/Controller/GrouperGroupsController.php @@ -381,7 +381,8 @@ function isAuthorized() { $p['groupmember'] = true; $p['groupoptin'] = true; $p['emaillistsoptin'] = true; - $p['emaillistsmanaged'] = true; + $p['emaillistsmember'] = true; + $p['emaillistsmanage'] = true; $p['emaillistsinfo'] = true; $p['groupcreateform'] = true; $p['groupcreate'] = true; @@ -393,8 +394,8 @@ function isAuthorized() { return ($p[$this->action]); } - public function emailListsOptin() { - $this->set('title', _txt('pl.grouperlite.title.emaillists')); + public function emaillistsOptin() { + $this->set('title', _txt('pl.grouperlite.title.emaillists-join')); // mock data $this->set('group', array( 'member' => true, @@ -402,24 +403,45 @@ public function emailListsOptin() { 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'enabled' => 'T' )); + + $this->set('isuserowner', $this->GrouperGroup->isUserOwner($this->userId)); } - public function emailListsManaged() { - $this->set('title', _txt('pl.grouperlite.title.emaillistsmanaged')); + public function emaillistsMember() + { + $this->set('title', _txt('pl.grouperlite.title.emaillists-member')); // mock data $this->set('group', array( 'member' => true, 'name' => 'Email List 1', + 'domain' => 'internet2', 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'enabled' => 'T' )); + + $this->set('isuserowner', $this->GrouperGroup->isUserOwner($this->userId)); + } + + public function emaillistsManage() { + $this->set('title', _txt('pl.grouperlite.title.emaillists-manage')); + // mock data + $this->set('group', array( + 'member' => true, + 'name' => 'Email List 1', + 'domain' => 'internet2', + 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', + 'enabled' => 'T' + )); + + $this->set('isuserowner', $this->GrouperGroup->isUserOwner($this->userId)); } - public function emailListInfo() { + public function emaillistInfo() { $this->set('title', _txt('pl.grouperlite.title.emaillistsinfo')); // mock data $this->set('groupergroupsdetail', array( 'member' => true, + 'domain' => 'internet2', 'uuid' => 'abc123xyz789', 'displayExtension' => 'email-list-1', 'extension' => 'email-list-1', diff --git a/Lib/lang.php b/Lib/lang.php index b52f529..6a9ae6d 100644 --- a/Lib/lang.php +++ b/Lib/lang.php @@ -12,17 +12,20 @@ 'pl.grouperlite.nav.groups-can-join' => 'Groups I can join', 'pl.grouperlite.nav.groups-presided' => 'Groups I manage', 'pl.grouperlite.nav.memberships' => 'My memberships', - 'pl.grouperlite.nav.email-lists' => 'Email lists', - 'pl.grouperlite.nav.email-lists-managed' => 'Email lists I manage', + 'pl.grouperlite.nav.emaillists-join' => 'Email lists I can join', + 'pl.grouperlite.nav.emaillists-member' => 'My email lists', + 'pl.grouperlite.nav.emaillists-manage' => 'Email lists I manage', 'pl.grouperlite.nav.create-group' => 'Create group', + 'pl.grouperlite.nav.create-email' => 'Create email list', 'pl.grouperlite.title.root' => 'Grouper Collaborations:', 'pl.grouperlite.title.groupinfo' => 'Group configuration and attributes', 'pl.grouperlite.title.groupowner' => 'Groups I manage', 'pl.grouperlite.title.groupmember' => 'My Memberships', 'pl.grouperlite.title.groupoptin' => 'Groups I can join', - 'pl.grouperlite.title.emaillists' => 'Email lists', - 'pl.grouperlite.title.emaillistsmanaged' => 'Email lists I manage', + 'pl.grouperlite.title.emaillists-join' => 'Email lists I can join', + 'pl.grouperlite.title.emaillists-member' => 'My email lists', + 'pl.grouperlite.title.emaillists-manage' => 'Email lists I manage', 'pl.grouperlite.title.emaillistsinfo' => 'Email list configuration and attributes', 'pl.grouperlite.title.groupcreate' => 'Create Group', @@ -43,13 +46,15 @@ 'pl.grouperlite.table.description' => 'Description', 'pl.grouperlite.table.status' => 'Status', 'pl.grouperlite.table.action' => 'Action', + 'pl.grouperlite.table.open' => 'Open?', + 'pl.grouperlite.table.groups' => 'Groups', 'pl.grouperlite.value.descr.zerostate' => 'No Description', 'pl.grouperlite.value.enabled' => 'Enabled', 'pl.grouperlite.value.disabled' => 'Disabled', - 'pl.grouperlite.action.join-group' => 'Join group', - 'pl.grouperlite.action.leave-group' => 'Leave group', + 'pl.grouperlite.action.join' => 'Join', + 'pl.grouperlite.action.leave' => 'Leave', 'pl.grouperlite.action.edit-group' => 'Edit', 'pl.grouperlite.action.disable-group' => 'Disable', 'pl.grouperlite.action.subscribe' => 'Subscribe', diff --git a/View/CoGrouperLites/display.ctp b/View/CoGrouperLites/display.ctp index 6906fde..ffd633f 100644 --- a/View/CoGrouperLites/display.ctp +++ b/View/CoGrouperLites/display.ctp @@ -30,22 +30,26 @@ */ // Figure out the widget ID so we can overwrite the dashboard's widget div + $divid = $vv_config['CoGrouperLite']['co_dashboard_widget_id']; -?> +echo $this->element('GrouperLite.base-styles'); + +?> -
+
-
-
+
+
Html->image('GrouperLite.grouper-logo.png', array('class' => 'logo-fluid')); ?>
-
- diff --git a/View/Elements/Components/groupattributes.ctp b/View/Elements/Components/groupattributes.ctp index c2ba7d5..11f7082 100644 --- a/View/Elements/Components/groupattributes.ctp +++ b/View/Elements/Components/groupattributes.ctp @@ -12,7 +12,7 @@ - + View diff --git a/View/Elements/Components/navigation-emaillists.ctp b/View/Elements/Components/navigation-emaillists.ctp new file mode 100644 index 0000000..7b8c255 --- /dev/null +++ b/View/Elements/Components/navigation-emaillists.ctp @@ -0,0 +1,55 @@ + \ No newline at end of file diff --git a/View/Elements/Components/navigation.ctp b/View/Elements/Components/navigation-groups.ctp similarity index 68% rename from View/Elements/Components/navigation.ctp rename to View/Elements/Components/navigation-groups.ctp index 42b72b5..0a0268b 100644 --- a/View/Elements/Components/navigation.ctp +++ b/View/Elements/Components/navigation-groups.ctp @@ -36,30 +36,6 @@ ) ?>
- -
@@ -71,7 +47,7 @@ ) ); ?> - +  
diff --git a/View/Elements/Components/optAction.ctp b/View/Elements/Components/optAction.ctp index 1324664..2928dca 100644 --- a/View/Elements/Components/optAction.ctp +++ b/View/Elements/Components/optAction.ctp @@ -1,9 +1,10 @@ Form->create(false, array( - 'url' => array('controller' => 'groupergroups', 'action' => $action) + 'url' => array('controller' => 'groupergroups', 'action' => $action), + 'class' => 'd-flex justify-content-center' )); ?> Form->hidden('GroupName', array('default' => $group)); ?> Form->end(); ?> \ No newline at end of file diff --git a/View/Elements/Components/pagination.ctp b/View/Elements/Components/pagination.ctp index 7103b0d..8515b18 100644 --- a/View/Elements/Components/pagination.ctp +++ b/View/Elements/Components/pagination.ctp @@ -6,7 +6,7 @@ records - +
Page 1 of 1, Viewing 1-23 of 23 diff --git a/View/Elements/Components/search.ctp b/View/Elements/Components/search.ctp index b214c64..6047626 100644 --- a/View/Elements/Components/search.ctp +++ b/View/Elements/Components/search.ctp @@ -1,17 +1,17 @@ @@ -26,11 +26,11 @@
- - @@ -97,12 +97,12 @@
- +
- diff --git a/View/Elements/base-styles.ctp b/View/Elements/base-styles.ctp new file mode 100644 index 0000000..00ead17 --- /dev/null +++ b/View/Elements/base-styles.ctp @@ -0,0 +1,57 @@ + \ No newline at end of file diff --git a/View/GrouperGroups/base.ctp b/View/GrouperGroups/base.ctp index 8af4dda..6a835bd 100644 --- a/View/GrouperGroups/base.ctp +++ b/View/GrouperGroups/base.ctp @@ -1,5 +1,5 @@ Html->css('GrouperLite.co-grouper-base') . "\n "; +print $this->element('GrouperLite.base-styles'); print $this->Html->css('GrouperLite.co-grouper-plugin') . "\n "; ?> @@ -9,7 +9,7 @@ print $this->Html->script('GrouperLite.typeahead.bundle.js') . "\n "; $this->Html->addCrumb(_txt('pl.grouperlite.crumb.root'), array('controller' => 'groupergroups', 'action' => 'groupoptin'), array('prepend' => true)); ?> -
+
Html->image('GrouperLite.Grouper.jpg', array('class' => 'img-fluid mr-2', 'style' => 'height: 50px')); ?>

diff --git a/View/GrouperGroups/emaillistinfo.ctp b/View/GrouperGroups/emaillistinfo.ctp index 081e1c7..c16600a 100644 --- a/View/GrouperGroups/emaillistinfo.ctp +++ b/View/GrouperGroups/emaillistinfo.ctp @@ -12,7 +12,7 @@ $attrUrlBase = $baseUrl.$path.$attrOperation;

Group:

- + View Group in Grouper   @@ -81,7 +81,7 @@ $attrUrlBase = $baseUrl.$path.$attrOperation; - + View diff --git a/View/GrouperGroups/emaillistsmanaged.ctp b/View/GrouperGroups/emaillistsmanage.ctp similarity index 50% rename from View/GrouperGroups/emaillistsmanaged.ctp rename to View/GrouperGroups/emaillistsmanage.ctp index 0a6961f..04349b3 100644 --- a/View/GrouperGroups/emaillistsmanaged.ctp +++ b/View/GrouperGroups/emaillistsmanage.ctp @@ -1,6 +1,6 @@ extend('/GrouperGroups/base'); ?> Html->addCrumb('Email lists I manage'); ?> -element('Components/navigation', array('active' => 'emaillistsmanaged', 'create' => true)); ?> +element('Components/navigation-emaillists', array('active' => 'emaillistsmanage', 'create' => true)); ?> element('Components/search', array('active' => 'emaillistsmanaged')); ?>
@@ -8,29 +8,35 @@ - - + + + + isset($group['name']) ? $group['domain'] . ':' . $group['name'] : "No Name", + array( + 'controller' => 'groupergroups', + 'action' => 'emaillistinfo', + '?' => array('groupname' => urlencode($group['name'])) + ) + ) ?> - + +
Html->link( - isset($group['name']) ? $group['name'] : "No Name", - array( - 'controller' => 'groupergroups', - 'action' => 'emaillistinfo', - '?' => array('groupname' => urlencode($group['name'])) - ) - ) ?> + Subscribers (10) | + Moderators (2) | + Owners (1) + - - @@ -39,4 +45,4 @@
-
+
\ No newline at end of file diff --git a/View/GrouperGroups/emaillistsmember.ctp b/View/GrouperGroups/emaillistsmember.ctp new file mode 100644 index 0000000..d678648 --- /dev/null +++ b/View/GrouperGroups/emaillistsmember.ctp @@ -0,0 +1,35 @@ +extend('/GrouperGroups/base'); ?> +Html->addCrumb('Email lists I can join'); ?> +element('Components/navigation-emaillists', array('active' => 'emaillistsmember')); ?> +element('Components/search', array('active' => 'emaillistsmember')); ?> + +
+ + + + + + + + + + + + + + + +
Html->link( + isset($group['name']) ? $group['domain'].':'.$group['name'] : "No Name", + array( + 'controller' => 'groupergroups', + 'action' => 'emaillistinfo', + '?' => array('groupname' => urlencode($group['name'])) + ) + ) ?> + +
+
diff --git a/View/GrouperGroups/emaillistsoptin.ctp b/View/GrouperGroups/emaillistsoptin.ctp index 29b37e8..05075cc 100644 --- a/View/GrouperGroups/emaillistsoptin.ctp +++ b/View/GrouperGroups/emaillistsoptin.ctp @@ -1,24 +1,21 @@ extend('/GrouperGroups/base'); ?> Html->addCrumb('Email lists I can join'); ?> -element('Components/navigation', array('active' => 'emaillistsoptin')); ?> +element('Components/navigation-emaillists', array('active' => 'emaillistsoptin')); ?> element('Components/search', array('active' => 'emaillistsoptin')); ?> -Html->addCrumb('Group Optin/Optout'); ?> -
- - + - -
Html->link( - isset($group['name']) ? $group['name'] : "No Name", + isset($group['name']) ? $group['domain'].':'.$group['name'] : "No Name", array( 'controller' => 'groupergroups', 'action' => 'emaillistinfo', @@ -26,9 +23,8 @@ ) ) ?> - + diff --git a/View/GrouperGroups/fields.inc b/View/GrouperGroups/fields.inc index ee78e06..b826cf9 100644 --- a/View/GrouperGroups/fields.inc +++ b/View/GrouperGroups/fields.inc @@ -71,7 +71,7 @@ $PRIVELAGES = array('READ', 'VIEW', 'OPTIN', 'OPTOUT', 'ATTRIBUTE_READ'); list.html(subscribers.map(function(s) { var button = [ - ' + - + View in Grouper   @@ -29,7 +29,7 @@ $isuserowner = 'T';

Group Properties

- @@ -673,7 +673,7 @@ $json_a = json_decode($string, true); element('Components/subscriberList', array('subscribers' => $json_a)); ?>
diff --git a/View/GrouperGroups/groupmember.ctp b/View/GrouperGroups/groupmember.ctp index 91ccc69..be54b9e 100644 --- a/View/GrouperGroups/groupmember.ctp +++ b/View/GrouperGroups/groupmember.ctp @@ -1,6 +1,6 @@ extend('/GrouperGroups/base'); ?> Html->addCrumb(_txt('pl.grouperlite.nav.memberships')); ?> -element('GrouperLite.Components/navigation', array('active' => 'groupmember')); ?> +element('GrouperLite.Components/navigation-groups', array('active' => 'groupmember')); ?> element('GrouperLite.Components/search', array('active' => 'groupmember')); ?>
@@ -8,7 +8,7 @@ - + diff --git a/View/GrouperGroups/groupoptin.ctp b/View/GrouperGroups/groupoptin.ctp index 473d1e6..209a7c2 100644 --- a/View/GrouperGroups/groupoptin.ctp +++ b/View/GrouperGroups/groupoptin.ctp @@ -1,6 +1,6 @@ extend('/GrouperGroups/base'); ?> Html->addCrumb(_txt('pl.grouperlite.nav.groups-can-join')); ?> -element('GrouperLite.Components/navigation', array('active' => 'groupoptin')); ?> +element('GrouperLite.Components/navigation-groups', array('active' => 'groupoptin')); ?> element('GrouperLite.Components/search', array('active' => 'groupoptin')); ?>
@@ -8,7 +8,7 @@ - + @@ -33,11 +33,11 @@ - - - + + +
- element("pagination"); ?> -
+ element("pagination"); ?> +
\ No newline at end of file diff --git a/View/GrouperGroups/groupowner.ctp b/View/GrouperGroups/groupowner.ctp index 8368178..de522e0 100644 --- a/View/GrouperGroups/groupowner.ctp +++ b/View/GrouperGroups/groupowner.ctp @@ -1,6 +1,6 @@ extend('/GrouperGroups/base'); ?> Html->addCrumb(_txt('pl.grouperlite.nav.groups-presided')); ?> -element('Components/navigation', array('active' => 'groupowner')); ?> +element('Components/navigation-groups', array('active' => 'groupowner')); ?> element('Components/search', array('active' => 'groupowner')); ?>
@@ -9,7 +9,7 @@ - + @@ -24,13 +24,13 @@ ) ?>" title=""> - - - - + + +
+ - - @@ -40,11 +40,11 @@
- element("pagination"); ?> -
+ element("pagination"); ?> +
\ No newline at end of file diff --git a/webroot/css/co-grouper-base.css b/webroot/css/co-grouper-base.css index 6b60821..8080b7f 100644 --- a/webroot/css/co-grouper-base.css +++ b/webroot/css/co-grouper-base.css @@ -1,22 +1,28 @@ -html { - font-size: 12px; -} - -html, body { - font-weight: 400; - line-height: 20px; - height: 100%; -} - -body { - overflow-x: hidden; -} - :root { --red: #CC3333; --blue: #1D7AB4; --green: #22AA22; + --teal: #1c6070; --danger: var(--red); --success: var(--green); - --primary: var(--blue); + --primary: var(--teal); +} + +.grouper .btn.btn-primary { + background-color: var(--primary); + border-color: var(--primary); + box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); +} + +.grouper .btn.btn-success.btn-grouper { + background-color: var(--success); + border-color: var(--success); + box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); +} + +.grouper .btn.btn-danger.btn-grouper { + background-color: var(--danger); + border-color: var(--danger); + color: white; + box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); } \ No newline at end of file diff --git a/webroot/css/co-grouper-plugin.css b/webroot/css/co-grouper-plugin.css index ec6461f..da3c6ea 100644 --- a/webroot/css/co-grouper-plugin.css +++ b/webroot/css/co-grouper-plugin.css @@ -3,19 +3,6 @@ border-color: var(--primary); } -.btn.btn-success { - background-color: var(--success); - border-color: var(--success); - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); -} - -.btn.btn-danger { - background-color: var(--danger); - border-color: var(--danger); - color: white; - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); -} - .btn.btn-icon { color: white; padding: 0; @@ -107,6 +94,10 @@ a { width: 80px; } +#grouper-plugin .table tfoot tr th { + padding: 0; +} + #grouper-plugin .table thead th, #grouper-plugin .table tbody td { padding: 0.75em; text-align: left; @@ -212,4 +203,12 @@ a.list-group-item-action:hover .fa { .modal.modal-primary .close { opacity: 1; +} + +.grouper #pagination { + background: var(--primary); +} + +.grouper #pagination label { + margin-bottom: 0; } \ No newline at end of file