From 47745d1b17ba58f6cf07ccdbada289162d80cb94 Mon Sep 17 00:00:00 2001 From: Ryan Mathis Date: Tue, 9 Mar 2021 07:38:45 -0700 Subject: [PATCH] Updated subscriber list, pagination --- Controller/GrouperGroupsController.php | 20 +- View/Elements/Components/groupattributes.ctp | 7 +- View/Elements/Components/subscriberList.ctp | 2 +- View/GrouperGroups/groupinfo.ctp | 650 +------------------ webroot/css/co-grouper-plugin.css | 10 +- 5 files changed, 54 insertions(+), 635 deletions(-) diff --git a/Controller/GrouperGroupsController.php b/Controller/GrouperGroupsController.php index 5aedb0f..871a95b 100644 --- a/Controller/GrouperGroupsController.php +++ b/Controller/GrouperGroupsController.php @@ -111,6 +111,8 @@ public function index() { public function groupInfo() { $name = urldecode($this->request->query['groupname']); + $this->set('isuserowner', $this->GrouperGroup->isUserOwner($this->userId)); + $this->set('title', _txt('pl.grouperlite.title.groupinfo')); try { @@ -123,6 +125,16 @@ public function groupInfo() { $this->set('groupergroupsdetail', array()); $this->Flash->set(_txt('pl.grouperlite.message.flash.info-group-failed'), array('key' => 'error')); } + + try { + $groupMembers = $this->membersInGroup(); + $this->set('groupergroupssubscribers', $groupMembers); + } catch (Exception $e) { + CakeLog::write('error', __METHOD__ . ': ' . var_export($e->getMessage(), true)); + + $this->set('groupergroupssubscribers', array()); + $this->Flash->set(_txt('pl.grouperlite.message.flash.group-detail-members-failed'), array('key' => 'error')); + } } /** @@ -138,16 +150,20 @@ public function membersInGroup() { 'groupName' => $groupName ]; + $details = []; + try { $details = $this->GrouperGroup->membersInGroup($scope); - $this->set('membersingroup', $details); + // $this->set('membersingroup', $details); } catch (Exception $e) { CakeLog::write('error', __METHOD__ . ': ' . var_export($e->getMessage(), true)); - $this->set('membersingroup', array()); + // $this->set('membersingroup', array()); $this->Flash->set(_txt('pl.grouperlite.message.flash.group-detail-members-failed'), array('key' => 'error')); } + + return $details; } diff --git a/View/Elements/Components/groupattributes.ctp b/View/Elements/Components/groupattributes.ctp index 11f7082..dfb6978 100644 --- a/View/Elements/Components/groupattributes.ctp +++ b/View/Elements/Components/groupattributes.ctp @@ -19,4 +19,9 @@ - \ No newline at end of file + + +
+

No attributes defined.

+
+ \ No newline at end of file diff --git a/View/Elements/Components/subscriberList.ctp b/View/Elements/Components/subscriberList.ctp index 378dc0e..57e98e3 100644 --- a/View/Elements/Components/subscriberList.ctp +++ b/View/Elements/Components/subscriberList.ctp @@ -4,7 +4,7 @@ - + diff --git a/View/GrouperGroups/groupinfo.ctp b/View/GrouperGroups/groupinfo.ctp index 9aa6925..bfc04f8 100644 --- a/View/GrouperGroups/groupinfo.ctp +++ b/View/GrouperGroups/groupinfo.ctp @@ -7,17 +7,15 @@ $groupOperation = '?operation=UiV2Group.viewGroup&groupId='; $groupUrlBase = $baseUrl . $path . $groupOperation; $attrOperation = '?operation=UiV2AttributeDefName.viewAttributeDefName&attributeDefNameId='; $attrUrlBase = $baseUrl . $path . $attrOperation; - -$isuserowner = 'T'; ?>
- -