summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 23fd2f4)
raw | patch | inline | side by side (parent: 23fd2f4)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Nov 2007 13:57:46 +0000 (13:57 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Nov 2007 13:57:46 +0000 (13:57 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7719 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/applications/class_applicationManagement.inc | patch | blob | history | |
plugins/admin/applications/class_divListApplication.inc | patch | blob | history |
diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc
index 45914bd4ed62768a3e405ae39da5fdd8215f84ae..78f76d45feedcd5d7f9445a54b9ce3a794c083c4 100644 (file)
$s_entry = preg_replace("/_.$/","",$s_entry);
+ /* handle C&P from layers menu */
+ if(isset($_POST['menu_action']) && preg_match("/^multiple_copy_systems/",$_POST['menu_action'])){
+ $s_action = "copy_multiple";
+ }
+ if(isset($_POST['menu_action']) && preg_match("/^multiple_cut_systems/",$_POST['menu_action'])){
+ $s_action = "cut_multiple";
+ }
+ if(isset($_POST['menu_action']) && preg_match("/^editPaste/",$_POST['menu_action'])){
+ $s_action = "editPaste";
+ }
+
+ /* Create options */
+ if(isset($_POST['menu_action']) && $_POST['menu_action'] == "appl_new"){
+ $s_action = "new";
+ }
+
+ /* handle remove from layers menu */
+ if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){
+ $s_action = "del_multiple";
+ }
+
/****************
Copy & Paste handling
****************/
return($ret);
}
-
/****************
Create a new app
****************/
diff --git a/plugins/admin/applications/class_divListApplication.inc b/plugins/admin/applications/class_divListApplication.inc
index 0e4ae0230d82ba4a519199b876b518b1d37ea36a..5eaa67b739dfb0d195987fffc8588c2fa4d58040 100755 (executable)
$acl = $ui->get_permissions("cn=dummy,".$this->selectedBase,"application/application");
$acl_all = $ui->has_complete_category_acls($this->selectedBase,"application");
- /* If this is true we have to add a seperator after
- adding the special icons, just have a look at the lines below */
- $add_sep = false;
-
- /* Get copy & paste icon */
- $Copy_Paste ="";
- if((preg_match("/(c.*w|w.*c)/",$acl_all)) && ($this->parent->CopyPasteHandler)){
- $Copy_Paste = $this->parent->CopyPasteHandler->generatePasteIcon();
- $add_sep = true;
- }
-
/* Add default header */
$listhead = MultiSelectWindow::get_default_header();
- /* Add snapshot header icons */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $listhead .= $this->get_snapshot_header($this->selectedBase);
- $add_sep = true;
- }
-
- /* Add create icon */
- if(preg_match("/c/",$acl)){
- $listhead .= " <input class='center' type='image' align='middle' src='images/list_new_app.png' alt='"._("new")."'
- title='"._("Create new application")."' name='appl_new'> ";
- $add_sep = true;
- }
-
- /* Add copy & paste icon */
- $listhead.= $Copy_Paste;
-
- /* Add a seperator if required and the list will look perfectly */
- if($add_sep){
- $listhead .= " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ";
- }
-
/* And the rest, a base selection box */
$listhead .= _("Base")." <select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
" <input class='center' type='image' src='images/list_submit.png' align='middle'
title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'> ";
- /* Multiple options */
- $listhead .= " <input class='center' type='image' align='middle' src='images/edittrash.png'
- title='"._("Remove selected applications")."' alt='"._("Remove applications")."' name='remove_multiple_applications'> ";
+ /* Create Layers menu */
+ $s = ".|"._("Actions")."|\n";
+ $s .= "..|<img src='images/list_new.png' alt='' border='0' class='center'>".
+ " "._("Create")."|\n";
+
+ /* Append create options */
+ if(preg_match("/c/",$acl)) {
+ $s.= "...|<input class='center' type='image' src='images/list_new_app' alt=''>".
+ " "._("Application")."|appl_new|\n";
+ }
+
+ /* Multiple options */
+ $s.= "..|---|\n";
+ $s.= "..|<img src='images/edittrash.png' alt='' border='0' class='center'>".
+ " "._("Remove")."|"."remvove_multiple|\n";
/* Add multiple copy & cut icons */
- if(is_object($this->parent->CopyPasteHandler)){
- $listhead .= " <input class='center' type='image' align='middle' src='images/editcopy.png'
- title='"._("Copy selected group")."' alt='"._("Copy groups")."' name='multiple_copy_groups'> ";
- $listhead .= " <input class='center' type='image' align='middle' src='images/editcut.png'
- title='"._("cut selected group")."' alt='"._("Cut groups")."' name='multiple_cut_groups'> ";
+ if(is_object($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){
+ $s.= "..|---|\n";
+ $s.= "..|<img src='images/editcopy.png' alt='' border='0' class='center'>".
+ " "._("Copy")."|"."multiple_copy_systems|\n";
+ $s.= "..|<img src='images/editcut.png' alt='' border='0' class='center'>".
+ " "._("Cut")."|"."multiple_cut_systems|\n";
+
+ if($this->parent->CopyPasteHandler->entries_queued()){
+ $img = "<img border='0' class='center' src='images/editpaste.png' alt=''>";
+ $s.="..|".$img." "._("Paste")."|editPaste|\n";
+ }else{
+ $img = "<img border='0' class='center' src='images/cant_editpaste.png' alt=''>";
+ $s.="..|".$img." "._("Paste")."\n";
+ }
}
- $listhead .="</div>";
+
+ /* Add snapshot icons */
+ if(preg_match("/(c.*w|w.*c)/",$acl_all)){
+ $s .= "..|---|\n";
+ $s .= $this->get_snapshot_header(TRUE);
+ }
+
+ $this->SetDropDownHeaderMenu($s);
+ $this->SetListHeader($listhead);
$this->SetListHeader($listhead);
}