From 90cbe34d68eea31c6cc366628a525e48bd3fc41b Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 30 Sep 2009 13:30:29 +0000 Subject: [PATCH] Only show date selector while dates are writeable git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14414 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../opsi/admin/opsiLicenses/class_licenseByProduct.inc | 2 +- .../opsi/admin/opsiLicenses/class_licenseGeneric.inc | 7 ++++++- .../opsi/admin/opsiLicenses/class_licensePoolGeneric.inc | 2 +- .../opsi/admin/opsiLicenses/class_licenseUsage.inc | 2 +- .../opsi/admin/opsiLicenses/class_licenseUsageByHost.inc | 2 +- gosa-plugins/opsi/admin/opsiLicenses/licenseGeneric.tpl | 6 ++++++ 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseByProduct.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseByProduct.inc index 83f79e581..8609c135d 100644 --- a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseByProduct.inc +++ b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseByProduct.inc @@ -137,7 +137,7 @@ class licenseByProduct extends plugin "plDescription" => _("License usage by product"), "plSelfModify" => FALSE, "plDepends" => array(), - "plPriority" => 1, + "plPriority" => 12, "plSection" => array("administration"), "plCategory" => array("opsi"), "plProvidedAcls"=> array())); diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseGeneric.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseGeneric.inc index 297dea7e6..5b8d12262 100644 --- a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseGeneric.inc +++ b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseGeneric.inc @@ -143,6 +143,11 @@ class licenseGeneric extends plugin $smarty->assign("notUsedHosts", array_diff($this->getHosts(), $this->usedByHost)); $smarty->assign("boundToHost", $this->boundToHost[0]); $smarty->assign("licenseKey", $this->licenseKey[0]); + + foreach(array("notificationDate","expirationDate","conclusionDate") as $date) { + $smarty->assign($date."Writeable", $this->acl_is_writeable($date)); + } + return($smarty->fetch(get_template_path('licenseGeneric.tpl',TRUE,dirname(__FILE__)))); } @@ -266,7 +271,7 @@ class licenseGeneric extends plugin "plDescription" => _("License generic"), "plSelfModify" => FALSE, "plDepends" => array(), - "plPriority" => 1, + "plPriority" => 8, "plSection" => array("administration"), "plCategory" => array("opsi"), "plProvidedAcls"=> array( diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc index b5986c374..fe704d49e 100644 --- a/gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc +++ b/gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc @@ -509,7 +509,7 @@ class licensePoolGeneric extends plugin "plDescription" => _("License pool generic"), "plSelfModify" => FALSE, "plDepends" => array(), - "plPriority" => 1, + "plPriority" => 7, "plSection" => array("administration"), "plCategory" => array("opsi"), "plProvidedAcls"=> array( diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsage.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsage.inc index 3c9bf0ec9..972a7dece 100644 --- a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsage.inc +++ b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsage.inc @@ -143,7 +143,7 @@ class licenseUsage extends plugin "plDescription" => _("License usage"), "plSelfModify" => FALSE, "plDepends" => array(), - "plPriority" => 1, + "plPriority" => 11, "plSection" => array("administration"), "plCategory" => array("opsi"), "plProvidedAcls"=> array())); diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsageByHost.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsageByHost.inc index fc30f5435..746d2b9d8 100644 --- a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsageByHost.inc +++ b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsageByHost.inc @@ -245,7 +245,7 @@ class licenseUsageByHost extends plugin "plDescription" => _("License usage by host"), "plSelfModify" => FALSE, "plDepends" => array(), - "plPriority" => 1, + "plPriority" => 13, "plSection" => array("administration"), "plCategory" => array("opsi"), "plProvidedAcls"=> array( diff --git a/gosa-plugins/opsi/admin/opsiLicenses/licenseGeneric.tpl b/gosa-plugins/opsi/admin/opsiLicenses/licenseGeneric.tpl index da685ce02..46a1dedfc 100644 --- a/gosa-plugins/opsi/admin/opsiLicenses/licenseGeneric.tpl +++ b/gosa-plugins/opsi/admin/opsiLicenses/licenseGeneric.tpl @@ -72,6 +72,7 @@ {render acl=$licenseACL} + {if $conclusionDateWriteable} {literal} {/literal} + {/if} {/render} @@ -92,6 +94,7 @@ {render acl=$licenseACL} + {if $expirationDateWriteable} {literal} {/literal} + {/if} {/render} @@ -118,6 +122,7 @@ {render acl=$licenseACL} + {if $notificationDateWriteable} {literal} {/literal} + {/if} {/render} -- 2.30.2