From d4234bc27240ec632c676fbb03908034002311ee Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 23 Mar 2010 10:04:51 +0000 Subject: [PATCH] Updated opsi host git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17017 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../opsi/admin/opsi/class_opsigeneric.inc | 14 +- gosa-plugins/opsi/admin/opsi/generic.tpl | 247 ++++++++---------- gosa-plugins/opsi/admin/opsi/opsiware.tpl | 53 ++-- gosa-plugins/opsi/admin/opsi/properties.tpl | 72 ++--- 4 files changed, 189 insertions(+), 197 deletions(-) diff --git a/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc b/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc index a2b081fb6..96993fd77 100644 --- a/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc +++ b/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc @@ -316,7 +316,7 @@ class opsiGeneric extends plugin foreach($this->a_availableLocalProducts as $name => $data){ if(isset($this->a_selectedLocalProducts[$name])) continue; - $add_tab = array("string" => ""); + $add_tab = array("string" => image('images/back.png','add_lp_'.$name)); $name_tab = array("string" => $name); $desc_tab = array("string" => "
".$data['DESC']."
", "attach" => "title='".$data['DESC']."' style='border-right:0px;'"); @@ -341,11 +341,11 @@ class opsiGeneric extends plugin /* Only display edit button, if there is something to edit */ - $edit = " "; + $edit = image('images/empty.png'); if(count($data['CFG'])){ - $edit = ""; + $edit = image('images/lists/edit.png','edit_lp_'.$name); } - $del = ""; + $del = image('images/lists/trash.png','del_lp_'.$name); $opt_tab = array("string" => $edit.$del, "attach" => "style='border-right:0px; width: 40px; text-align:right;'"); @@ -666,7 +666,7 @@ class opsiGeneric extends plugin /* Add product */ if(preg_match("/^add_lp_/",$name) && $this->acl_is_writeable("localProduct")){ - $product = preg_replace("/^add_lp_(.*)_.$/","\\1",$name); + $product = preg_replace("/^add_lp_(.*)$/","\\1",$name); if(isset($this->a_availableLocalProducts[$product]) && !isset($this->a_selectedLocalProducts[$product])){ $this->a_selectedLocalProducts[$product] = $this->a_availableLocalProducts[$product]; $CFG = $this->opsi->get_product_properties($product); @@ -682,7 +682,7 @@ class opsiGeneric extends plugin /* Delete product */ if(preg_match("/^del_lp_/",$name) && $this->acl_is_writeable("localProduct")){ - $product = preg_replace("/^del_lp_(.*)_.$/","\\1",$name); + $product = preg_replace("/^del_lp_(.*)$/","\\1",$name); if(isset($this->a_selectedLocalProducts[$product])){ unset($this->a_selectedLocalProducts[$product]); } @@ -692,7 +692,7 @@ class opsiGeneric extends plugin /* Edit a product */ if(preg_match("/^edit_lp_/",$name) && $this->acl_is_readable("localProduct")){ - $product = preg_replace("/^edit_lp_(.*)_.$/","\\1",$name); + $product = preg_replace("/^edit_lp_(.*)$/","\\1",$name); $this->dialog = new opsiProperties($this->config, $product,$this->a_selectedLocalProducts[$product]['CFG'],$this->hostId); break; diff --git a/gosa-plugins/opsi/admin/opsi/generic.tpl b/gosa-plugins/opsi/admin/opsi/generic.tpl index 99641a1f6..6b544c19c 100644 --- a/gosa-plugins/opsi/admin/opsi/generic.tpl +++ b/gosa-plugins/opsi/admin/opsi/generic.tpl @@ -1,143 +1,124 @@

{t}OPSI host{/t}

-{if $init_failed} +{if $init_failed} -{msgPool type=siError p=$message} + {msgPool type=siError p=$message} + - +{else} + + + + + +
+ + + {if $standalone} + + + + -{else} + {else} + + + + + + + {/if} + + + + +
{t}Name{/t}{$must} + {render acl=$hostIdACL} + + {/render} +
{t}Name{/t} + {render acl=$hostIdACL} + + {/render} +
{t}Netboot product{/t} + + {render acl=$netbootProductACL} + + {/render} + + {if $netboot_configurable} + {image path="images/lists/edit.png" action="configure_netboot" title="{t}Configure product{/t}"} + {/if} +
+ +
+ + + + + + + + + + +
{t}Description{/t} + {render acl=$descriptionACL} + + {/render} +
{t}Notes{/t} + {render acl=$descriptionACL} + + {/render} +
+
- - - - - - -
- - {if $standalone} - - - - - - {else} - - - - - +
+ +
{t}Name{/t}{$must} -{render acl=$hostIdACL} - -{/render} -
{t}Name{/t} -{render acl=$hostIdACL} - -{/render} -
+ + + + +
+

{t}Installed products{/t}

+ {render acl=$localProductACL} + {$divSLP} + {/render} +
+

{t}Available products{/t}

+ {render acl=$localProductACL} + {$divALP} + {/render} +
+ + {if $standalone} + +
+ +

{t}Action{/t}

+
{t}Netboot product{/t} -{render acl=$netbootProductACL} - -{/render} -   - {if $netboot_configurable} - {image path="images/lists/edit.png" action="configure_netboot" title="{t}Configure product{/t}"} - {else} - - {/if} -
- - - - - - - - - - - - -
{t}Description{/t} -{render acl=$descriptionACL} - -{/render} -
{t}Notes{/t} -{render acl=$descriptionACL} - -{/render} -
- - - - -
- - - -

{image path="plugins/opsi/images/product.png"} {t}Installed products{/t}

-{render acl=$localProductACL} - {$divSLP} -{/render} - -

{t}Available products{/t}

-{render acl=$localProductACL} - {$divALP} -{/render} - - - - -

- {if $standalone} -

{t}Action{/t}

- -{render acl=$triggerActionACL} - - -{/render} - {/if} - - - -
- -{$netconfig} - - + + + + {render acl=$triggerActionACL} + + {/render} + {/if} + +
+ {$netconfig} + {/if} diff --git a/gosa-plugins/opsi/admin/opsi/opsiware.tpl b/gosa-plugins/opsi/admin/opsi/opsiware.tpl index 3077f54ef..eb21b7ef0 100644 --- a/gosa-plugins/opsi/admin/opsi/opsiware.tpl +++ b/gosa-plugins/opsi/admin/opsi/opsiware.tpl @@ -1,24 +1,33 @@ -{if $init_failed} -

{t}Information{/t}

- {msgPool type=siError p=$message} - -{else} - {if $type == 0} -

{t}Hardware information{/t}

- {else} -

{t}Software information{/t}

- {/if} - {foreach from=$info item=item key=key} -
-

{t}Device{/t} {$key+1}

- {foreach from=$item key=name item=value} -
{$name}: 
-
{$value.0.VALUE} 
-
- {/foreach} -
-
- {/foreach} -{/if} +{if $init_failed} +

{t}Information{/t} +

+ {msgPool type=siError p=$message} + + {else} + + {if $type == 0} +

{t}Hardware information{/t} +

+ {else} +

{t}Software information{/t} +

+ + {/if}{foreach from=$info item=item key=key} +
+

{t}Device{/t} + {$key+1} +

{foreach from=$item key=name item=value} +
+ {$name}:  +
+
+ {$value.0.VALUE}  +
+
+
{/foreach} +
+
{/foreach} + +{/if} \ No newline at end of file diff --git a/gosa-plugins/opsi/admin/opsi/properties.tpl b/gosa-plugins/opsi/admin/opsi/properties.tpl index 2980b56cd..cffab2788 100644 --- a/gosa-plugins/opsi/admin/opsi/properties.tpl +++ b/gosa-plugins/opsi/admin/opsi/properties.tpl @@ -1,41 +1,43 @@ -

{t}OPSI product properties{/t}

+

{t}OPSI product properties{/t} +

{if $cfg_count == 0} -
-{t}This OPSI product has no options.{/t} -
-
- -{else} - - -{foreach from=$cfg item=item key=key} - - - - -{/foreach} -
{$key} -{render acl=$ACL} - {if isset($item.VALUE_CNT)} - - {else} - - {/if} -{/render} -
- +
+ {t}This OPSI product has no options.{/t} +
+
+ {else} + {foreach from=$cfg item=item key=key} + + + + {/foreach} +
+ {$key} + + {render acl=$ACL} + + {if isset($item.VALUE_CNT)} + + + {else} + + + {/if} + {/render} +
+ {/if}
- - -   - - -
+   + + \ No newline at end of file -- 2.30.2