From 84f8c7b61f61ff68e9568e01c23689d591dc4828 Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Mon, 28 Mar 2011 12:56:10 +0200 Subject: Groupcontroller User Module --- .../modules/user/views/scripts/group/add.phtml | 4 + .../modules/user/views/scripts/group/edit.phtml | 10 ++ .../modules/user/views/scripts/group/index.phtml | 1 - .../modules/user/views/scripts/group/link.phtml | 4 + .../modules/user/views/scripts/group/show.phtml | 147 +++++++++++++++++++++ .../modules/user/views/scripts/group/showall.phtml | 79 +++++++++++ 6 files changed, 244 insertions(+), 1 deletion(-) create mode 100644 application/modules/user/views/scripts/group/add.phtml create mode 100644 application/modules/user/views/scripts/group/edit.phtml delete mode 100644 application/modules/user/views/scripts/group/index.phtml create mode 100644 application/modules/user/views/scripts/group/link.phtml create mode 100644 application/modules/user/views/scripts/group/show.phtml create mode 100644 application/modules/user/views/scripts/group/showall.phtml (limited to 'application/modules/user/views/scripts') diff --git a/application/modules/user/views/scripts/group/add.phtml b/application/modules/user/views/scripts/group/add.phtml new file mode 100644 index 0000000..4f96cf0 --- /dev/null +++ b/application/modules/user/views/scripts/group/add.phtml @@ -0,0 +1,4 @@ +addForm->setAction($this->url()); +echo $this->addForm; +?> \ No newline at end of file diff --git a/application/modules/user/views/scripts/group/edit.phtml b/application/modules/user/views/scripts/group/edit.phtml new file mode 100644 index 0000000..d513dea --- /dev/null +++ b/application/modules/user/views/scripts/group/edit.phtml @@ -0,0 +1,10 @@ +addForm)) { + $this->addForm->setAction('/user/group/add'); + echo $this->addForm; +} +else { + $this->editForm->setAction($this->url()); + echo $this->editForm; +} +?> diff --git a/application/modules/user/views/scripts/group/index.phtml b/application/modules/user/views/scripts/group/index.phtml deleted file mode 100644 index a1e5635..0000000 --- a/application/modules/user/views/scripts/group/index.phtml +++ /dev/null @@ -1 +0,0 @@ -

View script for controller Group and script/action name index
\ No newline at end of file diff --git a/application/modules/user/views/scripts/group/link.phtml b/application/modules/user/views/scripts/group/link.phtml new file mode 100644 index 0000000..94ad343 --- /dev/null +++ b/application/modules/user/views/scripts/group/link.phtml @@ -0,0 +1,4 @@ +linkForm->setAction($this->url()); +echo $this->linkForm; +?> \ No newline at end of file diff --git a/application/modules/user/views/scripts/group/show.phtml b/application/modules/user/views/scripts/group/show.phtml new file mode 100644 index 0000000..18ad1d3 --- /dev/null +++ b/application/modules/user/views/scripts/group/show.phtml @@ -0,0 +1,147 @@ +groupID) { + if(isset($this->userIDsNamespace['groupID'])) { + ?> +

Group

+ +

Group Details

+ userIDsNamespace['groupID'])) { + echo $this->formButton('deletegroup', 'Delete', array( + 'onclick' => 'self.location="/user/group/delete/"', + 'class' => 'rightbutton')); + echo $this->formButton('editgroup', 'Edit', array( + 'onclick' => 'self.location="/user/group/edit/"', + 'class' => 'rightbutton')); + } else { + echo $this->formButton('deletegroup', 'Delete', array( + 'onclick' => 'self.location="/user/group/delete/groupID/' . $this->group->getID() .'"', + 'class' => 'rightbutton')); + echo $this->formButton('editgroup', 'Edit', array( + 'onclick' => 'self.location="/user/group/edit/groupID/' . $this->group->getID() .'"', + 'class' => 'rightbutton')); + } + ?> + + + + + + + + + + + + + + + + +
TitleDescription
group->getTitle(); ?>group->getDescription(); ?>
Superordinated Group:parentGroup->getTitle(); ?>
+ formButton('editgroup', 'Show Grouplist', array( + 'onclick' => 'self.location="/user/group/showall"', + 'class' => 'rightbutton')); + if(isset($this->groupRequestList)) { + ?> +
+

Requests:

+ + + + + + + + + groupRequestList as $grouprequest) { + $grouprequestID = $grouprequest['grouprequestID']; + $person = $grouprequest['person']; + ?> + + + + + + + + +
FirstnameNameemailcitygrant
getFirstname(); ?>getName(); ?>getEmail(); ?>getCity(); ?> +
roleList); ?> +
+
+ membersList)) { + ?> +
+

Members:

+ + + + + + + + + + membersList as $member) { + $membershipID = $member['membershipID']; + $person = $member['person']; + ?> + + + + + + + + +
FirstnameNameemailcityrevoke
getFirstname(); ?>getName(); ?>getEmail(); ?>getCity(); ?> Delete Group +
+ "; + foreach($roleList as $role) { + echo ""; + } + echo ""; +} +?> +
+
+
+
+
diff --git a/application/modules/user/views/scripts/group/showall.phtml b/application/modules/user/views/scripts/group/showall.phtml new file mode 100644 index 0000000..e26e91e --- /dev/null +++ b/application/modules/user/views/scripts/group/showall.phtml @@ -0,0 +1,79 @@ +

Groups

+formButton('addgroup', 'Add Group', array( + 'onclick' => 'self.location="/user/group/add"', + 'class' => 'addbutton')) +?> + + + + + + groupList as $group) { + ?> + getID() == $this->userIDsNamespace['groupID']) echo 'class="selectedEntry"'; else echo 'class="entry"'; ?>> + + + + + + +
TitleActions
getTitle(); ?> Show Group Edit Group Delete Group +
+ formButton('linkgroups', 'Link Groups', array( + 'onclick' => 'self.location="/user/group/link"', + 'class' => 'addbutton')) + ?> -- cgit v1.2.3-55-g7522 From 105e7a1a6bfdcfd4dccc1b95a17dc6fad7a6bf95 Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Mon, 28 Mar 2011 12:58:13 +0200 Subject: kleine Fehler korrigiert --- application/modules/user/controllers/RoleController.php | 6 +++--- application/modules/user/layouts/user.phtml | 2 +- application/modules/user/views/scripts/person/index.phtml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'application/modules/user/views/scripts') diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php index da65507..b3795de 100644 --- a/application/modules/user/controllers/RoleController.php +++ b/application/modules/user/controllers/RoleController.php @@ -2,15 +2,15 @@ class User_RoleController extends Zend_Controller_Action { - private $userIDsNamespace; + protected $userIDsNamespace; public function init() { if (Zend_Auth::getInstance()->hasIdentity()) { $this->userIDsNamespace = Zend_Session::namespaceGet('userIDs'); - if($this->userIDsNamespace['groupID'] ==''){ + if($this->userIDsNamespace['roleID'] ==''){ $pbsNotifier = new Pbs_Notifier(); - echo $pbsNotifier->notify('No groupID set','forbidden'); + echo $pbsNotifier->notify('No roleID set','forbidden'); } $this->roleMapper = new Application_Model_RoleMapper(); $this->rightMapper = new Application_Model_RightMapper(); diff --git a/application/modules/user/layouts/user.phtml b/application/modules/user/layouts/user.phtml index c7f54dc..e608298 100644 --- a/application/modules/user/layouts/user.phtml +++ b/application/modules/user/layouts/user.phtml @@ -36,7 +36,7 @@ echo $this->headScript()."\n"; - + hasIdentity()) {?> diff --git a/application/modules/user/views/scripts/person/index.phtml b/application/modules/user/views/scripts/person/index.phtml index f23bc07..cdf5c6b 100644 --- a/application/modules/user/views/scripts/person/index.phtml +++ b/application/modules/user/views/scripts/person/index.phtml @@ -32,7 +32,7 @@ if(isset($this->groups)) { foreach($this->groups as $group) { ?> userIDsNamespace['membershipID']) echo 'class="selectedMembership"'; else echo 'class="entry"'; ?>> + userIDsNamespace['membershipID']) echo 'class="selectedEntry"'; else echo 'class="entry"'; ?>>