diff options
Diffstat (limited to 'application/modules/user/views/scripts')
18 files changed, 271 insertions, 3 deletions
diff --git a/application/modules/user/views/scripts/auth/delete.phtml b/application/modules/user/views/scripts/auth/delete.phtml new file mode 100644 index 0000000..62bf24e --- /dev/null +++ b/application/modules/user/views/scripts/auth/delete.phtml @@ -0,0 +1,6 @@ +<h1>Delete Account</h1> +Do you really want to delete this account? +<?php +$this->deleteconfirmform->setAction($this->url()); +echo $this->deleteconfirmform; +?>
\ No newline at end of file diff --git a/application/modules/user/views/scripts/auth/login.phtml b/application/modules/user/views/scripts/auth/login.phtml index d68d2af..899c6e7 100644 --- a/application/modules/user/views/scripts/auth/login.phtml +++ b/application/modules/user/views/scripts/auth/login.phtml @@ -1,3 +1,4 @@ +<h1>Login</h1> <?php $this->loginForm->setAction($this->url()); echo $this->loginForm; diff --git a/application/modules/user/views/scripts/auth/recoverpassword.phtml b/application/modules/user/views/scripts/auth/recoverpassword.phtml index 881e00e..089aec3 100644 --- a/application/modules/user/views/scripts/auth/recoverpassword.phtml +++ b/application/modules/user/views/scripts/auth/recoverpassword.phtml @@ -1,3 +1,4 @@ +<h1>Recover Password</h1> <?php $this->recoverPasswordForm->setAction($this->url()); echo $this->recoverPasswordForm; diff --git a/application/modules/user/views/scripts/auth/register.phtml b/application/modules/user/views/scripts/auth/register.phtml index 2033b04..6217e06 100644 --- a/application/modules/user/views/scripts/auth/register.phtml +++ b/application/modules/user/views/scripts/auth/register.phtml @@ -1,3 +1,4 @@ +<h1>New Account</h1> <?php $this->registerForm->setAction($this->url()); echo $this->registerForm; 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..588ce31 --- /dev/null +++ b/application/modules/user/views/scripts/group/add.phtml @@ -0,0 +1,5 @@ +<h1>Add Group</h1> +<?php +$this->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..add3a77 --- /dev/null +++ b/application/modules/user/views/scripts/group/edit.phtml @@ -0,0 +1,11 @@ +<h1>Edit Group</h1> +<?php +if(isset($this->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 @@ -<br /><br /><center>View script for controller <b>Group</b> and script/action name <b>index</b></center>
\ 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..5bb2a9d --- /dev/null +++ b/application/modules/user/views/scripts/group/link.phtml @@ -0,0 +1,5 @@ +<h1>Link Groups</h1> +<?php +$this->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..d343204 --- /dev/null +++ b/application/modules/user/views/scripts/group/show.phtml @@ -0,0 +1,144 @@ +<?php +if($this->groupID) { + if(isset($this->userIDsNamespace['groupID'])) { + ?> +<h1>Group</h1> + <?php + 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 { + ?> +<h1>Group Details</h1> + <?php + 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')); + } + ?> +<span class="clear"></span> +<table> + <tr> + <th>Title</th> + <th>Description</th> + </tr> + <tr class="entry"> + <td><?php echo $this->group->getTitle(); ?></td> + <td><?php echo $this->group->getDescription(); ?></td> + </tr> + <?php + if(isset($parentGroup) && is_object($parentGroup)) { + ?> + <tr> + <td><b>Superordinated Group:</b></td> + <td><?php echo $this->parentGroup->getTitle(); ?></td> + </tr> + <?php + } + ?> +</table> + <?php + echo $this->formButton('editgroup', 'Show Grouplist', array( + 'onclick' => 'self.location="/user/group/showall"', + 'class' => 'rightbutton')); + if(isset($this->groupRequestList)) { + ?> +<br /> +<h2>Requests:</h2> +<table> + <tr> + <th>Firstname</th> + <th>Name</th> + <th>email</th> + <th>city</th> + <th>grant</th> + </tr> + <?php + foreach($this->groupRequestList as $grouprequest) { + $grouprequestID = $grouprequest['grouprequestID']; + $person = $grouprequest['person']; + ?> + <tr class="entry"> + <td><?php echo $person->getFirstname(); ?></td> + <td><?php echo $person->getName(); ?></td> + <td><?php echo $person->getEmail(); ?></td> + <td><?php echo $person->getCity(); ?></td> + <td> + <form action="/user/group/grantperson" method="post"><input + type="hidden" name="grouprequestID" + value="<?php echo $grouprequestID; ?>" /> <?php printRoleSelect($this->roleList); ?> + <input type="image" src='/media/img/save.png' alt='Grant Person' + name="confirm" value="confirm" /></form> + </td> + </tr> + <?php + } + ?> +</table> + <?php + } + if(isset($this->membersList)) { + ?> +<br /> +<h2>Members:</h2> +<table> + <tr> + <th>Firstname</th> + <th>Name</th> + <th>email</th> + <th>city</th> + <th>revoke</th> + </tr> + + <?php + foreach($this->membersList as $member) { + $membershipID = $member['membershipID']; + $person = $member['person']; + ?> + <tr class="entry"> + <td><?php echo $person->getFirstname(); ?></td> + <td><?php echo $person->getName(); ?></td> + <td><?php echo $person->getEmail(); ?></td> + <td><?php echo $person->getCity(); ?></td> + <td class='action'><a + href="<?php echo $this->url( + array( + 'module' => 'user', + 'controller' => 'group', + 'action' => 'revokeperson', + 'membershipID' => $membershipID, + ), + 'default', + true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a> + </td> + </tr> + <?php + } + ?> +</table> + <?php + } +} + +function printRoleSelect($roleList) { + if(!is_array($roleList)) { + return; + } + echo "<select name=\"roleID\">"; + foreach($roleList as $role) { + echo "<option value=\"" . $role['roleID'] . "\">" . $role['title'] . "</option>"; + } + echo "</select>"; +} +?> +<br /> +<br /> +<br /> +<br /> +<br /> 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 @@ +<h1>Groups</h1> +<?php echo $this->formButton('addgroup', 'Add Group', array( + 'onclick' => 'self.location="/user/group/add"', + 'class' => 'addbutton')) +?> +<table> + <tr> + <th>Title</th> + <th colspan=3>Actions</th> + </tr> + <?php + $count = 0; + foreach($this->groupList as $group) { + ?> + <tr + <?php if($group->getID() == $this->userIDsNamespace['groupID']) echo 'class="selectedEntry"'; else echo 'class="entry"'; ?>> + <td><?php echo $group->getTitle(); ?></td> + <td class='action'><a + href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url( + array( + 'module' => 'user', + 'controller' => 'group', + 'action' => 'show' + ), + 'default', + true); else echo $this->url( + array( + 'module' => 'user', + 'controller' => 'group', + 'action' => 'show', + 'groupID' => $group->getID() + ), + 'default', + true); ?>"> <img src='/media/img/show.png' alt='Show Group' /></a></td> + <td class='action'><a + href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url( + array( + 'module' => 'user', + 'controller' => 'group', + 'action' => 'edit' + ), + 'default', + true); else echo $this->url( + array( + 'module' => 'user', + 'controller' => 'group', + 'action' => 'edit', + 'groupID' => $group->getID() + ), + 'default', + true); ?>"> <img src='/media/img/edit.png' alt='Edit Group' /></a></td> + <td class='action'><a + href="<?php if($group->getID() == $this->userIDsNamespace['groupID']) echo $this->url( + array( + 'module' => 'user', + 'controller' => 'group', + 'action' => 'delete' + ), + 'default', + true); else echo $this->url( + array( + 'module' => 'user', + 'controller' => 'group', + 'action' => 'delete', + 'groupID' => $group->getID() + ), + 'default', + true); ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a> + </td> + </tr> + <?php + $count++; + } + ?> +</table> + <?php echo $this->formButton('linkgroups', 'Link Groups', array( + 'onclick' => 'self.location="/user/group/link"', + 'class' => 'addbutton')) + ?> diff --git a/application/modules/user/views/scripts/person/edit.phtml b/application/modules/user/views/scripts/person/edit.phtml index 955ed35..3e666d4 100644 --- a/application/modules/user/views/scripts/person/edit.phtml +++ b/application/modules/user/views/scripts/person/edit.phtml @@ -1,3 +1,4 @@ +<h1>Edit Person</h1> <?php $this->editForm->setAction($this->url()); echo $this->editForm; 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) { ?> <tr - <?php if($group['membershipID'] == $this->userIDsNamespace['membershipID']) echo 'class="selectedMembership"'; else echo 'class="entry"'; ?>> + <?php if($group['membershipID'] == $this->userIDsNamespace['membershipID']) echo 'class="selectedEntry"'; else echo 'class="entry"'; ?>> <td><?php echo $group['title']; ?></td> <td><?php echo $group['description']; ?></td> <td class='action'><a diff --git a/application/modules/user/views/scripts/person/request.phtml b/application/modules/user/views/scripts/person/request.phtml index 2da570f..91a625b 100644 --- a/application/modules/user/views/scripts/person/request.phtml +++ b/application/modules/user/views/scripts/person/request.phtml @@ -1,3 +1,4 @@ +<h1>Request Membership</h1> <?php if(count($this->requestForm->getGrouplist())>0) { $this->requestForm->setAction($this->url()); diff --git a/application/modules/user/views/scripts/person/selectmembership.phtml b/application/modules/user/views/scripts/person/selectmembership.phtml index 2bfe4d6..5f7e5bf 100644 --- a/application/modules/user/views/scripts/person/selectmembership.phtml +++ b/application/modules/user/views/scripts/person/selectmembership.phtml @@ -1,3 +1,4 @@ +<h1>Select Membership</h1> <?php $this->membershipSelectForm->setAction($this->url()); echo $this->membershipSelectForm; diff --git a/application/modules/user/views/scripts/role/add.phtml b/application/modules/user/views/scripts/role/add.phtml index 4f96cf0..23d4c55 100644 --- a/application/modules/user/views/scripts/role/add.phtml +++ b/application/modules/user/views/scripts/role/add.phtml @@ -1,3 +1,4 @@ +<h1>Add Role</h1> <?php $this->addForm->setAction($this->url()); echo $this->addForm; diff --git a/application/modules/user/views/scripts/role/edit.phtml b/application/modules/user/views/scripts/role/edit.phtml index c976a90..59482f0 100644 --- a/application/modules/user/views/scripts/role/edit.phtml +++ b/application/modules/user/views/scripts/role/edit.phtml @@ -1,3 +1,4 @@ +<h1>Edit Role</h1> <?php if(isset($this->addForm)) { $this->addForm->setAction('/etc/role/add'); diff --git a/application/modules/user/views/scripts/role/linkright.phtml b/application/modules/user/views/scripts/role/linkright.phtml index 94ad343..38c0d45 100644 --- a/application/modules/user/views/scripts/role/linkright.phtml +++ b/application/modules/user/views/scripts/role/linkright.phtml @@ -1,3 +1,4 @@ +<h1>Add Right</h1> <?php $this->linkForm->setAction($this->url()); echo $this->linkForm; diff --git a/application/modules/user/views/scripts/role/show.phtml b/application/modules/user/views/scripts/role/show.phtml index 9abab1a..b99c1f8 100644 --- a/application/modules/user/views/scripts/role/show.phtml +++ b/application/modules/user/views/scripts/role/show.phtml @@ -1,6 +1,14 @@ -<h1>Role Details</h1> <?php if($this->roleID) { + if(isset($this->userIDsNamespace['roleID'])) { + ?> +<h1>Role</h1> + <?php + } else { + ?> +<h1>Role Details</h1> + <?php + } ?> <?php echo $this->formButton('deleterole', 'Delete', array( 'onclick' => 'self.location="/user/role/delete/roleID/' . $this->role->getID() .'"', @@ -13,10 +21,12 @@ if($this->roleID) { <tr> <th>Title</th> <th>Description</th> + <th>Inheritance</th> </tr> <tr class="entry"> <td><?php echo $this->role->getTitle(); ?></td> <td><?php echo $this->role->getDescription(); ?></td> + <td><?php if($this->role->getInheritance() == 1) echo "yes"; else echo "no"; ?></td> </tr> </table> <br /> |