Skip to content

Commit

Permalink
Added buttons to groups I manage page
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Sep 27, 2021
1 parent eab560f commit a88a1cb
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 24 deletions.
22 changes: 11 additions & 11 deletions View/GrouperGroups/groupmember.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,17 @@ $numColumns = count($columns);
'group' => $group['name'],
'idx' => $key
)) : ''; ?>
<button class="btn btn-grouper btn-block btn-primary btn-sm my-1 text-nowrap" data-toggle="modal" data-target="#subscribers"><?php echo _txt('pl.grouperlite.action.members'); ?> <i class="fa fa-group"></i></button>
<button class="btn btn-grouper btn-block btn-primary btn-sm my-1 text-nowrap members-btn"
data-id="<?php echo urlencode($group['name']); ?>"><?php echo _txt('pl.grouperlite.action.members'); ?> <i class="fa fa-group"></i></button>
<?php if ($isuserowner === 'T') : ?>
<?php
$baseUrl = $grouperbaseurl;
$path = '/grouper/grouperUi/app/UiV2Main.index';
$groupOperation = '?operation=UiV2Group.viewGroup&groupId=';
$groupUrlBase = $baseUrl . $path . $groupOperation;
$attrOperation = '?operation=UiV2AttributeDefName.viewAttributeDefName&attributeDefNameId=';
$attrUrlBase = $baseUrl . $path . $attrOperation;
?>
<?php
$baseUrl = $grouperbaseurl;
$path = '/grouper/grouperUi/app/UiV2Main.index';
$groupOperation = '?operation=UiV2Group.viewGroup&groupId=';
$groupUrlBase = $baseUrl . $path . $groupOperation;
$attrOperation = '?operation=UiV2AttributeDefName.viewAttributeDefName&attributeDefNameId=';
$attrUrlBase = $baseUrl . $path . $attrOperation;
?>
<a href="<?php echo $groupUrlBase . $group['uuid']; ?>" class="btn btn-grouper btn-block btn-sm btn-success mt-0 text-nowrap" target="_blank" role="button">
<?php echo _txt('pl.grouperlite.action.grouper'); ?> &nbsp;
<i class="fa fa-external-link"></i>
Expand Down Expand Up @@ -115,8 +116,7 @@ $numColumns = count($columns);
'group' => $wggroup['workingGroupId'],
'idx' => $key
)) : ''; ?>
<button class="btn btn-grouper btn-block btn-primary btn-sm my-1 text-nowrap members-btn"
data-id="<?php echo $wggroup['WGName']; ?>">
<button class="btn btn-grouper btn-block btn-primary btn-sm my-1 text-nowrap members-btn" data-id="<?php echo $wggroup['WGName']; ?>">
<?php echo _txt('pl.grouperlite.action.members'); ?> <i class="fa fa-group"></i>
</button>
<?php if ($isuserowner === 'T') : ?>
Expand Down
63 changes: 50 additions & 13 deletions View/GrouperGroups/groupowner.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,34 @@ $numColumns = count($columns);
<td><?php echo $group['description'] ?? "No Description"; ?></td>
<td><?php echo isset($group['enabled']) && $group['enabled'] === 'T' ? 'Enabled' : 'Disabled'; ?></td>
<td class="text-center">
<span class="d-flex flex-column flex-lg-row justify-content-center align-items-center">
<button class="btn btn-grouper btn-sm btn-primary" disabled>
<span class="btn-group d-flex flex-row justify-content-center align-items-center">
<button class="btn btn-sm btn-grouper btn-primary text-nowrap" disabled>
<?php echo _txt('pl.grouperlite.action.edit-group'); ?> &nbsp;
<i class="fa fa-pencil fa-sm"></i>
</button>
<?php /*<button class="btn btn-grouper btn btn-danger ml-1 mt-0" disabled>
<?php echo _txt('pl.grouperlite.action.disable-group'); ?> &nbsp;
<i class="fa fa-ban fa-sm"></i>
</button>*/ ?>
<?php echo $group['optOut'] ? $this->element('GrouperLite.Components/optAction', array(
'member' => $group['optOut'],
'action' => 'leavegroup',
'group' => $group['name'],
'idx' => $key
)) : ''; ?>
<button class="btn btn-grouper btn-block btn-primary btn-sm my-1 text-nowrap members-btn" data-id="<?php echo urlencode($group['name']) ?>">
<?php echo _txt('pl.grouperlite.action.members'); ?> <i class="fa fa-group"></i>
</button>
<?php if ($isuserowner === 'T') : ?>
<?php
$baseUrl = $grouperbaseurl;
$path = '/grouper/grouperUi/app/UiV2Main.index';
$groupOperation = '?operation=UiV2Group.viewGroup&groupId=';
$groupUrlBase = $baseUrl . $path . $groupOperation;
$attrOperation = '?operation=UiV2AttributeDefName.viewAttributeDefName&attributeDefNameId=';
$attrUrlBase = $baseUrl . $path . $attrOperation;
?>
<a href="<?php echo $groupUrlBase . $group['uuid']; ?>" class="btn btn-grouper btn-block btn-sm btn-success mt-0 text-nowrap" target="_blank" role="button">
<?php echo _txt('pl.grouperlite.action.grouper'); ?> &nbsp;
<i class="fa fa-external-link"></i>
</a>
<?php endif ?>
</span>
</td>
</tr>
Expand Down Expand Up @@ -106,15 +125,32 @@ $numColumns = count($columns);
<td><?php echo $group['description'] ?? _txt('pl.grouperlite.value.descr.zerostate'); ?></td>
<td><?php echo isset($group['enabled']) && $group['enabled'] === 'T' ? 'Enabled' : 'Disabled'; ?></td>
<td class="text-center">
<span class="d-flex flex-column flex-lg-row justify-content-between align-items-center">
<button class="btn btn-grouper btn-primary btn-sm" disabled>
<span class="btn-group d-flex flex-row justify-content-center align-items-center">
<button class="btn btn-grouper btn-primary btn-sm text-nowrap" disabled>
<?php echo _txt('pl.grouperlite.action.edit-group'); ?> &nbsp;
<i class="fa fa-pencil fa-sm"></i>
</button>
<?php /*echo <button class="btn btn-grouper btn btn-danger btn btn-block ml-1 mt-0" disabled>
<?php echo _txt('pl.grouperlite.action.disable-group'); ?> &nbsp;
<i class="fa fa-ban fa-sm"></i>
</button>*/ ?>
<?php echo $group['optOut'] ? $this->element('GrouperLite.Components/optAction', array(
'member' => $group['optOut'],
'action' => 'leavegroup',
'group' => $group['name'],
'idx' => $key
)) : ''; ?>
<button class="btn btn-grouper btn-block btn-primary btn-sm my-1 text-nowrap members-btn" data-id="<?php echo urlencode($group['name']) ?>"><?php echo _txt('pl.grouperlite.action.members'); ?> <i class="fa fa-group"></i></button>
<?php if ($isuserowner === 'T') : ?>
<?php
$baseUrl = $grouperbaseurl;
$path = '/grouper/grouperUi/app/UiV2Main.index';
$groupOperation = '?operation=UiV2Group.viewGroup&groupId=';
$groupUrlBase = $baseUrl . $path . $groupOperation;
$attrOperation = '?operation=UiV2AttributeDefName.viewAttributeDefName&attributeDefNameId=';
$attrUrlBase = $baseUrl . $path . $attrOperation;
?>
<a href="<?php echo $groupUrlBase . $group['uuid']; ?>" class="btn btn-grouper btn-block btn-sm btn-success mt-0 text-nowrap" target="_blank" role="button">
<?php echo _txt('pl.grouperlite.action.grouper'); ?> &nbsp;
<i class="fa fa-external-link"></i>
</a>
<?php endif ?>
</span>
</td>
</tr>
Expand All @@ -134,4 +170,5 @@ $numColumns = count($columns);
<div class="alert alert-info">
<p class="lead mb-0 text-center"><?php echo _txt('pl.grouperlite.groups.zero-state'); ?></p>
</div>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->element('Components/subscriberList'); ?>

0 comments on commit a88a1cb

Please sign in to comment.