From f32dbe7ad95257387a5f4c70ff0b3eb846f4a4e5 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 8 Apr 2011 18:33:34 +0200 Subject: Pool & Client - Je nach Rechten unterschiedliche Anzeigen --- .../modules/user/views/scripts/client/index.phtml | 6 ++++++ .../modules/user/views/scripts/pool/index.phtml | 21 ++++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) (limited to 'application/modules/user/views') diff --git a/application/modules/user/views/scripts/client/index.phtml b/application/modules/user/views/scripts/client/index.phtml index 7cdc03d..0d6145c 100644 --- a/application/modules/user/views/scripts/client/index.phtml +++ b/application/modules/user/views/scripts/client/index.phtml @@ -1,9 +1,11 @@

Clients

notification != ''){echo $this->notification;} ?> searchform; ?> + formButton('createbootos', 'Create Client', array( 'onclick' => 'self.location="/user/client/addclient/page/'.$this->page.'"', 'class' => 'addbutton'))?> +
Available searchfilter:
clientID
@@ -19,6 +21,7 @@
escape($client['clientID']) ?>
+ Edit Client + + Delete Client +
diff --git a/application/modules/user/views/scripts/pool/index.phtml b/application/modules/user/views/scripts/pool/index.phtml index 7d5a6cc..fbdb8f8 100644 --- a/application/modules/user/views/scripts/pool/index.phtml +++ b/application/modules/user/views/scripts/pool/index.phtml @@ -1,10 +1,11 @@

Pools

notification != ''){echo $this->notification;} ?> searchform; ?> + formButton('createconfig', 'Create Pool', array( 'onclick' => 'self.location="/user/pool/createpool/page/'.$this->page.'"', 'class' => 'addbutton'))?> - +
Available searchfilter:
bootosID
@@ -28,6 +29,7 @@
escape($pool->getID()) ?>
+ Edit Pool + + Delete Pool + + Link Client +
+ Unlink Client +
@@ -101,8 +110,8 @@
-
- + +
@@ -111,14 +120,14 @@ pagination; ?> -freeclients) && count($this->freeclients)>0): ?> +freeclients) && count($this->freeclients)>0 && Pbs_Acl::checkRight('posuc')): ?>

Free clients

Search:   Cancel Search

-
+
freeclients as $client): ?> @@ -126,6 +135,7 @@
5
+ +
-- cgit v1.2.3-55-g7522 From bb10fcf80e13b171be3bf4bcce7405d7315c3f21 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 8 Apr 2011 19:00:51 +0200 Subject: findby in Filter angepasst, Aktionsicons nur bei Berechtigung --- .../modules/user/controllers/FilterController.php | 9 ++++--- application/modules/user/forms/FilterEntry.php | 2 +- .../modules/user/views/scripts/filter/index.phtml | 28 +++++++++++++++------- 3 files changed, 24 insertions(+), 15 deletions(-) (limited to 'application/modules/user/views') diff --git a/application/modules/user/controllers/FilterController.php b/application/modules/user/controllers/FilterController.php index ead81ab..a65aba5 100644 --- a/application/modules/user/controllers/FilterController.php +++ b/application/modules/user/controllers/FilterController.php @@ -260,14 +260,13 @@ class User_FilterController extends Zend_Controller_Action private function prepareFormData(){ $poolMapper = new Application_Model_PoolMapper(); - $pools = $poolMapper->findBY('groupID',$this->membership->getGroupID()); + $pools = $poolMapper->findBy(array('groupID'=>$this->membership->getGroupID()),true); $bootisoMapper = new Application_Model_BootIsoMapper(); - $bootisos = $bootisoMapper->findBY('groupID',$this->membership->getGroupID(),true); + $bootisos = $bootisoMapper->findBy(array('groupID'=>$this->membership->getGroupID()),true); $membershipMapper = new Application_Model_MembershipMapper(); - $memberships = $membershipMapper->findBY('groupID',$this->membership->getGroupID()); - + $memberships = $membershipMapper->findBy(array('groupID'=>$this->membership->getGroupID()),true); $grouppMapper = new Application_Model_GroupMapper(); $group = new Application_Model_Group(); @@ -275,7 +274,7 @@ class User_FilterController extends Zend_Controller_Action $groups[] = $group->toArray(); $clientMapper = new Application_Model_ClientMapper(); - $clients = $clientMapper->findBY('groupID',$this->membership->getGroupID()); + $clients = $clientMapper->findBy(array('groupID'=>$this->membership->getGroupID()),true); return array ( 'clients' => $clients, 'memberships' => $memberships, diff --git a/application/modules/user/forms/FilterEntry.php b/application/modules/user/forms/FilterEntry.php index 3fe1aa7..ce2e4de 100644 --- a/application/modules/user/forms/FilterEntry.php +++ b/application/modules/user/forms/FilterEntry.php @@ -74,7 +74,7 @@ class user_Form_FilterEntry extends Zend_Form 'regex', false, array( - '/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/i', + '/^(([0-9]|[1-9][0-9]|0[0-9]{2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([[0-9]|[1-9][0-9]|0[0-9]{2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/i', 'messages' => array( Zend_Validate_Regex::NOT_MATCH => "'%value%' is not a valid IP-Adress", Zend_Validate_Regex::INVALID => 'IP-Adress contains invalid characters.' diff --git a/application/modules/user/views/scripts/filter/index.phtml b/application/modules/user/views/scripts/filter/index.phtml index c928216..098c43d 100644 --- a/application/modules/user/views/scripts/filter/index.phtml +++ b/application/modules/user/views/scripts/filter/index.phtml @@ -1,10 +1,11 @@

Filters

notification != ''){echo $this->notification;} ?> searchform; ?> + formButton('createconfig', 'Create Filter', array( 'onclick' => 'self.location="/user/filter/addfilter/page/'.$this->page.'"', 'class' => 'addbutton'))?> - +
Available searchfilter:
filterID
@@ -23,6 +24,7 @@
escape($filter->priority) ?>
+ Edit Filter + + Delete Filter + + Add Filterentry +
escape($filter->title) ?>
@@ -76,6 +83,7 @@
+ Edit Filterentry + + Delete Filterentry -
- -
:
+ +
+
:
-- cgit v1.2.3-55-g7522