summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b245c7b)
raw | patch | inline | side by side (parent: b245c7b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 22 Apr 2008 08:15:16 +0000 (08:15 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 22 Apr 2008 08:15:16 +0000 (08:15 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10604 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/groups/apps/app_list.tpl | patch | blob | history | |
gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/groups/apps/app_list.tpl b/gosa-plugins/goto/admin/groups/apps/app_list.tpl
index ddac8b762c07356f0da763fd71b7d69992efb9df..a21720b06993bc0a6f2a6337ac4450849861a96e 100644 (file)
<option value="{$key}" {if $key == $FAIrelease} selected {/if}>{$item.name} </option>
{/foreach}
</select>
+ <input type='image' src='images/lists/copy.png' class='center' name='menu_copy'>
+ {if $copied}
+ <input type='image' src='images/lists/paste.png' title='{t}Paste menu structure{/t} - {$copy_source}' class='center' name='menu_paste'>
+ {else}
+ <input type='image' src='images/lists/paste-grey.png' class='center'>
+ {/if}
</td>
</tr>
{/if}
diff --git a/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc b/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc
index 22be108856108ee24632c6153ea6f055ba38d1ad..00f87bb5287539e360fb5c4c2979eb89c31834fb 100644 (file)
var $app_parameter = array();
var $edit_entry = array();
var $enableReleaseManagement = FALSE;
-
+
+ var $copied_release = "";
+
public function __construct(&$config, $dn= NULL, $parent= NULL)
{
));
}
-
+ /* Assign copy / paste values
+ */
+ if(!empty($this->copied_release)){
+ $smarty->assign("copied", TRUE);
+ $smarty->assign("copy_source", $this->copied_release);
+ }else{
+ $smarty->assign("copied", FALSE);
+ }
$smarty->assign("enableReleaseManagement",$this->enableReleaseManagement);
$smarty->assign("FAIrelease",$this->FAIrelease);
$smarty->assign("app_list",$div->DrawList());
function save_object()
{
foreach($_POST as $name => $value){
+
+ if(preg_match("/^menu_copy_/",$name)){
+ $this->copied_release = $this->FAIrelease;
+ break;
+ }
+ if(preg_match("/^menu_paste_/",$name)){
+ $source_rel = $this->_get_release_key($this->copied_release);
+ $current_rel = $this->_get_release_key($this->FAIrelease);
+
+ $all = $this->_get_all_entries();
+ $menu = $all[$source_rel]['ENTRIES'];
+
+ foreach($menu as $entry){
+ if(in_array($entry['TYPE'],array("FOLDER","ENTRY","SEPERATOR"))){
+ $this->_add_entry($current_rel,$entry,-1);
+ }
+ }
+ break;
+ }
+
if(preg_match("/del_/",$name)){
$id = preg_replace("/^del_/","",$name);
$id = preg_replace("/_(x|y)$/","",$id);