summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon2011-04-13 17:32:56 +0200
committerSimon2011-04-13 17:32:56 +0200
commit2f2ccac220efcef4df867fcc7febc4ca734cabcb (patch)
tree386f91f9142d33555943d624cdb75ba35c98e551
parentSuperordinated Group ist immer die aktuelle Gruppe (diff)
parentHTML Fehler, die in Eclipse angezeigt wurden, entfernt (diff)
downloadpbs2-2f2ccac220efcef4df867fcc7febc4ca734cabcb.tar.gz
pbs2-2f2ccac220efcef4df867fcc7febc4ca734cabcb.tar.xz
pbs2-2f2ccac220efcef4df867fcc7febc4ca734cabcb.zip
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
-rw-r--r--application/modules/dev/views/scripts/filter/index.phtml4
-rw-r--r--application/modules/user/controllers/SessionController.php79
-rw-r--r--application/modules/user/views/scripts/bootos/index.phtml2
-rw-r--r--application/modules/user/views/scripts/index/index.phtml2
-rw-r--r--application/modules/user/views/scripts/role/add.phtml16
-rw-r--r--send-post.html18
6 files changed, 68 insertions, 53 deletions
diff --git a/application/modules/dev/views/scripts/filter/index.phtml b/application/modules/dev/views/scripts/filter/index.phtml
index b555318..fd46cd7 100644
--- a/application/modules/dev/views/scripts/filter/index.phtml
+++ b/application/modules/dev/views/scripts/filter/index.phtml
@@ -91,7 +91,7 @@
'filterentriesID' => $filterentry['filterentriesID']
),
'default',
- true) ?>"><img src='/media/img/edit.png' alt='Edit Filterentry'/></a>
+ true) ?>"><img src='/media/img/edit.png' alt='Edit Filterentry'/></a></td>
<td class='action'><a href="<?php echo $this->url(
array(
'module' => 'dev',
@@ -100,7 +100,7 @@
'filterentriesID' => $filterentry['filterentriesID']
),
'default',
- true) ?>"><img src='/media/img/delete.png' alt='Delete Filterentry'/></a>
+ true) ?>"><img src='/media/img/delete.png' alt='Delete Filterentry'/></a></td>
</tr>
<?php endforeach ?>
diff --git a/application/modules/user/controllers/SessionController.php b/application/modules/user/controllers/SessionController.php
index e17dbfe..d0b05ec 100644
--- a/application/modules/user/controllers/SessionController.php
+++ b/application/modules/user/controllers/SessionController.php
@@ -3,9 +3,9 @@
class User_SessionController extends Zend_Controller_Action
{
private $membership;
- public function init()
- {
- if (Zend_Auth::getInstance()->hasIdentity()) {
+ public function init()
+ {
+ if (Zend_Auth::getInstance()->hasIdentity()) {
$userIDsNamespace = Zend_Session::namespaceGet('userIDs');
if($userIDsNamespace['membershipID'] ==''){
$pbsNotifier = new Pbs_Notifier();
@@ -20,42 +20,42 @@ class User_SessionController extends Zend_Controller_Action
}
$this->page = $this->_request->getParam('page');
- }
+ }
+
+ public function indexAction()
+ {
+ if(!Pbs_Acl::checkRight('so'))
+ $this->_redirect('/user/index');
- public function indexAction()
- {
- if(!Pbs_Acl::checkRight('so'))
- $this->_redirect('/user/index');
-
$sessionMapper = new Application_Model_SessionMapper();
$bootisoMapper = new Application_Model_BootIsoMapper();
$bootosMapper = new Application_Model_BootOsMapper();
$bootmenuentriesMapper = new Application_Model_BootMenuEntriesMapper();
$membershipMapper = new Application_Model_MembershipMapper();
$personMapper = new Application_Model_PersonMapper();
-
+
$bootisos = $bootisoMapper->findBy(array('groupID',$this->membership->getGroupID()));
foreach($bootisos as $bootiso){
- $sessions = $sessionMapper->findBy(array('bootisoID',$bootiso->getID()));
+ $sessions = $sessionMapper->findBy(array('bootisoID',$bootiso->getID()));
foreach($sessions as $session){
#echo $session->getBootosID();
if($session->getBootosID() != ''){
$bo = $bootosMapper->find($session->getBootosID());
if($bo != null)
- $session->setBootosID("[".$session->getBootosID()."] ".$bo->getTitle());
+ $session->setBootosID("[".$session->getBootosID()."] ".$bo->getTitle());
}
if($session->getBootmenuentryID() != ''){
$bm = $bootmenuentriesMapper->find($session->getBootmenuentryID());
- if($bm != null)
- $session->setBootmenuentryID("[".$session->getBootmenuentryID()."] ".$bm->getTitle());
-
+ if($bm != null)
+ $session->setBootmenuentryID("[".$session->getBootmenuentryID()."] ".$bm->getTitle());
+
}
-
+
if($session->getBootisoID() != ''){
$bi = $bootisoMapper->find($session->getBootisoID());
if($bi != null)
- $session->setBootisoID("[".$session->getBootisoID()."] ".$bi->getTitle());
+ $session->setBootisoID("[".$session->getBootisoID()."] ".$bi->getTitle());
}
if($session->getMembershipID() != ''){
@@ -63,47 +63,48 @@ class User_SessionController extends Zend_Controller_Action
$p = new Application_Model_Person();
$personMapper->find($personID,$p);
if($p != null)
- $session->setMembershipID("[".$session->getMembershipID()."] ".$p->getFirstname()." ".$p->getName());
- }
+ $session->setMembershipID("[".$session->getMembershipID()."] ".$p->getFirstname()." ".$p->getName());
+ }
$session->setTime(date(Zend_Registry::get('dateformat'),$session->getTime()));
$mySessions[] =$session;
- }
+ }
}
// Sort after date/id
- usort($mySessions, function($func_a, $func_b) {
- if($func_a->getID() == $func_b->getID()) return 0;
- return ($func_a->getID() < $func_b->getID()) ? 1 : -1;
- });
-
+ usort($mySessions, sortFunc);
+
// Search
$search = $this->_request->getParam('search');
$mySearch = new Pbs_Search();
$mySearch->setSearchTerm($search);
$mySearch->setModule('session');
if($search != ''){
- $this->view->search = $mySearch->getSearchTerm();
- $mySessions = $mySearch->search($mySessions);
+ $this->view->search = $mySearch->getSearchTerm();
+ $mySessions = $mySearch->search($mySessions);
}
$this->view->searchform = $mySearch->searchForm();
-
- // Pagination
- $pagination = new Pbs_Pagination();
- $pagination->setPerPage(10);
+
+ // Pagination
+ $pagination = new Pbs_Pagination();
+ $pagination->setPerPage(10);
$pagination->setElement($mySessions);
- $pagination->setRequestPage($this->_request->getParam('page'));
+ $pagination->setRequestPage($this->_request->getParam('page'));
$pagination->setPageUrl('/user/session/index'.((isset($this->view->search))?'/search/'.$this->view->search:''));
- $mySessions = $pagination->getElements();
-
+ $mySessions = $pagination->getElements();
+
$this->view->pagination = $pagination->pagination();
$this->view->page = $pagination->getRequestPage();
- $this->view->sessions = $mySessions;
-
- }
-
- public function searchAction(){
+ $this->view->sessions = $mySessions;
+
+ }
+
+ public function searchAction(){
$this->_redirect('/user/session/index/search/'.($_GET['search']));
}
}
+function sortFunc($func_a, $func_b) {
+ if($func_a->getID() == $func_b->getID()) return 0;
+ return ($func_a->getID() < $func_b->getID()) ? 1 : -1;
+} \ No newline at end of file
diff --git a/application/modules/user/views/scripts/bootos/index.phtml b/application/modules/user/views/scripts/bootos/index.phtml
index 00a0eb8..c2ce559 100644
--- a/application/modules/user/views/scripts/bootos/index.phtml
+++ b/application/modules/user/views/scripts/bootos/index.phtml
@@ -53,7 +53,7 @@
'page' => $this->page
),
'default',
- true, false) ?>"><img src='/media/img/update.png' alt='Updates available' /></a></td>
+ true, false) ?>"><img src='/media/img/update.png' alt='Updates available' /></a>
<?php else: ?>
<a><img src='/media/img/update_grey.png' alt='No updates available' /></a>
<?php endif; ?>
diff --git a/application/modules/user/views/scripts/index/index.phtml b/application/modules/user/views/scripts/index/index.phtml
index f00d0dd..4acdfca 100644
--- a/application/modules/user/views/scripts/index/index.phtml
+++ b/application/modules/user/views/scripts/index/index.phtml
@@ -5,7 +5,7 @@
<?php if(count($this->links)>0 && is_array($this->links)): ?>
<ul>
<?php foreach($this->links as $link => $text):?>
- <a href='<?php echo $link;?>'><li><?php echo $text;?></li></a>
+ <li><a href='<?php echo $link;?>'><?php echo $text;?></a></li>
<?php endforeach ?>
</ul>
</div>
diff --git a/application/modules/user/views/scripts/role/add.phtml b/application/modules/user/views/scripts/role/add.phtml
index 23d4c55..59c0dae 100644
--- a/application/modules/user/views/scripts/role/add.phtml
+++ b/application/modules/user/views/scripts/role/add.phtml
@@ -1,5 +1,19 @@
<h1>Add Role</h1>
+<div>Click to expand the boxes</div>
<?php
$this->addForm->setAction($this->url());
echo $this->addForm;
-?> \ No newline at end of file
+?>
+<script>
+$(document).ready(function(){
+ $('fieldset').children('dl:gt(0)').hide();
+ $('fieldset fieldset>legend').css('cursor','pointer');
+ $('fieldset fieldset').click(
+ function(e){
+ if($(e.target).context.nodeName == "LEGEND"){
+ $(this).children('dl').slideToggle();
+ }
+ });
+
+});
+</script> \ No newline at end of file
diff --git a/send-post.html b/send-post.html
index 6cad8c8..addeec8 100644
--- a/send-post.html
+++ b/send-post.html
@@ -10,11 +10,11 @@
<legend>http://132.230.4.27/</legend>
<form action='http://132.230.4.27/' method='post'>
<label>serialnumber</label>
- <input type='text' name='serialnumber' value='10-20-30-40-50'></br>
+ <input type='text' name='serialnumber' value='10-20-30-40-50'><br />
<label>Mac</label>
- <input type='text' name='mac' value='00:0c:29:01:63:88'></br>
+ <input type='text' name='mac' value='00:0c:29:01:63:88'><br />
<label>Hardwarehash</label>
- <input type='text' name='hardwarehash' value='51685132196851652186121869413216'></br>
+ <input type='text' name='hardwarehash' value='51685132196851652186121869413216'><br />
<input type='submit' value='Test'>
</form>
</fieldset>
@@ -22,11 +22,11 @@
<legend>http://pbs2.local/</legend>
<form action='http://pbs2.local/' method='post'>
<label>serialnumber</label>
- <input type='text' name='serialnumber' value='10-20-30-40-50'></br>
+ <input type='text' name='serialnumber' value='10-20-30-40-50'><br />
<label>Mac</label>
- <input type='text' name='mac' value='00:0c:29:01:63:88'></br>
+ <input type='text' name='mac' value='00:0c:29:01:63:88'><br />
<label>Hardwarehash</label>
- <input type='text' name='hardwarehash' value='51685132196851652186121869413216'></br>
+ <input type='text' name='hardwarehash' value='51685132196851652186121869413216'><br />
<input type='submit' value='Test'>
</form>
</fieldset>
@@ -34,11 +34,11 @@
<legend>http://localhost:81/</legend>
<form action='http://localhost:81/' method='post'>
<label>serialnumber</label>
- <input type='text' name='serialnumber' value='10-20-30-40-50'></br>
+ <input type='text' name='serialnumber' value='10-20-30-40-50'><br />
<label>Mac</label>
- <input type='text' name='mac' value='00:0c:29:01:63:88'></br>
+ <input type='text' name='mac' value='00:0c:29:01:63:88'><br />
<label>Hardwarehash</label>
- <input type='text' name='hardwarehash' value='51685132196851652186121869413216'></br>
+ <input type='text' name='hardwarehash' value='51685132196851652186121869413216'><br />
<input type='submit' value='Test'>
</form>
</fieldset>