diff options
author | Simon | 2011-04-05 12:25:36 +0200 |
---|---|---|
committer | Simon | 2011-04-05 12:25:36 +0200 |
commit | 52c631ecd01be520fa424362ae34ae0068ba0dfb (patch) | |
tree | 365e974b3586b558cd6c2cf2290dd75a50b7a3a5 | |
parent | suche in Client & Bootos (diff) | |
download | pbs2-52c631ecd01be520fa424362ae34ae0068ba0dfb.tar.gz pbs2-52c631ecd01be520fa424362ae34ae0068ba0dfb.tar.xz pbs2-52c631ecd01be520fa424362ae34ae0068ba0dfb.zip |
Suche in Bootmenu & Bootiso
5 files changed, 44 insertions, 13 deletions
diff --git a/application/modules/user/controllers/BootisoController.php b/application/modules/user/controllers/BootisoController.php index a6fbe9e..877cb65 100644 --- a/application/modules/user/controllers/BootisoController.php +++ b/application/modules/user/controllers/BootisoController.php @@ -79,6 +79,16 @@ class user_BootisoController extends Zend_Controller_Action $this->view->bootisolist = array_reverse($this->view->bootisolist); + // Search + $search = $this->_request->getParam('search'); + $mySearch = new Pbs_Search(); + $mySearch->setSearchTerm($search); + $mySearch->setModule('bootiso'); + $this->view->searchform = $mySearch->searchForm(); + if($search != ''){ + $this->view->search = $mySearch->getSearchTerm(); + $this->view->bootisolist = $mySearch->search($this->view->bootisolist); + } // Pagination $pagination = new Pbs_Pagination(); @@ -105,6 +115,10 @@ class user_BootisoController extends Zend_Controller_Action } + public function searchAction(){ + $this->_redirect('/user/bootiso/index/search/'.($_GET['search'])); + } + public function downloadbootisoAction() { $this->_helper->layout->disableLayout(); diff --git a/application/modules/user/controllers/BootmenuController.php b/application/modules/user/controllers/BootmenuController.php index 7843b3f..dfe9f20 100644 --- a/application/modules/user/controllers/BootmenuController.php +++ b/application/modules/user/controllers/BootmenuController.php @@ -88,6 +88,17 @@ class user_BootmenuController extends Zend_Controller_Action } } + // Search + $search = $this->_request->getParam('search'); + $mySearch = new Pbs_Search(); + $mySearch->setSearchTerm($search); + $mySearch->setModule('bootmenu'); + $this->view->searchform = $mySearch->searchForm(); + if($search != ''){ + $this->view->search = $mySearch->getSearchTerm(); + $bootmenu = $mySearch->search($bootmenu); + } + // Pagination $pagination = new Pbs_Pagination(); $pagination->setPerPage(2); @@ -103,6 +114,10 @@ class user_BootmenuController extends Zend_Controller_Action $this->view->bootmenuentrylist = $bootmenuentries; } + + public function searchAction(){ + $this->_redirect('/user/bootmenu/index/search/'.($_GET['search'])); + } public function createbootmenuAction() diff --git a/application/modules/user/forms/Filter.php b/application/modules/user/forms/Filter.php index 0676ba8..76cf3f8 100644 --- a/application/modules/user/forms/Filter.php +++ b/application/modules/user/forms/Filter.php @@ -10,7 +10,7 @@ class user_Form_Filter extends Zend_Form $this->setName("Add Filter"); $this->setMethod('post'); - if(Pbs_Acl::checkRight('fefp')){ + if(Pbs_Acl::checkRight('fefp') || Pbs_Acl::checkRight('fa')){ $edit = 'true'; } else{ diff --git a/application/modules/user/views/scripts/bootiso/index.phtml b/application/modules/user/views/scripts/bootiso/index.phtml index f43949d..23f7780 100644 --- a/application/modules/user/views/scripts/bootiso/index.phtml +++ b/application/modules/user/views/scripts/bootiso/index.phtml @@ -1,19 +1,20 @@ <h1>BootMedien</h1> <?php if($this->notification != ''){echo $this->notification;} ?> +<?php echo $this->searchform; ?> <?php echo $this->formButton('createbootiso', 'Create BootISO', array( 'onclick' => 'self.location="/user/bootiso/createbootiso/page/'.$this->page.'"', 'class' => 'addbutton'))?> <table> <tr> - <th>ID</th> - <th>Title</th> - <th>GroupID</th> - <th>MembershipID</th> - <th>PrebootID</th> - <th>Serialnumber</th> - <th>Created</th> - <th>Expires</th> - <th>Public</th> + <th>ID <span class='code'>bootosID</span></th> + <th>Title <span class='code'>title</span></th> + <th>GroupID <span class='code'>groupID</span></th> + <th>MembershipID <span class='code'>membershipID</span></th> + <th>PrebootID <span class='code'>prebootID</span></th> + <th>Serialnumber <span class='code'>serialnumber</span></th> + <th>Created <span class='code'>created</span></th> + <th>Expires <span class='code'>expires</span></th> + <th>Public <span class='code'>public</span></th> <th colspan=3>Actions</th> </tr> <?php if(count($this->bootisolist)==0) diff --git a/application/modules/user/views/scripts/bootmenu/index.phtml b/application/modules/user/views/scripts/bootmenu/index.phtml index a43a058..cd82bb7 100644 --- a/application/modules/user/views/scripts/bootmenu/index.phtml +++ b/application/modules/user/views/scripts/bootmenu/index.phtml @@ -1,14 +1,15 @@ <h1>BootMenu</h1> <?php if($this->notification != ''){echo $this->notification;} ?> +<?php echo $this->searchform; ?> <?php echo $this->formButton('createbootmenu', 'Create BootMenu', array( 'onclick' => 'self.location="/user/bootmenu/createbootmenu/page/'.$this->page.'"', 'class' => 'addbutton'))?> <table> <tr> - <th>ID</th> - <th>Title</th> - <th>Changed</th> + <th>ID <span class='code'>bootmenuID</span></th> + <th>Title <span class='code'>title</span></th> + <th>Changed <span class='code'>changed</span></th> <th colspan=3>Actions</th> </tr> <?php if(count($this->bootmenulist)==0) |