-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
747 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,149 @@ | ||
| <!--nocache--> | ||
| <?php $this->extend('/GrouperGroups/base'); ?> | ||
| <?php $this->Html->addCrumb(_txt('pl.grouperlite.nav.memberships')); ?> | ||
| <!--/nocache--> | ||
|
|
||
| <script type="module"> | ||
| <?php if(Configure::read('debug') > 0): ?> | ||
| import GrouperGroupsView from '<?php print $this->webroot ?>grouper_lite/js/grouper-groups-view.js?time=<?php print time()?>'; | ||
| <?php else: ?> | ||
| import GrouperGroupsView from '<?php print $this->webroot ?>grouper_lite/js/grouper-groups-view.js'; | ||
| <?php endif; ?> | ||
|
|
||
| const columns = <?php print_r(json_encode(array( | ||
| array('value' => 'name', 'label' => _txt('pl.grouperlite.table.name')), | ||
| array('value' => 'role', 'label' => _txt('pl.grouperlite.table.role')), | ||
| array('value' => 'description', 'label' => _txt('pl.grouperlite.table.description')), | ||
| array('value' => 'status', 'label' => _txt('pl.grouperlite.table.status')), | ||
| array('value' => 'action', 'label' => _txt('pl.grouperlite.table.action')), | ||
| ))) ?> | ||
|
|
||
|
|
||
| const app = Vue.createApp({ | ||
| data() { | ||
| return { | ||
| config: { | ||
| adhocHeading: "<?php echo $config['adHocHeading'] ? $config['adHocHeading'] : 'Ad-hoc groups' ; ?>", | ||
| wgHeading: "<?php echo $config['wgHeading'] ? $config['wgHeading'] : 'Working groups' ; ?>", | ||
| collapsed: <?php echo $config['defaultCollapse'] == 'collapsed' ? 'true' : 'false'; ?>, | ||
| optAction: "<?php echo isset($optAction) ? $optAction : 'none'; ?>", | ||
| members: <?php echo isset($members) && $members ? 'true' : 'false' ?>, | ||
| add: <?php echo isset($addSubscribers) && $addSubscribers ? 'true' : 'false' ?> | ||
| }, | ||
| owner: <?php echo $treatAsOwner ? 'true' : 'false'; ?>, | ||
| url: "<?php echo isset($actionUrl) ? $actionUrl : 'null'; ?>", | ||
| } | ||
| }, | ||
| provide: { | ||
| txt: { | ||
| search: "<?php echo _txt('pl.grouperlite.title.search'); ?>", | ||
| searchForGroups: "<?php echo _txt('pl.grouperlite.action.search'); ?>", | ||
| first: "<?php echo _txt('op.first'); ?>", | ||
| last: "<?php echo _txt('op.last'); ?>", | ||
| previous: "<?php echo _txt('op.previous'); ?>", | ||
| next: "<?php echo _txt('op.next'); ?>", | ||
| groups: "<?php echo _txt('pl.grouperlite.dashboard.heading.groups'); ?>", | ||
| leave: "<?php echo _txt('pl.grouperlite.action.leave') ?>", | ||
| zero: { | ||
| description: "<?php echo _txt('pl.grouperlite.value.descr.zerostate') ?>", | ||
| }, | ||
| members: "<?php echo _txt('pl.grouperlite.action.members') ?>", | ||
| email: "<?php echo _txt('pl.grouperlite.value.email') ?>", | ||
| close: "<?php echo _txt('pl.grouperlite.action.close') ?>", | ||
| remove: "<?php echo _txt('pl.grouperlite.action.remove-user') ?>", | ||
| addUser: "<?php echo _txt('pl.grouperlite.action.add-user') ?>", | ||
| search: "<?php echo _txt('pl.grouperlite.search.tags.text') ?>", | ||
| noaccess: "<?php echo _txt('pl.grouperlite.members.noaccess') ?>", | ||
| empty: "<?php echo _txt('pl.grouperlite.members.empty') ?>", | ||
| join: "<?php echo _txt('pl.grouperlite.action.join') ?>", | ||
| }, | ||
| columns, | ||
| api: { | ||
| co: <?php echo $config['co'] ?>, | ||
| mode: "<?php echo PeoplePickerModeEnum::All ?>", | ||
| base: "<?php echo $this->webroot ?>grouper_lite/grouper_groups", | ||
| find: "<?php echo $this->Html->url( | ||
| array( | ||
| 'controller' => 'grouper_groups', | ||
| 'action' => 'findSubscriber' | ||
| ) | ||
| ); ?>", | ||
| remove: "<?php echo $this->webroot ?>grouper_lite/grouper_groups/removeSubscriber", | ||
| add: "<?php echo $this->webroot ?>grouper_lite/grouper_groups/addSubscriber", | ||
| group: "<?php echo $this->webroot ?>grouper_lite/grouper_groups/groupSubscribers", | ||
| }, | ||
| tabs: [ | ||
| { | ||
| order: 1, | ||
| label: "<?php echo _txt('pl.grouperlite.nav.memberships') ?>", | ||
| id: 'memberships', | ||
| api: "<?php echo $this->webroot ?>grouper_lite/files/groupmember.json?time=<?php print time()?>", | ||
| columns: ['name', 'role', 'description', 'action'], | ||
| members: true, | ||
| action: 'leavegroup', | ||
| addSubscribers: false | ||
| }, | ||
| { | ||
| order: 2, | ||
| label: "<?php echo _txt('pl.grouperlite.nav.groups-can-join') ?>", | ||
| id: 'join', | ||
| api: "<?php echo $this->webroot ?>grouper_lite/files/groupoptin.json?time=<?php print time()?>", | ||
| columns: ['name', 'description', 'action'], | ||
| members: false, | ||
| action: 'joingroup', | ||
| addSubscribers: false | ||
| }, | ||
| { | ||
| order: 3, | ||
| label: "<?php echo _txt('pl.grouperlite.nav.groups-presided') ?>", | ||
| id: 'manage', | ||
| api: "<?php echo $this->webroot ?>grouper_lite/files/groupowner.json?time=<?php print time()?>", | ||
| columns: ['name', 'role', 'description', 'status', 'action'], | ||
| members: true, | ||
| addSubscribers: true | ||
| }, | ||
| ] | ||
| }, | ||
| components: { | ||
| GrouperGroupsView | ||
| } | ||
| }).mount('#grouper-lite-widget'); | ||
| </script> | ||
|
|
||
| <style> | ||
| .ui-autocomplete { | ||
| max-height: 240px; | ||
| overflow-y: auto; | ||
| overflow-x: hidden; | ||
| padding-right: 20px; | ||
| } | ||
| </style> | ||
|
|
||
| <div class="grouper-table"> | ||
| <div id="grouper-lite-widget"> | ||
| <grouper-groups-view | ||
| :config="config" | ||
| :owner="owner" | ||
| :action="config.optAction" | ||
| :url="url" | ||
| > | ||
| <template v-slot:actionform="actionform"> | ||
| <?php echo $this->Form->create(false, array( | ||
| 'url' => array('controller' => 'grouper_groups', 'action' => isset($optAction) ? $optAction : ''), | ||
| 'class' => 'd-flex justify-content-center', | ||
| 'id' => 'group-action' | ||
| )); ?> | ||
| <input type="hidden" name="data[GroupName]" :value="actionform.groupname" /> | ||
| <input type="hidden" name="data[GroupDisplayName]" :value="actionform.groupdisplayname" /> | ||
| <button | ||
| :class="actionform.actiontype" | ||
| class="btn btn-sm btn-block text-nowrap m-1 btn-success" type="submit"> | ||
| {{ actionform.actionlabel }} | ||
| | ||
| <em class="material-icons mt-0" aria-hidden="true">{{ actionform.actionicon }}</em> | ||
| </button> | ||
| <?php echo $this->Form->end(null); ?> | ||
| </template> | ||
| </grouper-groups-view> | ||
| </div> | ||
| </div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.