summaryrefslogtreecommitdiffstats
path: root/application/views
diff options
context:
space:
mode:
authorBjörn Geiger2011-03-10 22:10:05 +0100
committerBjörn Geiger2011-03-10 22:10:05 +0100
commit7be4355001156faed62c71492234cba2c5bf96b4 (patch)
tree55bb96227ee354cc0c6d6788dc45020bd43d8bba /application/views
parentMerge branch 'master' of ssh://git.openslx.org/lsfks/master-teamprojekt/pbs2 (diff)
downloadpbs2-7be4355001156faed62c71492234cba2c5bf96b4.tar.gz
pbs2-7be4355001156faed62c71492234cba2c5bf96b4.tar.xz
pbs2-7be4355001156faed62c71492234cba2c5bf96b4.zip
Benutzervewaltung, Gruppenverwaltung, Membershipverwaltung und noch leerer RoleController
Diffstat (limited to 'application/views')
-rw-r--r--application/views/scripts/auth/delete.phtml4
-rw-r--r--application/views/scripts/auth/index.phtml1
-rw-r--r--application/views/scripts/auth/login.phtml5
-rw-r--r--application/views/scripts/auth/recoverpassword.phtml5
-rw-r--r--application/views/scripts/group/add.phtml4
-rw-r--r--application/views/scripts/group/delete.phtml6
-rw-r--r--application/views/scripts/group/edit.phtml10
-rw-r--r--application/views/scripts/group/grantperson.phtml11
-rw-r--r--application/views/scripts/group/index.phtml35
-rw-r--r--application/views/scripts/group/link.phtml4
-rw-r--r--application/views/scripts/group/revokeperson.phtml6
-rw-r--r--application/views/scripts/group/show.phtml122
-rw-r--r--application/views/scripts/person/edit.phtml4
-rw-r--r--application/views/scripts/person/index.phtml1
-rw-r--r--application/views/scripts/person/leave.phtml6
-rw-r--r--application/views/scripts/person/request.phtml6
-rw-r--r--application/views/scripts/person/show.phtml79
-rw-r--r--application/views/scripts/role/add.phtml1
-rw-r--r--application/views/scripts/role/delete.phtml1
-rw-r--r--application/views/scripts/role/edit.phtml1
-rw-r--r--application/views/scripts/role/index.phtml1
-rw-r--r--application/views/scripts/role/linkright.phtml1
-rw-r--r--application/views/scripts/role/show.phtml1
-rw-r--r--application/views/scripts/role/unlinkright.phtml1
24 files changed, 305 insertions, 11 deletions
diff --git a/application/views/scripts/auth/delete.phtml b/application/views/scripts/auth/delete.phtml
index 8f269a0..e69de29 100644
--- a/application/views/scripts/auth/delete.phtml
+++ b/application/views/scripts/auth/delete.phtml
@@ -1,4 +0,0 @@
-<?php
-$this->deleteForm->setAction($this->url());
-echo $this->deleteForm;
-?>
diff --git a/application/views/scripts/auth/index.phtml b/application/views/scripts/auth/index.phtml
index 4a9f827..e69de29 100644
--- a/application/views/scripts/auth/index.phtml
+++ b/application/views/scripts/auth/index.phtml
@@ -1 +0,0 @@
-<br /><br /><center>View script for controller <b>Auth</b> and script/action name <b>index</b></center> \ No newline at end of file
diff --git a/application/views/scripts/auth/login.phtml b/application/views/scripts/auth/login.phtml
index 0242bc6..4e642a3 100644
--- a/application/views/scripts/auth/login.phtml
+++ b/application/views/scripts/auth/login.phtml
@@ -1,8 +1,5 @@
<?php
$this->loginForm->setAction($this->url());
echo $this->loginForm;
-
-
-
?>
-
+<div><button onclick="location.href='/auth/recoverpassword'">Recover Password</button></div> \ No newline at end of file
diff --git a/application/views/scripts/auth/recoverpassword.phtml b/application/views/scripts/auth/recoverpassword.phtml
index e133420..881e00e 100644
--- a/application/views/scripts/auth/recoverpassword.phtml
+++ b/application/views/scripts/auth/recoverpassword.phtml
@@ -1 +1,4 @@
-<br /><br /><center>View script for controller <b>Auth</b> and script/action name <b>recoverPassword</b></center> \ No newline at end of file
+<?php
+$this->recoverPasswordForm->setAction($this->url());
+echo $this->recoverPasswordForm;
+?>
diff --git a/application/views/scripts/group/add.phtml b/application/views/scripts/group/add.phtml
new file mode 100644
index 0000000..4f96cf0
--- /dev/null
+++ b/application/views/scripts/group/add.phtml
@@ -0,0 +1,4 @@
+<?php
+$this->addForm->setAction($this->url());
+echo $this->addForm;
+?> \ No newline at end of file
diff --git a/application/views/scripts/group/delete.phtml b/application/views/scripts/group/delete.phtml
new file mode 100644
index 0000000..fc96431
--- /dev/null
+++ b/application/views/scripts/group/delete.phtml
@@ -0,0 +1,6 @@
+<?php
+if(!isset($_POST['groupID'])) {
+ ?>
+<div>No group has been chosen.</div>
+ <?php
+} \ No newline at end of file
diff --git a/application/views/scripts/group/edit.phtml b/application/views/scripts/group/edit.phtml
new file mode 100644
index 0000000..64dde9d
--- /dev/null
+++ b/application/views/scripts/group/edit.phtml
@@ -0,0 +1,10 @@
+<?php
+if(isset($this->addForm)) {
+ $this->addForm->setAction('/group/add');
+ echo $this->addForm;
+}
+else {
+ $this->editForm->setAction($this->url());
+ echo $this->editForm;
+}
+?> \ No newline at end of file
diff --git a/application/views/scripts/group/grantperson.phtml b/application/views/scripts/group/grantperson.phtml
new file mode 100644
index 0000000..f15d08a
--- /dev/null
+++ b/application/views/scripts/group/grantperson.phtml
@@ -0,0 +1,11 @@
+<?php
+if(!isset($_POST['grouprequestID'])) {
+ ?>
+<div>No Request has been chosen.</div>
+ <?php
+}
+if(!isset($_POST['roleID'])) {
+ ?>
+<div>No Role has been chosen.</div>
+ <?php
+} \ No newline at end of file
diff --git a/application/views/scripts/group/index.phtml b/application/views/scripts/group/index.phtml
new file mode 100644
index 0000000..b8178dc
--- /dev/null
+++ b/application/views/scripts/group/index.phtml
@@ -0,0 +1,35 @@
+<table>
+ <tr>
+ <th>Title:</th>
+ <th>Functions:</th>
+ </tr>
+ <?php
+ $count = 0;
+ foreach($this->groupList as $group) {
+ ?>
+ <tr>
+ <td><?php echo $group->getTitle(); ?></td>
+ <td>
+ <form name="show<?php echo $count; ?>" action="/group/show"
+ method="post"><input type="hidden" name="groupID"
+ value="<?php echo $group->getID(); ?>" /><a
+ href="javascript:document.show<?php echo $count; ?>.submit();">Details</a></form>
+ <form name="edit<?php echo $count; ?>" action="/group/edit"
+ method="post"><input type="hidden" name="groupID"
+ value="<?php echo $group->getID(); ?>" /><a
+ href="javascript:document.edit<?php echo $count; ?>.submit();">Edit</a></form>
+ <form name="delete<?php echo $count; ?>" action="/group/delete"
+ method="post"><input type="hidden" name="groupID"
+ value="<?php echo $group->getID(); ?>" /><a
+ href="javascript:document.delete<?php echo $count; ?>.submit();">Delete</a></form>
+ </td>
+ </tr>
+ <?php
+ $count++;
+ }
+ ?>
+</table>
+<br />
+<div>
+<button onclick="location.href='/group/link'">Link Groups</button>
+</div>
diff --git a/application/views/scripts/group/link.phtml b/application/views/scripts/group/link.phtml
new file mode 100644
index 0000000..94ad343
--- /dev/null
+++ b/application/views/scripts/group/link.phtml
@@ -0,0 +1,4 @@
+<?php
+$this->linkForm->setAction($this->url());
+echo $this->linkForm;
+?> \ No newline at end of file
diff --git a/application/views/scripts/group/revokeperson.phtml b/application/views/scripts/group/revokeperson.phtml
new file mode 100644
index 0000000..6af5564
--- /dev/null
+++ b/application/views/scripts/group/revokeperson.phtml
@@ -0,0 +1,6 @@
+<?php
+if(!isset($_POST['membershipID'])) {
+ ?>
+<div>No Membership has been chosen.</div>
+ <?php
+} \ No newline at end of file
diff --git a/application/views/scripts/group/show.phtml b/application/views/scripts/group/show.phtml
new file mode 100644
index 0000000..addf3db
--- /dev/null
+++ b/application/views/scripts/group/show.phtml
@@ -0,0 +1,122 @@
+<?php
+if($_POST['groupID']) {
+ ?>
+<div align="right">
+<form name="editForm" action="/group/edit/" method="post"><input
+ type="hidden" name="groupID"
+ value="<?php echo $this->group->getID(); ?>" /> <input type="submit"
+ name="edit" value="Edit" /></form>
+<form name="deleteForm" action="/group/delete/" method="post"><input
+ type="hidden" name="groupID"
+ value="<?php echo $this->group->getID(); ?>" /> <input type="submit"
+ name="delete" value="Delete" /></form>
+</div>
+<table>
+ <tr>
+ <td><b>Title:</b></td>
+ <td><?php echo $this->group->getTitle(); ?></td>
+ </tr>
+ <tr>
+ <td><b>Description:</b></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
+ if(isset($this->groupRequestList)) {
+ ?>
+<br />
+<div>Grouprequests:</div>
+<br />
+<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>
+ <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="/group/grantperson" method="post"><input type="hidden"
+ name="grouprequestID" value="<?php echo $grouprequestID; ?>" /> <?php printRoleSelect($this->roleList); ?>
+ <input type="submit" name="confirm" value="confirm" /></form>
+ </td>
+ </tr>
+ <?php
+ }
+ ?>
+</table>
+ <?php
+ }
+ if(isset($this->memberslist)) {
+ ?>
+<br />
+<div>Members:</div>
+<br />
+<table>
+ <tr>
+ <th>Firstname:</th>
+ <th>Name:</th>
+ <th>email:</th>
+ <th>city:</th>
+ <th></th>
+ </tr>
+
+ <?php
+ foreach($this->memberslist as $member) {
+ $membershipID = $member['membershipID'];
+ $person = $member['person'];
+ ?>
+ <tr>
+ <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="/group/revokeperson" method="post"><input type="hidden"
+ name="membershipID" value="<?php echo $membershipID; ?>" /><input
+ type="hidden" name="personID" value="<?php echo $person->getID(); ?>" />
+ <input type="submit" name="revoke" value="revoke" /></form>
+ </td>
+ </tr>
+ <?php
+ }
+ ?>
+</table>
+ <?php
+ }
+} else {
+ ?>
+<div>No Group has been chosen.</div>
+ <?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>";
+} \ No newline at end of file
diff --git a/application/views/scripts/person/edit.phtml b/application/views/scripts/person/edit.phtml
new file mode 100644
index 0000000..955ed35
--- /dev/null
+++ b/application/views/scripts/person/edit.phtml
@@ -0,0 +1,4 @@
+<?php
+$this->editForm->setAction($this->url());
+echo $this->editForm;
+?> \ No newline at end of file
diff --git a/application/views/scripts/person/index.phtml b/application/views/scripts/person/index.phtml
index 1ba7791..e69de29 100644
--- a/application/views/scripts/person/index.phtml
+++ b/application/views/scripts/person/index.phtml
@@ -1 +0,0 @@
-<br /><br /><center>View script for controller <b>Person</b> and script/action name <b>index</b></center>
diff --git a/application/views/scripts/person/leave.phtml b/application/views/scripts/person/leave.phtml
new file mode 100644
index 0000000..fc96431
--- /dev/null
+++ b/application/views/scripts/person/leave.phtml
@@ -0,0 +1,6 @@
+<?php
+if(!isset($_POST['groupID'])) {
+ ?>
+<div>No group has been chosen.</div>
+ <?php
+} \ No newline at end of file
diff --git a/application/views/scripts/person/request.phtml b/application/views/scripts/person/request.phtml
new file mode 100644
index 0000000..2da570f
--- /dev/null
+++ b/application/views/scripts/person/request.phtml
@@ -0,0 +1,6 @@
+<?php
+if(count($this->requestForm->getGrouplist())>0) {
+ $this->requestForm->setAction($this->url());
+ echo $this->requestForm;
+}
+?> \ No newline at end of file
diff --git a/application/views/scripts/person/show.phtml b/application/views/scripts/person/show.phtml
new file mode 100644
index 0000000..5386c06
--- /dev/null
+++ b/application/views/scripts/person/show.phtml
@@ -0,0 +1,79 @@
+<div align="right">
+<button onclick="location.href='/person/edit'">Edit</button>
+</div>
+<table>
+ <tr>
+ <td><b>Title:</b></td>
+ <td><?php echo $this->person->getTitle(); ?></td>
+ </tr>
+ <tr>
+ <td><b>Name:</b></td>
+ <td><?php echo $this->person->getName(); ?></td>
+ </tr>
+ <tr>
+ <td><b>Firstname:</b></td>
+ <td><?php echo $this->person->getFirstname(); ?></td>
+ </tr>
+ <tr>
+ <td><b>Street:</b></td>
+ <td><?php echo $this->person->getStreet(); ?></td>
+ </tr>
+ <tr>
+ <td><b>Housenumber:</b></td>
+ <td><?php echo $this->person->getHousenumber(); ?></td>
+ </tr>
+ <tr>
+ <td><b>City:</b></td>
+ <td><?php echo $this->person->getCity(); ?></td>
+ </tr>
+ <tr>
+ <td><b>Postalcode:</b></td>
+ <td><?php echo $this->person->getPostalcode(); ?></td>
+ </tr>
+ <tr>
+ <td><b>Email:</b></td>
+ <td><?php echo $this->person->getEmail(); ?></td>
+ </tr>
+ <tr>
+ <td><b>Last Login Date:</b></td>
+ <td><?php if( $this->person->getLogindate()) echo date ('d. F Y - H:i', $this->person->getLogindate()); ?> Uhr</td>
+ </tr>
+ <tr>
+ <td><b>Register Date:</b></td>
+ <td><?php echo date ('d. F Y - H:i', $this->person->getRegisterdate()); ?> Uhr</td>
+ </tr>
+</table>
+<?php
+if(isset($this->groups)) {
+ ?>
+<br />
+<div>Member in the following Groups:</div>
+<br />
+<table>
+<?php
+foreach($this->groups as $group) {
+ ?>
+ <tr>
+ <th>Title</th>
+ <th>Functions</th>
+ </tr>
+ <tr>
+ <td><?php echo $group['title']; ?></td>
+ <td>
+ <form name="leaveGroup<?php echo $group['id']; ?>"
+ action="/person/leave/" method="post"><input type="hidden"
+ name="groupID" value="<?php echo $group['id']; ?>" /> <a
+ href="javascript:document.leaveGroup<?php echo $group['id']; ?>.submit();">Remove
+ Membership</a></form>
+ </td>
+ </tr>
+ <?php
+}
+}
+?>
+</table>
+<br />
+<div>
+<button onclick="location.href='/person/request'">Add to additional
+Groups</button>
+</div>
diff --git a/application/views/scripts/role/add.phtml b/application/views/scripts/role/add.phtml
new file mode 100644
index 0000000..5277b9d
--- /dev/null
+++ b/application/views/scripts/role/add.phtml
@@ -0,0 +1 @@
+<br /><br /><center>View script for controller <b>Role</b> and script/action name <b>add</b></center> \ No newline at end of file
diff --git a/application/views/scripts/role/delete.phtml b/application/views/scripts/role/delete.phtml
new file mode 100644
index 0000000..6b0ebf1
--- /dev/null
+++ b/application/views/scripts/role/delete.phtml
@@ -0,0 +1 @@
+<br /><br /><center>View script for controller <b>Role</b> and script/action name <b>delete</b></center> \ No newline at end of file
diff --git a/application/views/scripts/role/edit.phtml b/application/views/scripts/role/edit.phtml
new file mode 100644
index 0000000..c30d295
--- /dev/null
+++ b/application/views/scripts/role/edit.phtml
@@ -0,0 +1 @@
+<br /><br /><center>View script for controller <b>Role</b> and script/action name <b>edit</b></center> \ No newline at end of file
diff --git a/application/views/scripts/role/index.phtml b/application/views/scripts/role/index.phtml
new file mode 100644
index 0000000..d30131e
--- /dev/null
+++ b/application/views/scripts/role/index.phtml
@@ -0,0 +1 @@
+<br /><br /><center>View script for controller <b>Role</b> and script/action name <b>index</b></center> \ No newline at end of file
diff --git a/application/views/scripts/role/linkright.phtml b/application/views/scripts/role/linkright.phtml
new file mode 100644
index 0000000..bfba9db
--- /dev/null
+++ b/application/views/scripts/role/linkright.phtml
@@ -0,0 +1 @@
+<br /><br /><center>View script for controller <b>Role</b> and script/action name <b>linkright</b></center> \ No newline at end of file
diff --git a/application/views/scripts/role/show.phtml b/application/views/scripts/role/show.phtml
new file mode 100644
index 0000000..dcd232b
--- /dev/null
+++ b/application/views/scripts/role/show.phtml
@@ -0,0 +1 @@
+<br /><br /><center>View script for controller <b>Role</b> and script/action name <b>show</b></center> \ No newline at end of file
diff --git a/application/views/scripts/role/unlinkright.phtml b/application/views/scripts/role/unlinkright.phtml
new file mode 100644
index 0000000..8c7615d
--- /dev/null
+++ b/application/views/scripts/role/unlinkright.phtml
@@ -0,0 +1 @@
+<br /><br /><center>View script for controller <b>Role</b> and script/action name <b>unlinkright</b></center> \ No newline at end of file