Skip to content

Commit

Permalink
Updated UI framework, updated text, added new tab
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jan 25, 2021
1 parent d4baa94 commit 4336bae
Show file tree
Hide file tree
Showing 11 changed files with 197 additions and 10,357 deletions.
11 changes: 7 additions & 4 deletions Controller/CoGrouperLitesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,19 @@ function beforeRender() {

public function display($id) {
$cfg = $this->CoGrouperLite->getConfig();
$services_url = Router::url([

$this->set('pl_grouperlite_index_url', Router::url([
'plugin' => "grouper_lite",
'controller' => 'GrouperGroups',
'action' => 'index',
'co' => $this->cur_co['Co']['id'],
'glid' => $id
]);

$this->set('vv_services_url', $services_url);
]));
$this->set('title_for_layout', _txt('pl.grouperlite.config.display.title'));

$this->set('coid', $this->cur_co['Co']['id']);
$this->set('glid', $id);

// Pass the config so we know which div to overwrite
$this->set('vv_config', $cfg);
}
Expand Down
4 changes: 2 additions & 2 deletions Controller/GrouperGroupsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ public function groupMember() {
$this->set('title', _txt('pl.grouperlite.title.groupmember'));
if (isset($this->request->data['search'])){
$searchCriteria = urldecode($this->request->data['search']);
$this->set('groupergroupsowner', $this->GrouperGroup->getSearchedGroups($this->userId, $searchCriteria, 'groupMember'));
$this->set('groupergroupmemberships', $this->GrouperGroup->getSearchedGroups($this->userId, $searchCriteria, 'groupMember'));
$this->set('searchcriteria', $searchCriteria);
} else {
$this->set('groupergroupsmember', $this->GrouperGroup->filteredMemberOfGroups($this->userId));
$this->set('groupergroupmemberships', $this->GrouperGroup->filteredMemberOfGroups($this->userId));
}

}
Expand Down
17 changes: 9 additions & 8 deletions Lib/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,23 @@
'pl.grouperlite.config.grouper-un' => 'Username',
'pl.grouperlite.config.grouper-pw' => 'Password',

'pl.grouperlite.crumb.root' => 'Grouper groups',
'pl.grouperlite.nav.groups' => 'Groups',
'pl.grouperlite.nav.groups-presided' => 'Groups I preside over',
'pl.grouperlite.crumb.root' => 'Groups',
'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.create-group' => 'Create group',

'pl.grouperlite.title.root' => 'Grouper Groups:',
'pl.grouperlite.title.root' => 'Grouper Collaborations:',
'pl.grouperlite.title.groupinfo' => 'Group configuration and attributes',
'pl.grouperlite.title.groupowner' => 'Grouper Groups I Manage',
'pl.grouperlite.title.groupmember' => 'Grouper Groups I Belong To',
'pl.grouperlite.title.groupoptin' => 'Grouper Groups I Can Join',
'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.emaillistsinfo' => 'Email list configuration and attributes',
'pl.grouperlite.title.groupcreate' => 'Create Grouper Group',
'pl.grouperlite.title.groupcreate' => 'Create Group',

'pl.grouperlite.message.flash.join-group-success' => 'You have been added to the group!',
'pl.grouperlite.message.flash.join-group-failed' => 'You are unable to join the group!',
Expand Down
51 changes: 50 additions & 1 deletion View/CoGrouperLites/display.ctp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* COmanage Registry Services Widget Display View
*
Expand Down Expand Up @@ -31,6 +32,54 @@
// Figure out the widget ID so we can overwrite the dashboard's widget div
$divid = $vv_config['CoGrouperLite']['co_dashboard_widget_id'];
?>
<div class="row">
<div class="col-12 col-lg-6 col-xl-4">
<div class="list-group" style="border-radius: 0px">
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" href="<?php print $this->Html->url(
array(
'plugin' => "grouper_lite",
'controller' => 'GrouperGroups',
'action' => 'groupoptin',
'co' => $coid,
'glid' => $glid
)
); ?>">
<?php echo _txt('pl.grouperlite.nav.groups-can-join'); ?>
<i class="fa fa-arrow-right" aria-hidden="true"></i>

</a>
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" href="<?php print $this->Html->url(
array(
'plugin' => "grouper_lite",
'controller' => 'GrouperGroups',
'action' => 'groupowner',
'co' => $coid,
'glid' => $glid
)
); ?>">
<?php echo _txt('pl.grouperlite.nav.groups-presided'); ?>
<i class="fa fa-arrow-right" aria-hidden="true"></i>

<a rel="stylesheet" href="<?php print $vv_services_url; ?>">Click here</a>
</a>
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" href="<?php print $this->Html->url(
array(
'plugin' => "grouper_lite",
'controller' => 'GrouperGroups',
'action' => 'groupmember',
'co' => $coid,
'glid' => $glid
)
); ?>">
<?php echo _txt('pl.grouperlite.nav.memberships'); ?>
<i class="fa fa-arrow-right" aria-hidden="true"></i>

</a>
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" href="#" tabindex="-1" aria-disabled="true">
<?php echo _txt('pl.grouperlite.nav.email-lists'); ?>
</a>
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" href="#" tabindex="-1" aria-disabled="true">
<?php echo _txt('pl.grouperlite.nav.email-lists-managed'); ?>
</a>
</div>
</div>
</div>
88 changes: 50 additions & 38 deletions View/Elements/Components/navigation.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="nav-item">
<?php
print $this->Html->link(
_txt('pl.grouperlite.nav.groups'),
_txt('pl.grouperlite.nav.groups-can-join'),
array(
'controller' => 'groupergroups',
'action' => 'groupoptin'
Expand All @@ -13,50 +13,62 @@
?>
</div>
<div class="nav-item">
<?php
print $this->Html->link(
_txt('pl.grouperlite.nav.groups-presided'),
array(
'controller' => 'groupergroups',
'action' => 'groupowner'
),
array('class' => array('nav-link', $active == 'groupowner' ? 'active' : ''))
)
?>
<?php
print $this->Html->link(
_txt('pl.grouperlite.nav.memberships'),
array(
'controller' => 'groupergroups',
'action' => 'groupmember'
),
array('class' => array('nav-link', $active == 'groupmember' ? 'active' : ''))
)
?>
</div>
<div class="nav-item">
<?php
print $this->Html->link(
_txt('pl.grouperlite.nav.email-lists'),
array(
'controller' => 'groupergroups',
'action' => 'emaillistsoptin'
),
array('class' => array('nav-link', $active == 'emaillistsoptin' ? 'active' : ''))
)
?>
<?php
print $this->Html->link(
_txt('pl.grouperlite.nav.groups-presided'),
array(
'controller' => 'groupergroups',
'action' => 'groupowner'
),
array('class' => array('nav-link', $active == 'groupowner' ? 'active' : ''))
)
?>
</div>
<div class="nav-item">
<?php
print $this->Html->link(
_txt('pl.grouperlite.nav.email-lists-managed'),
array(
'controller' => 'groupergroups',
'action' => 'emaillistsmanaged'
),
array('class' => array('nav-link', $active == 'emaillistsmanaged' ? 'active' : ''))
)
?>
<?php
print $this->Html->link(
_txt('pl.grouperlite.nav.email-lists'),
array(
'controller' => 'groupergroups',
'action' => 'emaillistsoptin'
),
array('class' => array('nav-link', $active == 'emaillistsoptin' ? 'active' : ''))
)
?>
</div>
</div>
<div class="align-self">
<?php
$createGroupUrl = $this->Html->url(
<div class="nav-item">
<?php
print $this->Html->link(
_txt('pl.grouperlite.nav.email-lists-managed'),
array(
'controller' => 'groupergroups',
'action' => 'groupcreateform'
)
);
'action' => 'emaillistsmanaged'
),
array('class' => array('nav-link', $active == 'emaillistsmanaged' ? 'active' : ''))
)
?>
</div>
</div>
<div class="align-self">
<?php
$createGroupUrl = $this->Html->url(
array(
'controller' => 'groupergroups',
'action' => 'groupcreateform'
)
);
?>
<a href="<?php echo $createGroupUrl; ?>" class="btn btn-link px-3 py-2">
<i class="fa fa-plus-circle"></i>&nbsp; <?php echo _txt('pl.grouperlite.nav.create-group'); ?>
Expand Down
2 changes: 0 additions & 2 deletions View/GrouperGroups/base.ctp
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?php
print $this->Html->css('GrouperLite.bootstrap') . "\n ";
print $this->Html->css('GrouperLite.co-grouper-base') . "\n ";
print $this->Html->css('GrouperLite.co-grouper-plugin') . "\n ";
?>
<!-- Load JavaScript -->
<?php /* only JQuery here - other scripts at bottom */
print $this->Html->script('GrouperLite.bootstrap.bundle.js') . "\n ";
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));
Expand Down
39 changes: 39 additions & 0 deletions View/GrouperGroups/groupmember.ctp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php $this->extend('/GrouperGroups/base'); ?>
<?php $this->Html->addCrumb(_txt('pl.grouperlite.nav.memberships')); ?>
<?php echo $this->element('GrouperLite.Components/navigation', array('active' => 'groupmember')); ?>
<?php echo $this->element('GrouperLite.Components/search', array('active' => 'groupmember')); ?>
<div class="">
<table class="table table-striped w-100">
<thead>
<tr>
<th class="group name"><?php echo _txt('pl.grouperlite.table.name'); ?></th>
<th class="group description"><?php echo _txt('pl.grouperlite.table.description'); ?></th>
<th class="group status"><?php echo _txt('pl.grouperlite.table.status'); ?></th>
<th class="group action"><?php echo _txt('pl.grouperlite.table.action'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($groupergroupmemberships as $group) : ?>
<tr>
<td><?php echo $this->Html->link(
isset($group['friendlyName']) ? $group['friendlyName'] : "No Name",
array(
'controller' => 'groupergroups',
'action' => 'groupinfo',
'?' => array('groupname' => urlencode($group['name']))
)
) ?></td>
<td><?php echo isset($group['description']) ? $group['description'] : _txt('pl.grouperlite.value.descr.zerostate'); ?></td>
<td><?php echo isset($group['enabled']) && $group['enabled'] === 'T' ? _txt('pl.grouperlite.value.enabled') : _txt('pl.grouperlite.value.disabled'); ?></td>
<td>
<?php echo $this->element('GrouperLite.Components/optAction', array(
'member' => $group['member'],
'action' => $group['member'] ? 'leavegroup' : 'joingroup',
'group' => $group['name']
)); ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
2 changes: 1 addition & 1 deletion View/GrouperGroups/groupoptin.ctp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<?php $this->extend('/GrouperGroups/base'); ?>
<?php $this->Html->addCrumb('Groups I can join'); ?>
<?php $this->Html->addCrumb(_txt('pl.grouperlite.nav.groups-can-join')); ?>
<?php echo $this->element('GrouperLite.Components/navigation', array('active' => 'groupoptin')); ?>
<?php echo $this->element('GrouperLite.Components/search', array('active' => 'groupoptin')); ?>
<div class="">
Expand Down
Loading

0 comments on commit 4336bae

Please sign in to comment.