-
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
13 changed files
with
490 additions
and
317 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
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,118 @@ | ||
| <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 app = Vue.createApp({ | ||
| data() { | ||
| return { | ||
| groups: <?php echo $groupData; ?>, | ||
| columns: <?php echo $columns; ?>, | ||
| config: { | ||
| adhocHeading: "<?php echo $config['adHocHeading'] ? $config['adHocHeading'] : 'Ad-hoc groups' ; ?>", | ||
| wgHeading: "<?php echo $config['wgHeading'] ? $config['wgHeading'] : 'Working groups' ; ?>", | ||
| collapsed: <?php print $collapsed ? 'true' : 'false'; ?>, | ||
| optAction: "<?php echo $optAction; ?>", | ||
| members: <?php echo $members ? 'true' : 'false' ?>, | ||
| add: <?php echo $addSubscribers ? 'true' : 'false' ?> | ||
| }, | ||
| owner: <?php echo $treatAsOwner ? 'true' : 'false'; ?>, | ||
| url: "<?php echo $actionUrl; ?>", | ||
| } | ||
| }, | ||
| provide: { | ||
| txt: { | ||
| groups: "<?php echo _txt('pl.grouperlite.dashboard.heading.groups'); ?>", | ||
| leave: "<?php echo _txt('pl.grouperlite.action.leave') ?>", | ||
| descrZeroState: "<?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') ?>" | ||
| }, | ||
| api: { | ||
| co: 1, | ||
| 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", | ||
| }, | ||
| }, | ||
| mounted() { | ||
| if (!this.owner) { | ||
| this.columns = this.columns.filter(c => c.value !== 'role'); | ||
| } | ||
| }, | ||
| components: { | ||
| GrouperGroupsView | ||
| } | ||
| }).mount('#grouper-lite-widget'); | ||
| </script> | ||
|
|
||
| <style> | ||
| .ui-autocomplete { | ||
| max-height: 220px; | ||
| overflow-y: auto; | ||
| overflow-x: hidden; | ||
| padding-right: 20px; | ||
| } | ||
| </style> | ||
|
|
||
| <div class="grouper-table"> | ||
| <?php print $this->element("pagination", array( | ||
| 'goto' => false, | ||
| 'limit' => false, | ||
| 'numbers' => false, | ||
| 'counter' => true, | ||
| 'class' => 'counter' | ||
| )); ?> | ||
| <div id="grouper-lite-widget"> | ||
| <grouper-groups-view | ||
| :groups="groups" | ||
| :columns="columns" | ||
| :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' => $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> | ||
|
|
||
| <?php print $this->element("pagination", array( | ||
| 'goto' => false, | ||
| 'limit' => true, | ||
| 'numbers' => true, | ||
| 'counter' => false | ||
| )); ?> | ||
| </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
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
Oops, something went wrong.