Skip to content

Commit

Permalink
Merge branch 'develop' into October2022
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel Stohn authored and Axel Stohn committed Nov 4, 2022
2 parents 108de3e + 55374bb commit 5f06f11
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 31 deletions.
46 changes: 25 additions & 21 deletions View/Elements/Components/subscriberList.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,35 @@
<p>You do not have access to view memberships.</p>
</div>
<div class="modal-body subs">
<?php if ($addSubscribers) : ?>
<div class="d-flex mb-4">
<?php echo $this->Form->create(false, array(
'url' => array('controller' => 'grouper_groups', 'action' => 'groupSubscribers'),
'class' => 'add-user-form w-100',
'id' => 'add-user-form',
)); ?>
<label class="sr-only" for="addUser"><?php echo _txt('pl.grouperlite.search.tags.text'); ?></label>
<div class="input-group">
<?php echo $this->Form->input("addUser", array('label' => false, 'class' => 'form-control', 'value' => isset($searchcriteria) ? $searchcriteria : '')) ?>
<!--<input type="text" name="search" class="form-control" value="<?php echo isset($searchcriteria) ? $searchcriteria : ''; ?>" /> -->

<div class="input-group-append">
<button id="addUserbutton" class=" btn btn-grouper btn-primary px-4" type="submit" value="Submit">
<em class="material-icons lg" aria-hidden="true">add</em>
<span class="ml-2"><?php echo _txt('pl.grouperlite.action.add-user'); ?></span>
</button>
</div>

<div class="d-flex mb-4">
<?php echo $this->Form->create(false, array(
'url' => array('controller' => 'grouper_groups', 'action' => 'groupSubscribers'),
'class' => 'add-user-form w-100',
'id' => 'add-user-form',
)); ?>
<label class="sr-only" for="addUser"><?php echo _txt('pl.grouperlite.search.tags.text'); ?></label>
<div class="input-group">
<?php echo $this->Form->input("addUser", array('label' => false, 'class' => 'form-control', 'value' => isset($searchcriteria) ? $searchcriteria : '')) ?>
<!--<input type="text" name="search" class="form-control" value="<?php echo isset($searchcriteria) ? $searchcriteria : ''; ?>" /> -->
<div class="input-group-append">
<button id="addUserbutton" class=" btn btn-grouper btn-primary px-4" type="submit" value="Submit">
<em class="material-icons lg" aria-hidden="true">add</em>
<span class="ml-2"><?php echo _txt('pl.grouperlite.action.add-user'); ?></span>
</button>
</div>
<?php echo $this->Form->end(); ?>
</div>
<div>
<p class="alert alert-danger error"></p>
</div>
<?php echo $this->Form->end(); ?>
</div>
<div>
<p class="alert alert-danger error"></p>
</div>
<?php endif; ?>
<table class="table table-striped">
<tbody id="sub-body"></tbody>
</table>

</div>
<div class="modal-footer d-flex justify-content-end">
<button type="button" class="btn btn-grouper btn-link" data-dismiss="modal"><?php echo _txt('pl.grouperlite.action.close'); ?></button>
Expand Down Expand Up @@ -208,9 +210,11 @@
"class" => "remove-user-form",
"id" => "remove-user-form"
)); ?>',
<?php if ($addSubscribers) : ?>
'<button data-user="' + item.id + '" class="btn btn-grouper btn-block btn-primary btn-sm m-1 text-nowrap member-del-btn">',
'<?php echo _txt('pl.grouperlite.action.remove-user'); ?>',
'</button>',
<?php endif; ?>
'<?php echo $this->Form->end(); ?>',
'</td>',
'</tr>'
Expand Down
6 changes: 3 additions & 3 deletions View/GrouperGroups/base.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ $this->Html->addCrumb(_txt('pl.grouperlite.crumb.root'), array('controller' => '
$('.grouper-table .collapse-btn').on('click', function(ev) {
var btn = $(ev.currentTarget);
if (btn.hasClass('collapsed')) {
btn.find('em.material-icons').text('arrow_right');
} else {
btn.find('em.material-icons').text('arrow_drop_down');
} else {
btn.find('em.material-icons').text('arrow_right');
}
});

$('.collapse-wg-working-group-parent').on('hide.bs.collapse', function(ev) {
$(this).siblings('.collapse-wg-working-group').collapse('hide');
$(this).parent().find('.collapse-btn .material-icons').text('arrow_drop_down');
$(this).parent().find('.collapse-btn .material-icons').text('arrow_right');
});
</script>
8 changes: 4 additions & 4 deletions View/GrouperGroups/groupmember.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $collapsed = $config['defaultCollapse'] === 'collapsed' ? true : false;
<td colspan="<?php echo $numColumns; ?>">
<button type="button" class="btn btn-link btn-text collapse-btn <?php echo $collapsed ? 'collapsed' : ''; ?> fw-bold m-0" data-toggle="collapse" data-target=".collapse-adhoc-group-parent" role="button" aria-expanded="<?php echo $collapsed ? 'false' : 'true'; ?>">
<?php echo $config['adHocHeading'] ?? 'Ad-hoc groups'; ?>
<em class="material-icons mt-0" aria-hidden="true"><?php echo $collapsed ? 'arrow_drop_down' : 'arrow_right' ?></em>
<em class="material-icons mt-0" aria-hidden="true"><?php echo $collapsed ? 'arrow_right' : 'arrow_drop_down' ?></em>
</button>
</td>
</tr>
Expand Down Expand Up @@ -79,7 +79,7 @@ $collapsed = $config['defaultCollapse'] === 'collapsed' ? true : false;
<td colspan="<?php echo $numColumns; ?>">
<button type="button" class="btn btn-link btn-text <?php echo $collapsed ? 'collapsed' : ''; ?> collapse-btn fw-bold m-0 work-group-heading-btn" data-toggle="collapse" data-target=".collapse-wg-working-group-parent" role="button" aria-expanded="<?php echo $collapsed ? 'false' : 'true'; ?>">
<?php echo $config['wgHeading'] ?? 'Working groups'; ?>
<em class="material-icons mt-0" aria-hidden="true"><?php echo $collapsed ? 'arrow_drop_down' : 'arrow_right' ?></em>
<em class="material-icons mt-0" aria-hidden="true"><?php echo $collapsed ? 'arrow_right' : 'arrow_drop_down' ?></em>
</button>
</td>
</tr>
Expand All @@ -95,7 +95,7 @@ $collapsed = $config['defaultCollapse'] === 'collapsed' ? true : false;
<?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>
<em class="material-icons mt-0" aria-hidden="true"><?php echo $collapsed ? 'arrow_right' : 'arrow_drop_down' ?></em>
</span>
</button>
</td>
Expand Down Expand Up @@ -143,5 +143,5 @@ $collapsed = $config['defaultCollapse'] === 'collapsed' ? true : false;
</div>
<?php endif; ?>

<?php echo $this->element('Components/subscriberList'); ?>
<?php echo $this->element('Components/subscriberList', array('addSubscribers' => false)); ?>
<!--/nocache-->
2 changes: 1 addition & 1 deletion View/GrouperGroups/groupoptin.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $collapsed = $config['defaultCollapse'] === 'collapsed' ? true : false;
<td colspan="<?php echo $numColumns; ?>">
<button type="button" class="btn btn-link btn-text collapse-btn <?php echo $collapsed ? 'collapsed' : ''; ?> fw-bold m-0" data-toggle="collapse" data-target=".collapse-adhoc-group-parent" role="button" aria-expanded="<?php echo $collapsed ? 'false' : 'true'; ?>">
<?php echo $config['adHocHeading'] ?? 'Ad-hoc groups'; ?>
<em class="material-icons mt-0" aria-hidden="true"><?php echo $collapsed ? 'arrow_drop_down' : 'arrow_right' ?></em>
<em class="material-icons mt-0" aria-hidden="true"><?php echo $collapsed ? 'arrow_right' : 'arrow_drop_down' ?></em>
</button>
</td>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions View/GrouperGroups/groupowner.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $collapsed = $config['defaultCollapse'] === 'collapsed' ? true : false;
<td colspan="<?php echo $numColumns; ?>">
<button type="button" class="btn btn-link btn-text collapse-btn <?php echo $collapsed ? 'collapsed' : ''; ?> fw-bold m-0" data-toggle="collapse" data-target=".collapse-adhoc-group-parent" role="button" aria-expanded="<?php echo $collapsed ? 'false' : 'true'; ?>">
<?php echo $config['adHocHeading'] ?? 'Ad-hoc groups'; ?>
<em class="material-icons mt-0" aria-hidden="true"><?php echo $collapsed ? 'arrow_drop_down' : 'arrow_right' ?></em>
<em class="material-icons mt-0" aria-hidden="true"><?php echo $collapsed ? 'arrow_right' : 'arrow_drop_down' ?></em>
</button>
</td>
</tr>
Expand Down Expand Up @@ -115,5 +115,5 @@ $collapsed = $config['defaultCollapse'] === 'collapsed' ? true : false;
<p class="lead mb-0 text-center"><?php echo _txt('pl.grouperlite.groups.zero-state'); ?></p>
</div>
<?php endif; ?>
<?php echo $this->element('Components/subscriberList'); ?>
<?php echo $this->element('Components/subscriberList', array('addSubscribers' => true)); ?>
<!--/nocache-->

0 comments on commit 5f06f11

Please sign in to comment.