summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0728dc5)
raw | patch | inline | side by side (parent: 0728dc5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Mar 2010 10:04:51 +0000 (10:04 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Mar 2010 10:04:51 +0000 (10:04 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17017 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc b/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc
index a2b081fb6f5740bb09ff218a4bde9a978e5b69d1..96993fd770daa8dfbfa2b168c4d2465591014c4b 100644 (file)
foreach($this->a_availableLocalProducts as $name => $data){
if(isset($this->a_selectedLocalProducts[$name])) continue;
- $add_tab = array("string" => "<input type='image' src='images/back.png' name='add_lp_".$name."'>");
+ $add_tab = array("string" => image('images/back.png','add_lp_'.$name));
$name_tab = array("string" => $name);
$desc_tab = array("string" => "<div style='height: 14px;overflow:hidden;'>".$data['DESC']."</div>",
"attach" => "title='".$data['DESC']."' style='border-right:0px;'");
/* Only display edit button, if there is something to edit
*/
- $edit = "<img src='images/empty.png' alt=' '>";
+ $edit = image('images/empty.png');
if(count($data['CFG'])){
- $edit = "<input type='image' src='images/lists/edit.png' name='edit_lp_".$name."'>";
+ $edit = image('images/lists/edit.png','edit_lp_'.$name);
}
- $del = "<input type='image' src='images/lists/trash.png' name='del_lp_".$name."'>";
+ $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;'");
/* 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);
/* 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]);
}
/* 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;
index 99641a1f62099152243b7fb8107b39043e9cc6cf..6b544c19cad681a5150dcdd32ea318bf6ac8e80d 100644 (file)
<h3>{t}OPSI host{/t}</h3>
-{if $init_failed}
+{if $init_failed}<font style='color: #FF0000;'>
-<font style='color: #FF0000;'>{msgPool type=siError p=$message}</font>
+ {msgPool type=siError p=$message}</font>
+ <button type='submit' name='reinit'>{t}Retry{/t}</button>
-<button type='submit' name='reinit'>{t}Retry{/t}</button>
+{else}
+ <table style="width: 100%;" summary="{t}OPSI host{/t}">
+ <tr>
+ <td style="width:50%;" class="right-border">
+ <table summary="{t}Generic{/t}">
+
+ {if $standalone}
+ <tr>
+ <td>{t}Name{/t}{$must}</td>
+ <td>
+ {render acl=$hostIdACL}
+ <input style='width:300px;' type='text' name='hostId' value='{$hostId}'>
+ {/render}
+ </td>
+ </tr>
-{else}
+ {else}
+
+ <tr>
+ <td>{t}Name{/t}</td>
+ <td>
+ {render acl=$hostIdACL}
+ <input style='width:300px;' type='text' disabled value="{$hostId}">
+ {/render}
+ </td>
+ </tr>
+
+ {/if}
+ <tr>
+ <td>{t}Netboot product{/t}</td>
+ <td>
+
+ {render acl=$netbootProductACL}
+ <select name="opsi_netboot_product" onChange="document.mainform.submit();" size=1>
+ {foreach from=$ANP item=item key=key}
+ <option {if $key == $SNP} selected {/if} value="{$key}">{$key}</option>
+ {/foreach}
+ </select>
+ {/render}
+
+ {if $netboot_configurable}
+ {image path="images/lists/edit.png" action="configure_netboot" title="{t}Configure product{/t}"}
+ {/if}
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ <td>
+
+ <table summary="{t}Generic{/t}">
+ <tr>
+ <td>{t}Description{/t}</td>
+ <td>
+ {render acl=$descriptionACL}
+ <input type='text' name='description' value='{$description}'>
+ {/render}
+ </td>
+ </tr>
+ <tr>
+ <td>{t}Notes{/t}</td>
+ <td>
+ {render acl=$descriptionACL}
+ <input type='text' name='note' value='{$note}'>
+ {/render}
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
-<table style="width: 100%;">
- <tr>
- <td>
- <table>
- {if $standalone}
- <tr>
- <td>{t}Name{/t}{$must}</td>
- <td>
-{render acl=$hostIdACL}
- <input style='width:300px;' type='text' name='hostId' value='{$hostId}'>
-{/render}
- </td>
- </tr>
-<!--
- <tr>
- <td>{t}MAC address{/t}{$must}</td>
- <td>
-{render acl=$macACL}
- <input type='text' name="dummy" value="{$mac}" disabled>
-{/render}
- </td>
- </tr>
--->
- {else}
- <tr>
- <td>{t}Name{/t}</td>
- <td>
-{render acl=$hostIdACL}
- <input style='width:300px;' type='text' disabled value="{$hostId}">
-{/render}
- </td>
- </tr>
-<!--
- <tr>
- <td>{t}MAC address{/t}{$must}</td>
- <td>
-{render acl=$macACL}
- <input type='text' name="mac" value="{$mac}">
-{/render}
- </td>
- </tr>
--->
+ <hr>
+
+ <table width="100%" summary="{t}Package settings{/t}">
+ <tr>
+ <td style="width:50%;" class="right-border">
+ <h3>{t}Installed products{/t}</h3>
+ {render acl=$localProductACL}
+ {$divSLP}
+ {/render}
+ </td>
+ <td style="width:50%;">
+ <h3>{t}Available products{/t}</h3>
+ {render acl=$localProductACL}
+ {$divALP}
+ {/render}
+ </td>
+ </tr>
+ </table>
+
+ {if $standalone}
+
+ <hr>
+
+ <h3>{t}Action{/t}</h3>
+ <select name='opsi_action' size=1>
+ <option> </option>
+ {if $is_installed}
+ <option value="install">{t}Reinstall{/t}</option>
+ {else}
+ <option value="install">{t}Install{/t}</option>
{/if}
- <tr>
- <td>{t}Netboot product{/t}</td>
- <td>
-{render acl=$netbootProductACL}
- <select name="opsi_netboot_product" onChange="document.mainform.submit();" size=1>
- {foreach from=$ANP item=item key=key}
- <option {if $key == $SNP} selected {/if} value="{$key}">{$key}</option>
- {/foreach}
- </select>
-{/render}
-
- {if $netboot_configurable}
- {image path="images/lists/edit.png" action="configure_netboot" title="{t}Configure product{/t}"}
- {else}
-<!-- <input type='image' name='dummy_10' src='images/lists/edit_gray.png'
- title='{t}Configure product{/t}' class='center'>-->
- {/if}
- </td>
- </tr>
- </table>
- </td>
- <td>
-
- <table>
- <tr>
- <td>{t}Description{/t}</td>
- <td>
-{render acl=$descriptionACL}
- <input type='text' name='description' value='{$description}'>
-{/render}
- </td>
- </tr>
- <tr>
- <td>{t}Notes{/t}</td>
- <td>
-{render acl=$descriptionACL}
- <input type='text' name='note' value='{$note}'>
-{/render}
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
- <tr>
- <td style="width:50%;"><h3>{image path="plugins/opsi/images/product.png"} {t}Installed products{/t}</h3>
-{render acl=$localProductACL}
- {$divSLP}
-{/render}
- </td>
- <td style="width:50%;"><h3>{t}Available products{/t}</h3>
-{render acl=$localProductACL}
- {$divALP}
-{/render}
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <hr><br>
- {if $standalone}
- <h3>{t}Action{/t}</h3>
- <select name='opsi_action' size=1>
- <option> </option>
- {if $is_installed}
- <option value="install">{t}Reinstall{/t}</option>
- {else}
- <option value="install">{t}Install{/t}</option>
- {/if}
- <option value="wake">{t}Wake{/t}</option>
- </select>
-{render acl=$triggerActionACL}
- <button type='submit' name='opsi_trigger_action'>{t}Execute{/t}</button>
-
-{/render}
- {/if}
- </td>
- </tr>
-</table>
-<hr>
-
-{$netconfig}
-
-<input type='hidden' name='opsiGeneric_posted' value='1'>
+ <option value="wake">{t}Wake{/t}</option>
+ </select>
+
+ {render acl=$triggerActionACL}
+ <button type='submit' name='opsi_trigger_action'>{t}Execute{/t}</button>
+ {/render}
+ {/if}
+
+ <hr>
+ {$netconfig}
+ <input type='hidden' name='opsiGeneric_posted' value='1'>
{/if}
index 3077f54efaec516e103604f2143ce04658ac41a3..eb21b7ef0fe60be90eb68599a69bcee9fb6d23f2 100644 (file)
-{if $init_failed}
- <h3>{t}Information{/t}</h3>
- <font style='color: #FF0000;'>{msgPool type=siError p=$message}</font>
- <button type='submit' name='reinit'>{t}Retry{/t}</button>
-{else}
- {if $type == 0}
- <h3>{t}Hardware information{/t}</h3>
- {else}
- <h3>{t}Software information{/t}</h3>
- {/if}
- {foreach from=$info item=item key=key}
- <div style='background-color: #E8E8E8; width: 100%; border: 2px dotted #CCCCCC;'>
- <h3>{t}Device{/t} {$key+1}</h3>
- {foreach from=$item key=name item=value}
- <div style="text-transform:lowercase;width:30%; float: left; ">{$name}: </div>
- <div style="width:70%; float: right;background-color: #DADADA;">{$value.0.VALUE} </div>
- <div style='clear: both;'></div>
- {/foreach}
- </div>
- <br>
- {/foreach}
-{/if}
+{if $init_failed}
+ <h3>{t}Information{/t}
+ </h3><font style='color: #FF0000;'>
+ {msgPool type=siError p=$message}</font>
+ <button type='submit' name='reinit'>{t}Retry{/t}</button>
+ {else}
+
+ {if $type == 0}
+ <h3>{t}Hardware information{/t}
+ </h3>
+ {else}
+ <h3>{t}Software information{/t}
+ </h3>
+
+ {/if}{foreach from=$info item=item key=key}
+ <div style='background-color: #E8E8E8; width: 100%; border: 2px dotted #CCCCCC;'>
+ <h3>{t}Device{/t}
+ {$key+1}
+ </h3>{foreach from=$item key=name item=value}
+ <div style="text-transform:lowercase;width:30%; float: left; ">
+ {$name}:
+ </div>
+ <div style="width:70%; float: right;background-color: #DADADA;">
+ {$value.0.VALUE}
+ </div>
+ <div style='clear: both;'>
+ </div>{/foreach}
+ </div>
+ <br>{/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 2980b56cdc1ea49bc30570be5043a6fa3f7ef2f3..cffab278872512234a565edba1afb0323f4a5508 100644 (file)
-<h3>{t}OPSI product properties{/t}</h3>
+<h3>{t}OPSI product properties{/t}
+</h3>
{if $cfg_count == 0}
-<br>
-<b>{t}This OPSI product has no options.{/t}</b>
-<br>
-<br>
-
-{else}
-
-<table>
-{foreach from=$cfg item=item key=key}
- <tr>
- <td>{$key}</td>
- <td>
-{render acl=$ACL}
- {if isset($item.VALUE_CNT)}
- <select name="value_{$key}" style='width:180px;' size=1>
- {foreach from=$item.VALUE key=k item=i}
- <option {if $item.CURRENT == $i} selected {/if} value="{$i}">{$i}</option>
- {/foreach}
- </select>
- {else}
- <input type='input' name='value_{$key}' value="{$item.CURRENT}" style='width:280px;'>
- {/if}
-{/render}
- </td>
- </tr>
-{/foreach}
-</table>
-
+ <br>
+ <b>{t}This OPSI product has no options.{/t}</b>
+ <br>
+ <br>
+ {else}
+ <table>{foreach from=$cfg item=item key=key}
+ <tr>
+ <td>
+ {$key}
+ </td>
+ <td>
+ {render acl=$ACL}
+
+ {if isset($item.VALUE_CNT)}
+
+ <select name="value_{$key}" style='width:180px;' size=1>{foreach from=$item.VALUE key=k item=i}
+
+
+ <option {if $item.CURRENT == $i} selected {/if} value="{$i}">
+ {$i}</option>{/foreach}
+ </select>
+ {else}
+ <input type='input' name='value_{$key}' value="{$item.CURRENT}" style='width:280px;'>
+
+ {/if}
+ {/render}
+ </td>
+ </tr>{/foreach}
+ </table>
+
{/if}
<hr>
<div style='width:100%; text-align: right; padding:3px;'>
- <button type='submit' name='save_properties'>{msgPool type=saveButton}</button>
-
-
- <button type='submit' name='cancel_properties'>{msgPool type=cancelButton}</button>
-
-</div>
+ <button type='submit' name='save_properties'>
+ {msgPool type=saveButton}</button>
+ <button type='submit' name='cancel_properties'>
+ {msgPool type=cancelButton}</button>
+</div>
\ No newline at end of file