Skip to content

Commit

Permalink
Added popover for working group names
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Sep 23, 2022
1 parent 8b9539c commit f9cb1ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
4 changes: 4 additions & 0 deletions View/Elements/base-styles.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@
animation: fadeInHalf 0.9s -0.3s infinite reverse;
}

.popover {
max-width: 400px;
}

@keyframes fadeInHalf {
from {
opacity: 0.5;
Expand Down
21 changes: 8 additions & 13 deletions View/GrouperGroups/groupmember.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,11 @@ $collapsed = $config['defaultCollapse'] === 'collapsed' ? true : false;
<tr class="table-light <?php echo $collapsed ? 'collapse' : 'show'; ?> collapse-wg-working-group-parent">
<td colspan="<?php echo $numColumns - 2; ?>">
<button type="button" class="btn btn-link btn-text collapse-btn fw-bold m-0 <?php echo $collapsed ? 'collapsed' : ''; ?>" data-toggle="collapse" data-target=".collapse-wg-<?php echo $wggroup['WGName']; ?>" role="button" aria-expanded="<?php echo $collapsed ? 'false' : 'true'; ?>">
<?php echo $wggroup['WGShowName'] ?? "No Name"; ?>
<em class="material-icons mt-0" aria-hidden="true"><?php echo $collapsed ? 'arrow_drop_down' : 'arrow_right' ?></em>
<?php $name = $wggroup['workingGroupId']; ?>
<span class="grpr-popover-toggle" data-container="body" data-toggle="popover" data-placement="top" data-content="<?php echo substr($name, 0, strrpos($name, ':')); ?>" data-trigger="click">
<?php echo $wggroup['WGShowName'] ?? "No Name"; ?>
<em class="material-icons mt-0" aria-hidden="true"><?php echo $collapsed ? 'arrow_drop_down' : 'arrow_right' ?></em>
</span>
</button>
</td>
<td>
Expand All @@ -108,23 +111,15 @@ $collapsed = $config['defaultCollapse'] === 'collapsed' ? true : false;
<button class="btn btn-grouper btn-block btn-primary btn-sm m-1 text-nowrap members-btn" data-id="<?php echo $wggroup['WGName']; ?>">
<?php echo _txt('pl.grouperlite.action.members'); ?> <em class="material-icons mt-0" aria-hidden="true">group</em>
</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 endif ?>
</span>
</td>
</tr>
<?php foreach ($wggroup['Groups'] as $key => $group) : ?>
<tr class="<?php echo $collapsed ? 'collapse' : 'show'; ?> collapse-wg-working-group collapse-wg-<?php echo $wggroup['WGName']; ?>" id="collapse-wg-<?php echo $wggroup['WGName'] . '-' . $key; ?>">
<td class="pl-3">
<?php echo $group['WGApp'] ?? "No Name"; ?>
<span class="grpr-popover-toggle" data-container="body" data-toggle="popover" data-placement="top" data-content="<?php echo $group['name']; ?>">
<?php echo $group['WGApp'] ?? "No Name"; ?>
</span>
</td>
<?php if ($isuserowner === 'T') : ?>
<td><?php echo $group['WGRole'] ?? _txt('pl.grouperlite.value.descr.zerostate'); ?></td>
Expand Down

0 comments on commit f9cb1ed

Please sign in to comment.