summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cf80480)
raw | patch | inline | side by side (parent: cf80480)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 29 Aug 2008 07:54:16 +0000 (07:54 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 29 Aug 2008 07:54:16 +0000 (07:54 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12307 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/opsi/admin/opsi/class_opsiProperties.inc | [new file with mode: 0644] | patch | blob |
gosa-plugins/opsi/admin/opsi/class_opsi_product_config.inc | [deleted file] | patch | blob | history |
gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc | patch | blob | history | |
gosa-plugins/opsi/admin/opsi/properties.tpl | patch | blob | history |
diff --git a/gosa-plugins/opsi/admin/opsi/class_opsiProperties.inc b/gosa-plugins/opsi/admin/opsi/class_opsiProperties.inc
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+
+class opsiProductConfig extends plugin
+{
+ private $product;
+ private $cfg;
+ private $hostId;
+
+ public function __construct($config,$product,$cfg = array() ,$hostId = "")
+ {
+ $this->config = $config;
+ $this->product = $product;
+ $this->cfg = $cfg;
+ $this->hostId = $hostId;
+ }
+
+ public function execute()
+ {
+ $smarty = get_smarty();
+ $smarty->assign("cfg",$this->cfg);
+ return($smarty->fetch(get_template_path("properties.tpl",TRUE,dirname(__FILE__))));
+ }
+
+ public function save_object()
+ {
+ foreach($this->cfg as $name => $value){
+ if(isset($_POST['value_'.$name])){
+ $this->cfg[$name] = validate(get_post('value_'.$name));
+ }
+ }
+ }
+
+ public function get_cfg()
+ {
+ return($this->cfg);
+ }
+
+ public function get_product()
+ {
+ return($this->product);
+ }
+
+ public function get_hostId()
+ {
+ return($this->hostId);
+ }
+}
+
+
+
+
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/gosa-plugins/opsi/admin/opsi/class_opsi_product_config.inc b/gosa-plugins/opsi/admin/opsi/class_opsi_product_config.inc
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-class opsiProductConfig extends plugin
-{
- private $product;
- private $cfg;
- private $hostId;
-
- public function __construct($config,$product,$cfg = array() ,$hostId = "")
- {
- $this->config = $config;
- $this->product = $product;
- $this->cfg = $cfg;
- $this->hostId = $hostId;
- }
-
- public function execute()
- {
- $smarty = get_smarty();
- $smarty->assign("cfg",$this->cfg);
- return($smarty->fetch(get_template_path("properties.tpl",TRUE,dirname(__FILE__))));
- }
-
- public function save_object()
- {
- foreach($this->cfg as $name => $value){
- if(isset($_POST['value_'.$name])){
- $this->cfg[$name] = validate(get_post('value_'.$name));
- }
- }
- }
-
- public function get_cfg()
- {
- return($this->cfg);
- }
-
- public function get_product()
- {
- return($this->product);
- }
-
- public function get_hostId()
- {
- return($this->hostId);
- }
-}
-
-
-
-
-
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc b/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc
index 0e7c416088fd29d213f0a02a8fc412227a42eb56..acc0789f2bd4ad856d26d7166d891ab141aa30a6 100644 (file)
if(isset($_POST['cancel_properties']) && is_object($this->dialog)){
$this->dialog = NULL;
}
- if(isset($_POST['save_properties']) && ($this->dialog instanceof opsiProductConfig)){
+ if(isset($_POST['save_properties']) && ($this->dialog instanceof opsiProperties)){
$this->dialog->save_object();
$pro = $this->dialog->get_product();
$CFG = $this->dialog->get_cfg();
}
if(preg_match("/^edit_lp_/",$name)){
$product = preg_replace("/^edit_lp_(.*)_.$/","\\1",$name);
- $this->dialog = new opsiProductConfig($this->config,
+ $this->dialog = new opsiProperties($this->config,
$product,$this->a_selectedLocalProducts[$product]['CFG'],$this->hostId);
break;
}
diff --git a/gosa-plugins/opsi/admin/opsi/properties.tpl b/gosa-plugins/opsi/admin/opsi/properties.tpl
index 4c7a8e5bacf2a2cc65e17043dea1d7d80aab9b73..f38fe4b06f4874eb42f0dcd3ffd01cc4e14c0b9c 100644 (file)
-<h2>Opsi product properties</h2>
+<h2><img src='plugins/opsi/images/product.png' class='center' alt=''> {t}Opsi product properties{/t}</h2>
+
+
+{if $cfg_count == 0}
+<br>
+<b>{t}This product has no options.{/t}</b>
+<br>
+<br>
+
+{else}
<table>
{foreach from=$cfg item=item key=key}
</tr>
{/foreach}
</table>
+
+{/if}
<p class="seperator"> </p>
<div style='width:100%; text-align: right; padding:3px;'>
<input type='submit' name='save_properties' value='{msgPool type='saveButton'}'>