summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bbd96bf)
raw | patch | inline | side by side (parent: bbd96bf)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Nov 2007 10:36:12 +0000 (10:36 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Nov 2007 10:36:12 +0000 (10:36 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7711 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/fai/class_divListFai.inc | patch | blob | history | |
plugins/admin/fai/class_faiManagement.inc | patch | blob | history |
index 306a2aebe4691a7884a6b5f26cdf43a0a379213a..23c32414932e7e671a92a57b87f61705bec4ccd5 100644 (file)
/* Add default header */
$listhead = MultiSelectWindow::get_default_header();
- $acl = $ui->get_permissions($this->selectedBase,"fai/faiProfile");
- if(preg_match("/c/",$acl)){
- $listhead .=" <input class='center' type='image' src='images/fai_new_profile.png' align='middle'
- title='"._("New profile")."' name='Create_profile' alt='"._("P")."'> ";
+ /* Add additional seperator */
+ if($add_sep){
$listhead .=" <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ";
}
- /* Add snapshot icons, if we are allowed to write and create the complete fai module ($ui->has_complete_category_acls) */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $listhead .= $this->get_snapshot_header($this->selectedBase);
- }
+ $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")."'> ";
- /* Add copy & paste icons, currently disabled, this ability is not implemeneted yet */
- if(preg_match("/(c.*w|w.*c)/",$acl_all) && isset($this->parent->CopyPasteHandler) && $this->parent->CopyPasteHandler){
- $Copy_Paste = $this->parent->CopyPasteHandler->generatePasteIcon();
+
+ $s = ".|"._("Actions")."|\n";
+ $s .= "..|<img src='images/list_new.png' alt='' border='0' class='center'>".
+ " "._("Create")."|\n";
+
+ $acl = $ui->get_permissions($this->selectedBase,"fai/faiProfile");
+ if(preg_match("/c/",$acl)){
+ $s.= "...|<input class='center' type='image' src='images/fai_new_profile.png' alt=''>".
+ " "._("Profile")."|Create_profile|\n";
}
/* Append create icons for each fai component */
$arr = array(
- array("images/fai_new_partitionTable.png" , _("New partition table") ,"Create_partition" , _("PT") , "faiPartitionTable"),
- array("images/fai_new_script.png" , _("New scripts") ,"Create_script" , _("S") , "faiScript"),
- array("images/fai_new_hook.png" , _("New hooks") ,"Create_hook" , _("H") , "faiHook"),
- array("images/fai_new_variable.png" , _("New variables") ,"Create_variable" , _("V") , "faiVariable"),
- array("images/fai_new_template.png" , _("New templates ") ,"Create_template" , _("I") , "faiTemplate"),
- array("images/fai_new_packages.png" , _("New package list") ,"Create_package" , _("PK") , "faiPackage"));
+ array("images/fai_new_partitionTable.png" , _("Partition table") ,"Create_partition" , _("PT") , "faiPartitionTable"),
+ array("images/fai_new_script.png" , _("Scripts") ,"Create_script" , _("S") , "faiScript"),
+ array("images/fai_new_hook.png" , _("Hooks") ,"Create_hook" , _("H") , "faiHook"),
+ array("images/fai_new_variable.png" , _("Variables") ,"Create_variable" , _("V") , "faiVariable"),
+ array("images/fai_new_template.png" , _("Templates ") ,"Create_template" , _("I") , "faiTemplate"),
+ array("images/fai_new_packages.png" , _("Package list") ,"Create_package" , _("PK") , "faiPackage"));
foreach($arr as $ar){
$acl = $ui->get_permissions($this->selectedBase,"fai/".$ar[4]);
if(preg_match("/c/",$acl)){
- $add_sep = true;
- $listhead .=" <input class='center' type='image' src='".$ar[0]."' align='middle' title='".$ar[1]."' name='".$ar[2]."' alt='".$ar[3]."'> ";
+ $s.= "...|<input class='center' type='image' src='".$ar[0]."' alt=''>".
+ " ".$ar[1]."|".$ar[2]."|\n";
}
}
- /* Add additional seperator */
- if($add_sep){
- $listhead .=" <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ";
- }
-
- $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 fai objects")."' alt='"._("Remove fai objects")."' name='remove_multiple_fai_objects'> ";
+ $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 objects")."' alt='"._("Copy fai objects")."' name='multiple_copy_fai'> ";
- $listhead .= " <input class='center' type='image' align='middle' src='images/editcut.png'
- title='"._("cut selected objects")."' alt='"._("Cut fai objects")."' name='multiple_cut_fai'> ";
- $listhead .= "</div>";
+ $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";
}
- $listhead .="</div>";;
+ /* Add copy & paste icons, currently disabled, this ability is not implemeneted yet */
+ if(preg_match("/(c.*w|w.*c)/",$acl_all) && isset($this->parent->CopyPasteHandler) && $this->parent->CopyPasteHandler){
+ $s .= "..|---|\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";
+ }
+ }
+ /* Add snapshot icons, if we are allowed to write and create the complete fai module ($ui->has_complete_category_acls) */
+ if(preg_match("/(c.*w|w.*c)/",$acl_all)){
+ if($this->parent->snapshotEnabled()){
+ $s .= "..|---|\n";
+ $s .= $this->get_snapshot_header(TRUE);
+ }
+ }
+ $this->SetDropDownHeaderMenu($s);
$this->SetListHeader($listhead);
}
$action= "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'
name='entry_edit_%KEY%' title='"._("Edit class")."'>";
- if(preg_match("/(c&w)/",$value['acl'])){
+ if(preg_match("/(c)/",$value['acl']) && preg_match("/(w)/",$value['acl'])){
$action.= $this->GetSnapShotActions($value['dn']);;
}
index 578a961d57393c37307d085523cb1284070dbcf0..017fa5dbb5728da2b37acc2630f41bf020f63b61 100644 (file)
"FAIprofile" => "faiProfile",
"FAItemplate" => "faiTemplate");
+
+ /* 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']) && preg_match("/^Create_/",$_POST['menu_action'])){
+ $s_action = "new_".preg_replace("/^Create_/","",$_POST['menu_action']);;
+ $s_entry = preg_replace("/^Create_/","",$_POST['menu_action']);
+ }
+
+ /* handle remove from layers menu */
+ if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){
+ $s_action = "del_multiple";
+ }
+
+
/****************
Delete confirme dialog
****************/