summaryrefslogtreecommitdiffstats
path: root/application/modules/dev/views/scripts/group
diff options
context:
space:
mode:
authorBjörn Geiger2011-03-17 14:03:43 +0100
committerBjörn Geiger2011-03-17 14:03:43 +0100
commita26061089a91bf3a214d6a0dba9ffad8a7006a61 (patch)
tree718ef3992621aba600e39f877f9c9068e17662ca /application/modules/dev/views/scripts/group
parentClientMapper return value (diff)
downloadpbs2-a26061089a91bf3a214d6a0dba9ffad8a7006a61.tar.gz
pbs2-a26061089a91bf3a214d6a0dba9ffad8a7006a61.tar.xz
pbs2-a26061089a91bf3a214d6a0dba9ffad8a7006a61.zip
Person und Gruppen, Fehler korrigiert + Layout
Diffstat (limited to 'application/modules/dev/views/scripts/group')
-rw-r--r--application/modules/dev/views/scripts/group/delete.phtml6
-rw-r--r--application/modules/dev/views/scripts/group/grantperson.phtml11
-rw-r--r--application/modules/dev/views/scripts/group/index.phtml58
-rw-r--r--application/modules/dev/views/scripts/group/revokeperson.phtml6
-rw-r--r--application/modules/dev/views/scripts/group/show.phtml91
5 files changed, 86 insertions, 86 deletions
diff --git a/application/modules/dev/views/scripts/group/delete.phtml b/application/modules/dev/views/scripts/group/delete.phtml
deleted file mode 100644
index fc96431..0000000
--- a/application/modules/dev/views/scripts/group/delete.phtml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-if(!isset($_POST['groupID'])) {
- ?>
-<div>No group has been chosen.</div>
- <?php
-} \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/group/grantperson.phtml b/application/modules/dev/views/scripts/group/grantperson.phtml
deleted file mode 100644
index f15d08a..0000000
--- a/application/modules/dev/views/scripts/group/grantperson.phtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?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/modules/dev/views/scripts/group/index.phtml b/application/modules/dev/views/scripts/group/index.phtml
index 714498e..a3d1269 100644
--- a/application/modules/dev/views/scripts/group/index.phtml
+++ b/application/modules/dev/views/scripts/group/index.phtml
@@ -1,27 +1,48 @@
+<h1>Groups</h1>
+<?php echo $this->formButton('addgroup', 'Add Group', array(
+ 'onclick' => 'self.location="/dev/group/add"',
+ 'class' => 'addbutton'))?>
<table>
<tr>
- <th>Title:</th>
- <th>Functions:</th>
+ <th>Title</th>
+ <th colspan=3>Actions</th>
</tr>
<?php
$count = 0;
foreach($this->groupList as $group) {
?>
- <tr>
+ <tr class="entry">
<td><?php echo $group->getTitle(); ?></td>
- <td>
- <form name="show<?php echo $count; ?>" action="/dev/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 class='action'><a
+ href="<?php echo $this->url(
+ array(
+ 'module' => 'dev',
+ '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 echo $this->url(
+ array(
+ 'module' => 'dev',
+ '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 echo $this->url(
+ array(
+ 'module' => 'dev',
+ 'controller' => 'group',
+ 'action' => 'delete',
+ 'groupID' => $group->getID()
+ ),
+ 'default',
+ true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a>
</td>
</tr>
<?php
@@ -29,7 +50,8 @@
}
?>
</table>
-<br />
<div>
-<button onclick="location.href='/dev/group/link'">Link Groups</button>
+<?php echo $this->formButton('linkgroups', 'Link Groups', array(
+ 'onclick' => 'self.location="/dev/group/link"',
+ 'class' => 'addbutton'))?>
</div>
diff --git a/application/modules/dev/views/scripts/group/revokeperson.phtml b/application/modules/dev/views/scripts/group/revokeperson.phtml
deleted file mode 100644
index 6af5564..0000000
--- a/application/modules/dev/views/scripts/group/revokeperson.phtml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-if(!isset($_POST['membershipID'])) {
- ?>
-<div>No Membership has been chosen.</div>
- <?php
-} \ No newline at end of file
diff --git a/application/modules/dev/views/scripts/group/show.phtml b/application/modules/dev/views/scripts/group/show.phtml
index 7b3660d..f8fbe1e 100644
--- a/application/modules/dev/views/scripts/group/show.phtml
+++ b/application/modules/dev/views/scripts/group/show.phtml
@@ -1,23 +1,21 @@
+<h1>Group Details</h1>
<?php
-if($_POST['groupID']) {
+if($this->groupID) {
?>
-<div align="right">
-<form name="editForm" action="/dev/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="/dev/group/delete/" method="post"><input
- type="hidden" name="groupID"
- value="<?php echo $this->group->getID(); ?>" /> <input type="submit"
- name="delete" value="Delete" /></form>
-</div>
+ <?php echo $this->formButton('deletegroup', 'Delete', array(
+ 'onclick' => 'self.location="/dev/group/delete/groupID/' . $this->group->getID() .'"',
+ 'class' => 'rightbutton'))?>
+ <?php echo $this->formButton('editgroup', 'Edit', array(
+ 'onclick' => 'self.location="/dev/group/edit/groupID/' . $this->group->getID() .'"',
+ 'class' => 'rightbutton'))?>
+<span class="clear"></span>
<table>
<tr>
- <td><b>Title:</b></td>
- <td><?php echo $this->group->getTitle(); ?></td>
+ <th>Title</th>
+ <th>Description</th>
</tr>
- <tr>
- <td><b>Description:</b></td>
+ <tr class="entry">
+ <td><?php echo $this->group->getTitle(); ?></td>
<td><?php echo $this->group->getDescription(); ?></td>
</tr>
<?php
@@ -35,30 +33,31 @@ if($_POST['groupID']) {
if(isset($this->groupRequestList)) {
?>
<br />
-<div>Grouprequests:</div>
-<br />
+<h2>Requests:</h2>
<table>
<tr>
- <th>Firstname:</th>
- <th>Name:</th>
- <th>email:</th>
- <th>city:</th>
- <th>grant:</th>
+ <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>
+ <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="/dev/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>
+ <form action="/dev/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
@@ -67,35 +66,39 @@ if($_POST['groupID']) {
</table>
<?php
}
- if(isset($this->memberslist)) {
+ if(isset($this->membersList)) {
?>
<br />
-<div>Members:</div>
-<br />
+<h2>Members:</h2>
<table>
<tr>
- <th>Firstname:</th>
- <th>Name:</th>
- <th>email:</th>
- <th>city:</th>
- <th></th>
+ <th>Firstname</th>
+ <th>Name</th>
+ <th>email</th>
+ <th>city</th>
+ <th>revoke</th>
</tr>
<?php
- foreach($this->memberslist as $member) {
+ foreach($this->membersList as $member) {
$membershipID = $member['membershipID'];
$person = $member['person'];
?>
- <tr>
+ <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="/dev/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 class='action'><a
+ href="<?php echo $this->url(
+ array(
+ 'module' => 'dev',
+ 'controller' => 'group',
+ 'action' => 'revokeperson',
+ 'membershipID' => $membershipID,
+ ),
+ 'default',
+ true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a>
</td>
</tr>
<?php
@@ -104,10 +107,6 @@ if($_POST['groupID']) {
</table>
<?php
}
-} else {
- ?>
-<div>No Group has been chosen.</div>
- <?php
}
function printRoleSelect($roleList) {
@@ -120,3 +119,5 @@ function printRoleSelect($roleList) {
}
echo "</select>";
}
+?>
+<br /><br /><br /><br /><br /> \ No newline at end of file