Skip to content

Commit

Permalink
changes for goto Grouper button
Browse files Browse the repository at this point in the history
  • Loading branch information
axel committed Sep 27, 2021
1 parent be89637 commit eab560f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Controller/GrouperGroupsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -738,9 +738,10 @@ private function breakoutGroups(array $recordSet, $type = 'basic') {
foreach ($wgRec['Groups'] as $rec) {
if (isset($rec['optOut'])) {
$wgRec['optOut'] = true;
$wgRec['workingGroupId'] = $rec['name'];
$wgRec['workingDesc'] = $this->hackDescription($rec['description']);
}
$wgRec['workingGroupId'] = $rec['name'];
$wgRec['workingGroupUUID'] = $rec['uuid'];
$wgRec['workingDesc'] = $this->hackDescription($rec['description']);
//Capturing record for incommon-collab since deleting a few lines below.
if ($rec['WGApp'] == 'incommon-collab') {
$recToDelete = $subCount;
Expand All @@ -758,6 +759,7 @@ private function breakoutGroups(array $recordSet, $type = 'basic') {
//Working Groups that will show up on the Optin Page
foreach ($wgData as &$wgRec) {
$wgRec['workingGroupId'] = $wgRec['Groups'][0]['name'];
$wgRec['workingGroupUUID'] = $wgRec['Groups'][0]['uuid'];
$wgRec['workingDesc'] = $this->hackDescription($wgRec['Groups'][0]['description']);
unset($wgRec['Groups']);
}
Expand Down
12 changes: 10 additions & 2 deletions View/GrouperGroups/groupmember.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,15 @@ $numColumns = count($columns);
)) : ''; ?>
<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>
<?php if ($isuserowner === 'T') : ?>
<a href="<?php echo $groupUrlBase . $groupergroupsdetail['uuid']; ?>" class="btn btn-grouper btn-block btn-sm btn-success mt-0 text-nowrap" target="_blank" role="button">
<?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>
Expand Down Expand Up @@ -120,7 +128,7 @@ $numColumns = count($columns);
$attrOperation = '?operation=UiV2AttributeDefName.viewAttributeDefName&attributeDefNameId=';
$attrUrlBase = $baseUrl . $path . $attrOperation;
?>
<a href="<?php echo $groupUrlBase . $wggroup['workingGroupId']; ?>" class="btn btn-grouper btn-block btn-sm btn-success mt-0 text-nowrap" target="_blank" role="button">
<a href="<?php echo $groupUrlBase . $wggroup['workingGroupUUID']; ?>" 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>
Expand Down

0 comments on commit eab560f

Please sign in to comment.