diff options
18 files changed, 453 insertions, 402 deletions
diff --git a/application/modules/dev/controllers/AuthController.php b/application/modules/dev/controllers/AuthController.php index 49640c0..8265c6e 100644 --- a/application/modules/dev/controllers/AuthController.php +++ b/application/modules/dev/controllers/AuthController.php @@ -13,13 +13,14 @@ class dev_AuthController extends Zend_Controller_Action public function indexAction() { + $this->_helper-> viewRenderer-> setNoRender(); $this->_helper->redirector('login', 'auth'); } public function loginAction() { if (Zend_Auth::getInstance()->hasIdentity()) { - print_a('Already logged in.'); + $this->_redirect('/dev/'); } else { if (!isset($_POST["login"])){ $loginForm = new dev_Form_AuthLogin(); @@ -61,7 +62,6 @@ class dev_AuthController extends Zend_Controller_Action } } } - $this->view->loginForm = $loginForm; } } @@ -101,16 +101,17 @@ class dev_AuthController extends Zend_Controller_Action return; } } - $this->view->registerForm = $registerForm; } } public function logoutAction() { + $this->_helper-> viewRenderer-> setNoRender(); $auth = Zend_Auth::getInstance(); $auth->clearIdentity(); $this->_helper->redirector('login', 'auth'); + return; } public function recoverpasswordAction() @@ -141,12 +142,12 @@ class dev_AuthController extends Zend_Controller_Action } */ } - $this->view->recoverPasswordForm = $recoverPasswordForm; } public function deleteAction() { + $this->_helper-> viewRenderer-> setNoRender(); $result = $this->personmapper->findBy('email', Zend_Auth::getInstance()->getIdentity()); $person = $result[0]; $personID = $person["personID"]; @@ -164,6 +165,7 @@ class dev_AuthController extends Zend_Controller_Action $auth = Zend_Auth::getInstance(); $auth->clearIdentity(); $this->_helper->redirector('login', 'auth'); + return; } } } diff --git a/application/modules/dev/controllers/GroupController.php b/application/modules/dev/controllers/GroupController.php index 1a063a7..c86e4fe 100644 --- a/application/modules/dev/controllers/GroupController.php +++ b/application/modules/dev/controllers/GroupController.php @@ -20,8 +20,9 @@ class dev_GroupController extends Zend_Controller_Action $this->personmapper = new Application_Model_PersonMapper(); $this->rolemapper = new Application_Model_RoleMapper(); $this->groupList = $this->groupMapper->fetchAll(); - } else { - $this->_redirect('/dev/login/auth'); + } else { + $this->_helper->redirector('login', 'auth'); + return; } } @@ -62,7 +63,8 @@ class dev_GroupController extends Zend_Controller_Action } } - echo "Group successfully added. <br/>"; + $this->_helper->redirector('', 'group'); + return; } } @@ -71,13 +73,14 @@ class dev_GroupController extends Zend_Controller_Action public function editAction() { - if(!isset($_POST['groupID'])) { + $groupID = $this->_request->getParam('groupID'); + if(!isset($groupID)) { $addForm = new dev_Form_GroupAdd(array('grouplist' => $this->groupList)); $this->view->addForm = $addForm; return; } if (!isset($_POST["save"])){ - $group = $this->groupMapper->find($_POST['groupID']); + $group = $this->groupMapper->find($groupID); $_POST['title'] = $group->getTitle(); $_POST['description'] = $group->getDescription(); $editForm = new dev_Form_GroupEdit(); @@ -94,7 +97,8 @@ class dev_GroupController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "<br/>"; return; } - echo "Successfully saved. <br/>"; + $this->_helper->redirector('', 'group'); + return; } } @@ -103,8 +107,9 @@ class dev_GroupController extends Zend_Controller_Action public function showAction() { - if($_POST['groupID']) { - $groupRequests = $this->groupRequestMapper->findBy('groupID', $_POST['groupID']); + $groupID = $this->_request->getParam('groupID'); + if($groupID) { + $groupRequests = $this->groupRequestMapper->findBy('groupID', $groupID); if(isset($groupRequests)) { foreach($groupRequests as $groupRequest) { $person = $this->personmapper->find($groupRequest['personID']); @@ -113,10 +118,12 @@ class dev_GroupController extends Zend_Controller_Action 'person' => $person ); } - $this->view->groupRequestList = $groupRequestList; - $this->view->roleList = $this->rolemapper->findBy('groupID', $_POST['groupID']); + if(is_array($groupRequestList)) { + $this->view->groupRequestList = $groupRequestList; + } + $this->view->roleList = $this->rolemapper->findBy('groupID', $groupID); } - $members = $this->membershipMapper->findBy('groupID', $_POST['groupID']); + $members = $this->membershipMapper->findBy('groupID', $groupID); if(isset($members)) { foreach($members as $member) { $person = $this->personmapper->find($member['personID']); @@ -125,15 +132,18 @@ class dev_GroupController extends Zend_Controller_Action 'person' => $person ); } - $this->view->memberslist = $membersList; + if(is_array($membersList)) { + $this->view->membersList = $membersList; + } } - $groupgroups = $this->groupGroupsMapper->findBy('groupID', $_POST['groupID']); + $groupgroups = $this->groupGroupsMapper->findBy('groupID', $groupID); if(is_object($groupgroups)) { $parentGroup = $this->groupMapper->find($groupgroups->getParentID()); $this->view->$parentGroup = $parentGroup; } - $group = $this->groupMapper->find($_POST['groupID']); + $group = $this->groupMapper->find($groupID); $this->view->group = $group; + $this->view->groupID = $groupID; } } @@ -156,7 +166,8 @@ class dev_GroupController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "<br/>"; return; } - echo "Groups successfully linked. <br/>"; + $this->_helper->redirector('', 'group'); + return; } } @@ -165,8 +176,10 @@ class dev_GroupController extends Zend_Controller_Action public function deleteAction() { - if (isset($_POST["groupID"])){ - $group = $this->groupMapper->find($_POST["groupID"]); + $this->_helper->viewRenderer->setNoRender(); + $groupID = $this->_request->getParam('groupID'); + if (isset($groupID)){ + $group = $this->groupMapper->find($groupID); try { $this->groupMapper->delete($group); } catch(Zend_Exception $e) @@ -175,12 +188,14 @@ class dev_GroupController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "<br/>"; return; } - echo "Group successfully deleted. <br/>"; + $this->_helper->redirector('', 'group'); + return; } } public function grantpersonAction() { + $this->_helper->viewRenderer->setNoRender(); if(isset($_POST['grouprequestID']) && isset($_POST['roleID'])) { $groupRequest = $this->groupRequestMapper->find($_POST['grouprequestID']); try { @@ -203,14 +218,16 @@ class dev_GroupController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "<br/>"; return; } - echo "Chosen Person has been successfully added to the chosen group. <br />"; + $this->_redirect("/dev/group/show/groupID/" . $groupRequest->getGroupID()); } } public function revokepersonAction() { - if(isset($_POST['membershipID'])) { - $membership = $this->membershipMapper->find($_POST['membershipID']); + $this->_helper->viewRenderer->setNoRender(); + $membershipID = $this->_request->getParam('membershipID'); + if(isset($membershipID)) { + $membership = $this->membershipMapper->find($membershipID); if(isset($membership)) { try { $this->membershipMapper->delete($membership); @@ -220,7 +237,7 @@ class dev_GroupController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "<br/>"; return; } - echo "Chosen Person has been successfully removed from the chosen group. <br />"; + $this->_redirect("/dev/group/edit/groupID/" . $membership->getGroupID()); } } diff --git a/application/modules/dev/controllers/PersonController.php b/application/modules/dev/controllers/PersonController.php index b7e050f..e422870 100644 --- a/application/modules/dev/controllers/PersonController.php +++ b/application/modules/dev/controllers/PersonController.php @@ -24,19 +24,24 @@ class dev_PersonController extends Zend_Controller_Action foreach($this->memberships as $membership) { $group = $this->groupMapper->find($membership['groupID']); $this->groups[] = array ( - 'id' => $group->getID(), - 'title' => $group->getTitle() + 'groupID' => $group->getID(), + 'title' => $group->getTitle(), + 'description' => $group->getDescription(), + 'membershipID' => $membership['membershipID'] ); } } } else { - $this->_redirect('/dev/auth/login'); + $this->_helper->redirector('login', 'auth'); + return; } } public function indexAction() { - $this->_redirect('/dev/person/show'); + $this->_helper-> viewRenderer-> setNoRender(); + $this->_helper->redirector('show', 'person'); + return; } public function showAction() @@ -69,10 +74,10 @@ class dev_PersonController extends Zend_Controller_Action echo "Email Address already existing."; return; } - echo "Successfully saved. <br/>"; + $this->_helper->redirector('show', 'person'); + return; } } - $this->view->editForm = $editForm; } @@ -112,7 +117,8 @@ class dev_PersonController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "<br/>"; return; } - echo "Successfully requested. <br />"; + $this->_helper->redirector('show', 'person'); + return; } } $this->view->requestForm = $requestForm; @@ -120,24 +126,21 @@ class dev_PersonController extends Zend_Controller_Action public function leaveAction() { + $this->_helper-> viewRenderer-> setNoRender(); $this->view->person = $this->person; - if(isset($_POST['groupID'])) { - if(isset($this->memberships)) { - foreach($this->memberships as $membership) { - if($membership['groupID'] == $_POST['groupID']) { - $membershipObject = $this->membershipMapper->find($membership['membershipID']); - try { - $this->membershipMapper->delete($membershipObject); - } catch(Zend_Exception $e) - { - echo "Caught exception: " . get_class($e) . "<br/>"; - echo "Message: " . $e->getMessage() . "<br/>"; - return; - } - echo "You have been successfully removed from the chosen group. <br />"; - } - } + $membershipID = $this->_request->getParam('membershipID'); + if(isset($membershipID)) { + $membership = $this->membershipMapper->find($membershipID); + try { + $this->membershipMapper->delete($membership); + } catch(Zend_Exception $e) + { + echo "Caught exception: " . get_class($e) . "<br/>"; + echo "Message: " . $e->getMessage() . "<br/>"; + return; } + $this->_helper->redirector('show', 'person'); + return; } } } @@ -152,3 +155,4 @@ class dev_PersonController extends Zend_Controller_Action + diff --git a/application/modules/dev/views/scripts/auth/delete.phtml b/application/modules/dev/views/scripts/auth/delete.phtml deleted file mode 100644 index e69de29..0000000 --- a/application/modules/dev/views/scripts/auth/delete.phtml +++ /dev/null diff --git a/application/modules/dev/views/scripts/auth/index.phtml b/application/modules/dev/views/scripts/auth/index.phtml deleted file mode 100644 index e69de29..0000000 --- a/application/modules/dev/views/scripts/auth/index.phtml +++ /dev/null diff --git a/application/modules/dev/views/scripts/auth/logout.phtml b/application/modules/dev/views/scripts/auth/logout.phtml deleted file mode 100644 index a709bd9..0000000 --- a/application/modules/dev/views/scripts/auth/logout.phtml +++ /dev/null @@ -1 +0,0 @@ -<br /><br /><center>View script for controller <b>Auth</b> and script/action name <b>logout</b></center>
\ No newline at end of file diff --git a/application/modules/dev/views/scripts/bootos/index.phtml b/application/modules/dev/views/scripts/bootos/index.phtml index 6462b1f..c5970b6 100644 --- a/application/modules/dev/views/scripts/bootos/index.phtml +++ b/application/modules/dev/views/scripts/bootos/index.phtml @@ -4,38 +4,39 @@ 'class' => 'addbutton'))?> <table> - <tr> - <th>ID</th> - <th>Title</th> - <th>GroupID</th> - <th>MembershipID</th> - <th>ConfigID</th> - <th>Init</th> - <th>Kernel</th> - <th>Kcl</th> - <th>Description</th> - <th>Changed</th> - <th>Expires</th> - <th>Public</th> - <th colspan=2>Actions</th> - </tr> - <?php if(count($this->bootoslist)==0) - echo "</table> There are no BootOs's to display." ?> - <?php foreach ($this->bootoslist as $bootos): ?> - <tr class=entry> - <td><?php echo $this->escape($bootos->getID()); ?></td> - <td><?php echo $this->escape($bootos->getTitle()); ?></td> - <td><?php echo $this->escape($bootos->getGroupID()); ?></td> - <td><?php echo $this->escape($bootos->getMembershipID()); ?></td> - <td><?php echo $this->escape($bootos->getConfigID()); ?></td> - <td><?php echo $this->escape($bootos->getPath_init()); ?></td> - <td><?php echo $this->escape($bootos->getPath_kernel()); ?></td> - <td><?php echo $this->escape($bootos->getDefaultkcl()); ?></td> - <td><?php echo $this->escape($bootos->getDescription()); ?></td> - <td><?php echo $this->escape(date('Y-m-d H:i:s', $bootos->getCreated())); ?></td> - <td><?php echo $this->escape($bootos->getExpires()); ?></td> - <td><?php echo $this->escape($bootos->getPublic()); ?></td> - <td class='action'><a href="<?php echo $this->url( + <tr> + <th>ID</th> + <th>Title</th> + <th>GroupID</th> + <th>MembershipID</th> + <th>ConfigID</th> + <th>Init</th> + <th>Kernel</th> + <th>Kcl</th> + <th>Description</th> + <th>Changed</th> + <th>Expires</th> + <th>Public</th> + <th colspan=2>Actions</th> + </tr> + <?php if(count($this->bootoslist)==0) + echo "</table> There are no BootOs's to display." ?> + <?php foreach ($this->bootoslist as $bootos): ?> + <tr class=entry> + <td><?php echo $this->escape($bootos->getID()); ?></td> + <td><?php echo $this->escape($bootos->getTitle()); ?></td> + <td><?php echo $this->escape($bootos->getGroupID()); ?></td> + <td><?php echo $this->escape($bootos->getMembershipID()); ?></td> + <td><?php echo $this->escape($bootos->getConfigID()); ?></td> + <td><?php echo $this->escape($bootos->getPath_init()); ?></td> + <td><?php echo $this->escape($bootos->getPath_kernel()); ?></td> + <td><?php echo $this->escape($bootos->getDefaultkcl()); ?></td> + <td><?php echo $this->escape($bootos->getDescription()); ?></td> + <td><?php echo $this->escape(date('Y-m-d H:i:s', $bootos->getCreated())); ?></td> + <td><?php echo $this->escape($bootos->getExpires()); ?></td> + <td><?php echo $this->escape($bootos->getPublic()); ?></td> + <td class='action'><a + href="<?php echo $this->url( array( 'module' => 'dev', 'controller' => 'bootos', @@ -43,8 +44,9 @@ 'bootosID' => $bootos->getID() ), 'default', - true, false) ?>"><img src='/media/img/edit.png' alt='Edit BootOS'/></a></td> - <td class='action'><a href="<?php echo $this->url( + true, false) ?>"><img src='/media/img/edit.png' alt='Edit BootOS' /></a></td> + <td class='action'><a + href="<?php echo $this->url( array( 'module' => 'dev', 'controller' => 'bootos', @@ -52,13 +54,13 @@ 'bootosID' => $bootos->getID() ), 'default', - true) ?>"><img src='/media/img/delete.png' alt='Delete BootOS'/></a></td> - </tr> - <?php endforeach; ?> + true) ?>"><img src='/media/img/delete.png' alt='Delete BootOS' /></a></td> + </tr> + <?php endforeach; ?> </table> - - - + + + 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 diff --git a/application/modules/dev/views/scripts/person/index.phtml b/application/modules/dev/views/scripts/person/index.phtml deleted file mode 100644 index e69de29..0000000 --- a/application/modules/dev/views/scripts/person/index.phtml +++ /dev/null diff --git a/application/modules/dev/views/scripts/person/leave.phtml b/application/modules/dev/views/scripts/person/leave.phtml deleted file mode 100644 index fc96431..0000000 --- a/application/modules/dev/views/scripts/person/leave.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/person/show.phtml b/application/modules/dev/views/scripts/person/show.phtml index 945bb61..b0c6fc1 100644 --- a/application/modules/dev/views/scripts/person/show.phtml +++ b/application/modules/dev/views/scripts/person/show.phtml @@ -1,70 +1,45 @@ -<div align="right"> -<button onclick="location.href='/dev/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> +<h1>Person</h1> +<?php echo $this->formButton('editperson', 'Edit', array( + 'onclick' => 'self.location="/dev/person/edit/"', + 'class' => 'rightbutton'))?> +<br /><br /> +<div class="personColorDiv"><span class="bold">Title:</span> <?php echo $this->person->getTitle(); ?></div> +<div class="personDiv"><span class="bold">Name:</span> <?php echo $this->person->getName(); ?></div> +<div class="personColorDiv"><span class="bold">Firstname:</span> <?php echo $this->person->getFirstname(); ?></div> +<div class="personDiv"><span class="bold">Street:</span> <?php echo $this->person->getStreet(); ?></div> +<div class="personColorDiv"><span class="bold">Housenumber:</span> <?php echo $this->person->getHousenumber(); ?></div> +<div class="personDiv"><span class="bold">City:</span> <?php echo $this->person->getCity(); ?></div> +<div class="personColorDiv"><span class="bold">Postalcode:</span> <?php echo $this->person->getPostalcode(); ?></div> +<div class="personDiv"><span class="bold">Email:</span> <?php echo $this->person->getEmail(); ?></div> +<div class="personColorDiv"><span class="bold">Last Login Date:</span> <?php if( $this->person->getLogindate()) echo date ('d. F Y - H:i', $this->person->getLogindate()) . " Uhr"; ?></div> +<div class="personDiv"><span class="bold">Register Date:</span> <?php echo date ('d. F Y - H:i', $this->person->getRegisterdate()) . ' Uhr'; ?></div> <?php if(isset($this->groups)) { ?> <br /> -<div>Member in the following Groups:</div> -<br /> +<h2>Member in the following Groups:</h2> <table> <?php foreach($this->groups as $group) { ?> <tr> <th>Title</th> - <th>Functions</th> + <th>Description</th> + <th>Leave</th> </tr> <tr> <td><?php echo $group['title']; ?></td> - <td> - <form name="leaveGroup<?php echo $group['id']; ?>" - action="/dev/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><?php echo $group['description']; ?></td> + <td class='action'><a + href="<?php echo $this->url( + array( + 'module' => 'dev', + 'controller' => 'person', + 'action' => 'leave', + 'membershipID' => $group['membershipID'] + ), + 'default', + true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' /></a> </td> </tr> <?php @@ -72,8 +47,9 @@ foreach($this->groups as $group) { } ?> </table> -<br /> -<div> -<button onclick="location.href='/dev/person/request'">Add to additional -Groups</button> -</div> +<?php echo $this->formButton('addtogroup', 'Add to additional +Groups', array( + 'onclick' => 'self.location="/dev/person/request/"', + 'class' => 'addbutton')); +?> +<br /><br /><br /><br /><br />
\ No newline at end of file diff --git a/public/media/css/style.css b/public/media/css/style.css index 8390fb2..103ab3d 100644 --- a/public/media/css/style.css +++ b/public/media/css/style.css @@ -1,272 +1,329 @@ -body{font-family:sans,arial; - width:100%; - height:100%; - margin:0; - padding:0; +body { + font-family: sans, arial; + width: 100%; + height: 100%; + margin: 0; + padding: 0; } + #logo { - height:200px; - width:200px; - background: url(/media/img/unilogo-200x66.gif) bottom right no-repeat; + height: 200px; + width: 200px; + background: url(/media/img/unilogo-200x66.gif) bottom right no-repeat; } #logo-bar-gray { - position:relative; - top:116px; - left:0px; - height:4px; - width:132px; - background-color: #cacac8; - /*border:1px solid red;*/ + position: relative; + top: 116px; + left: 0px; + height: 4px; + width: 132px; + background-color: #cacac8; + /*border:1px solid red;*/ } #logo-bar-red { - position:relative; - top:0px; - left:0px; - height:4px; - width:22px; - background-color: #c1002a; - /*border:1px solid red;*/ + position: relative; + top: 0px; + left: 0px; + height: 4px; + width: 22px; + background-color: #c1002a; + /*border:1px solid red;*/ } -#sidepannel{ - float:left; + +#sidepannel { + float: left; } + #sidepannel li { - font-size:11.5px; - padding-top:2px; + font-size: 11.5px; + padding-top: 2px; } #sidepannel ul { - padding-left:22px; + padding-left: 22px; } #sidepannel ul { - font-weight:bold; + font-weight: bold; } #sidepannel ul.inner-ul { - font-weight:normal; + font-weight: normal; } #sidepannel li.li-selected { - font-style:italic; - font-weight:bold; - color:#000033; + font-style: italic; + font-weight: bold; + color: #000033; } + #footer { - position:fixed; - margin:0 auto; - width:1000px; - clear:both; - bottom:0px; - - border-top:1px solid #ccc; - background-color: #eee; - - text-align:right; - font-size:10.5px; - line-height:16px; - color:#666; - - } -#main{margin-left:200px;width:800px;} + position: fixed; + margin: 0 auto; + width: 1000px; + clear: both; + bottom: 0px; + border-top: 1px solid #ccc; + background-color: #eee; + text-align: right; + font-size: 10.5px; + line-height: 16px; + color: #666; +} + +#main { + margin-left: 200px; + width: 800px; +} + #head-bg { - height:116px; - background-color: #003592; + height: 116px; + background-color: #003592; } + #head { - height:116px; - background: url(/media/img/siegel-93x55.png) bottom left no-repeat, - url(/media/img/sub-logo-small.gif) bottom right no-repeat; + height: 116px; + background: url(/media/img/siegel-93x55.png) bottom left no-repeat, + url(/media/img/sub-logo-small.gif) bottom right no-repeat; } -#head h1, h2 { - color:white; + +#head h1,h2 { + color: white; } #head h1 { - font-size: 22px; - padding-top:30px; - padding-left:54px; - padding-bottom:4px; - margin:0; + font-size: 22px; + padding-top: 30px; + padding-left: 54px; + padding-bottom: 4px; + margin: 0; } #head h2 { - font-size: 12px; - padding:0; - margin:0; - padding-left:64px; + font-size: 12px; + padding: 0; + margin: 0; + padding-left: 64px; } + #logo-bar-red { - position:relative; - top:0px; - left:0px; - height:4px; - width:22px; - background-color: #c1002a; - /*border:1px solid red;*/ + position: relative; + top: 0px; + left: 0px; + height: 4px; + width: 22px; + background-color: #c1002a; + /*border:1px solid red;*/ } + #head-titlebar { - height:22px; - line-height:22px; - font-size:13px; - padding-left:10px; - background-color:#cacac8; + height: 22px; + line-height: 22px; + font-size: 13px; + padding-left: 10px; + background-color: #cacac8; } -#content{ + +#content { padding: 10px; - font-size:13px; + font-size: 13px; } -#debug{ - text-align:left; - position:absolute; - top:0px; right:0px; - width:400px; + +#debug { + text-align: left; + position: absolute; + top: 0px; + right: 0px; + width: 400px; } -#debug .v1{ - text-align:right; + +#debug .v1 { + text-align: right; } -#debug a{ - font-size:10px; - margin-right:5px; - color:#009; + +#debug a { + font-size: 10px; + margin-right: 5px; + color: #009; } + #debug a img { - border:none; + border: none; } -/* ###################################################### */ +/* ###################################################### */ #nav { -border-bottom:1px solid #000; -border-top:1px solid #000; -background-color:#CCE7FF; -padding:5px 10px; + border-bottom: 1px solid #000; + border-top: 1px solid #000; + background-color: #CCE7FF; + padding: 5px 10px; } #nav ul { -margin:2px; -padding:8px; + margin: 2px; + padding: 8px; } #nav li { -display:inline; -list-style-type:none; -padding-right:10px; -font-family:verdana; -font-size:12px; + display: inline; + list-style-type: none; + padding-right: 10px; + font-family: verdana; + font-size: 12px; } #nav li a { -color:#000; + color: #000; } #content h1 { -display:block; -text-align:center; -margin:5px auto; + display: block; + text-align: center; + margin: 5px auto; } -#content h2{ - display:block; - text-align:center; - color:#000; + +#content h2 { + display: block; + text-align: center; + color: #000; } table { -width:100%; + width: 100%; } th { -font-size:12px; -border:1px solid #999; + font-size: 12px; + border: 1px solid #999; } td { -font-size:12px; -border:1px solid #CCC; + font-size: 12px; + border: 1px solid #CCC; } .addbutton { - float:right; + float: right; } -.addbutton:before{ - content: url(/media/img/create.png)' '; + +.addbutton:before { + content: url(/media/img/create.png) ' '; +} + +.rightbutton { + float: right; +} + +.personDiv { + border: 1px solid #CCC; + margin-bottom: 10px; +} + +.personColorDiv { + border: 1px solid #CCC; + margin-bottom: 10px; + background-color: #FFF5CC; } .monospace { -font-family:Courier New, monospace; + font-family: Courier New, monospace; } dl.zend_form dt { -width:120px; -float:left; -font-family:verdana, arial; -font-size:12px; + width: 120px; + float: left; + font-family: verdana, arial; + font-size: 12px; } dl.zend_form dd { -margin-left:120px; + margin-left: 120px; } dl.zend_form dd * { -font-size:12px; + font-size: 12px; } tr.entry { -background-color:#FFF5CC; + background-color: #FFF5CC; } tr.detail>td { -border:none; + border: none; } -td.arrowtop{ -vertical-align:top; -text-align:center; + +td.arrowtop { + vertical-align: top; + text-align: center; } tr.detail table tr td { -background-color:#E2EFE1; + background-color: #E2EFE1; } -tr td.action{ - text-align:center; - width:20px; +tr td.action { + text-align: center; + width: 20px; +} + +td.action img { + border: none; +} + +.clear { + clear: both; +} + +.bold { + font-weight: bold; +} + +.footer { + text-align: right; + font-size: 10px; + font-family: Verdana, Arial; + padding: 10px 0px 10px 0px; } -td.action img{border:none;} -.clear{clear:both;} -.footer{text-align:right;font-size:10px;font-family:Verdana, Arial;padding:10px 0px 10px 0px;} /* boxes */ -.okbox, .warningbox, .errorbox, .infobox { - margin:10px 0px; - padding:10px 10px 10px 40px; - border-width:1px; - color:#555; +.okbox,.warningbox,.errorbox,.infobox { + margin: 10px 0px; + padding: 10px 10px 10px 40px; + border-width: 1px; + color: #555; } -.checkbox a, .warningbox a, .errorbox a{ - color:#555; + +.checkbox a,.warningbox a,.errorbox a { + color: #555; } -.infobox a{ - color:#777; + +.infobox a { + color: #777; } -.warningbox{ - border:1px solid #CCC; - background: #FFFFAA url('/media/img/box_warning.png') no-repeat; - background-position:10px center; + +.warningbox { + border: 1px solid #CCC; + background: #FFFFAA url('/media/img/box_warning.png') no-repeat; + background-position: 10px center; } -.errorbox{ - border:1px solid #990000; + +.errorbox { + border: 1px solid #990000; background: #FF9999 url('/media/img/box_error.png') no-repeat; - background-position:10px center; + background-position: 10px center; } -.okbox{ - border:1px solid #339933; + +.okbox { + border: 1px solid #339933; background: #BBFFBB url('/media/img/box_check.png') no-repeat; - background-position:10px center; + background-position: 10px center; } -.infobox{ - border:1px solid #CCC; + +.infobox { + border: 1px solid #CCC; background: #FFFFFF url('/media/img/box_info.png') no-repeat; - background-position:10px center; - color:#777; -} + background-position: 10px center; + color: #777; +}
\ No newline at end of file diff --git a/public/media/img/save.png b/public/media/img/save.png Binary files differnew file mode 100644 index 0000000..5cb71bd --- /dev/null +++ b/public/media/img/save.png diff --git a/public/media/img/show.png b/public/media/img/show.png Binary files differnew file mode 100644 index 0000000..2a29102 --- /dev/null +++ b/public/media/img/show.png |
