summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c1cd713)
raw | patch | inline | side by side (parent: c1cd713)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 Oct 2007 08:31:28 +0000 (08:31 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 Oct 2007 08:31:28 +0000 (08:31 +0000) |
New layer menu allows creating of new systems now
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7693 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7693 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/contrib/gosa.conf b/contrib/gosa.conf
index f4cdc3b87fbc6b61cd7e880413877038b3fb11ba..999ecd1f1a25b478a9d657e20d13a80fe29319c9 100644 (file)
--- a/contrib/gosa.conf
+++ b/contrib/gosa.conf
</phonetabs>
<componenttabs>
- <tab class="componentgeneric" name="Generic" />
+ <tab class="componentGeneric" name="Generic" />
<tab class="glpiAccount" name="Inventory" />
</componenttabs>
diff --git a/plugins/admin/systems/class_componentGeneric.inc b/plugins/admin/systems/class_componentGeneric.inc
index 4306494b3bc34f7f262f642c1112a381d6e2fd5a..2511398525e093084782ba590b84ef2553830cd3 100644 (file)
var $netConfigDNS;
var $view_logged = FALSE;
- function componentgeneric (&$config, $dn= NULL, $parent= NULL)
+ function componentGeneric (&$config, $dn= NULL, $parent= NULL)
{
plugin::plugin ($config, $dn, $parent);
diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc
index 71e0e942656ce5fe69226765daf13dff989c8039..353956223a8e6469c94e5a1c4a4fef3a3d412733 100644 (file)
/* Must we add an additional seperator */
$add_sep = false;
- /* Get copy & paste icon */
- $Copy_Paste ="";
- if(preg_match("/(c.*w|w.*c)/",$all_module_acls) && $this->parent->CopyPasteHandler){
- $Copy_Paste = $this->parent->CopyPasteHandler->generatePasteIcon();
- $addsep = true;
- }
-
/* Add default header */
$listhead = MultiSelectWindow::get_default_header();
$add_sep = true;
}
- /* Assign copy & paste icons */
- $listhead.= $Copy_Paste;
+ /* Add base selection */
+ $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")."'> ";
/* Handle create icons */
+ $l = "?plug=".$_GET['plug']."&act=";
+ $s = ".|"._("Actions")."|\n";
+ $s.= "..|<img src='images/list_new.png' alt='' border='0' class='center'>".
+ " "._("Create")."|\n";
if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"terminal/termgeneric"))){
- $add_sep = true;
- $listhead .= "<input class='center' type='image' align='middle' src='images/select_new_terminal.png'
- name='newsystem_terminal' alt='"._("New Terminal template")."' title='"._("New Terminal")."'> ";
+ $s.= "...|<img src='images/select_terminal.png' alt='' border='0' class='center'>".
+ " "._("Terminal")."|".$l."newsystem_terminal|\n";
}
-
if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"workstation/workgeneric"))){
- $add_sep = true;
- $listhead .= "<input class='center' type='image' align='middle' src='images/select_new_workstation.png'
- name='newsystem_workstation' alt='"._("New Workstation template")."' title='"._("New Workstation")."'> ";
- }
-
- if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"server/servgeneric"))){
- $add_sep = true;
- $listhead .= "<input class='center' type='image' align='middle' src='images/select_new_server.png'
- name='newsystem_server' alt='"._("New Server")."' title='"._("New Server")."'> ";
+ $s.= "...|<img src='images/select_workstation.png' alt='' border='0' class='center'>".
+ " "._("Workstation")."|".$l."newsystem_workstation|\n";
}
-
- if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"printer/printgeneric"))){
- $add_sep = true;
- $listhead .= "<input class='center' type='image' align='middle' src='images/select_new_printer.png'
- name='newsystem_printer' alt='"._("New Printer")."' title='"._("New Printer")."'> ";
+ if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"workstation/workgeneric"))){
+ $s.= "...|<img src='images/select_server.png' alt='' border='0' class='center'>".
+ " "._("Server")."|".$l."newsystem_server|\n";
}
-
if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"phone/phoneGeneric"))){
- $add_sep = true;
- $listhead .= "<input class='center' type='image' align='middle' src='images/select_new_phone.png'
- name='newsystem_phone' alt='"._("New Phone")."' title='"._("New Phone")."'> ";
+ $s.= "...|<img src='images/select_phone.png' alt='' border='0' class='center'>".
+ " "._("Phone")."|".$l."newsystem_phone|\n";
}
-
- if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"component/componentGeneric"))){
- $add_sep = true;
- $listhead .= "<input class='center' type='image' align='middle' src='images/select_new_component.png'
- name='newsystem_component' alt='"._("New Component")."' title='"._("New Component")."'> ";
+ if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"printer/printgeneric"))){
+ $s.= "...|<img src='images/select_printer.png' alt='' border='0' class='center'>".
+ " "._("Printer")."|".$l."newsystem_printer|\n";
}
-
- /* Should we add a seperator ? */
- if($add_sep){
- $listhead .= "<img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ";
+ if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"component/componentGeneric"))){
+ $s.= "...|<img src='images/select_component.png' alt='' border='0' class='center'>".
+ " "._("Component")."|".$l."newsystem_component|\n";
}
-
- /* Add base selection */
- $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 systems")."' alt='"._("Remove systems")."' name='remove_multiple_systems'> ";
+ $s.= "..|<img src='images/edittrash.png' alt='' border='0' class='center'>".
+ " "._("Remove all")."|".$l."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 system")."' alt='"._("Copy systems")."' name='multiple_copy_systems'> ";
- $listhead .= " <input class='center' type='image' align='middle' src='images/editcut.png'
- title='"._("cut selected system")."' alt='"._("Cut systems")."' name='multiple_cut_systems'> ";
+ $s.= "..|---|\n";
+ $s.= "..|<img src='images/editcopy.png' alt='' border='0' class='center'>".
+ " "._("Copy all")."|".$l."multiple_copy_systems|\n";
+ $s.= "..|<img src='images/editcut.png' alt='' border='0' class='center'>".
+ " "._("Cut all")."|".$l."multiple_cut_systems|\n";
+ }
+
+ /* Get copy & paste icon */
+ $Copy_Paste ="";
+ if(preg_match("/(c.*w|w.*c)/",$all_module_acls) && $this->parent->CopyPasteHandler){
+ if($this->parent->CopyPasteHandler->entries_queued()){
+ $img = "<img border='0' class='center' src='images/editpaste.png' alt=''>";
+ $s.="..|".$img." "._("Paste")."|\n";
+ }else{
+ $img = "<img border='0' class='center' src='images/cant_editpaste.png' alt=''>";
+ $s.="..|".$img." "._("Paste")."\n";
+ }
}
-
- $s= ".|"._("Actions")."|\n";
- $s.= "..|<img src='images/list_new.png' alt='' border='0' class='center'> "._("Create")."|\n";
- $s.= "...|<img src='images/select_terminal.png' alt='' border='0' class='center'> "._("Terminal")."|\n";
- $s.= "...|<img src='images/select_workstation.png' alt='' border='0' class='center'> "._("Workstation")."|\n";
- $s.= "...|<img src='images/select_server.png' alt='' border='0' class='center'> "._("Server")."|\n";
- $s.= "...|<img src='images/select_phone.png' alt='' border='0' class='center'> "._("Phone")."|\n";
- $s.= "...|<img src='images/select_printer.png' alt='' border='0' class='center'> "._("Printer")."|\n";
- $s.= "...|<img src='images/select_component.png' alt='' border='0' class='center'> "._("Component")."|\n";
- $s.= "..|<img src='images/edittrash.png' alt='' border='0' class='center'> "._("Remove all")."|\n";
- $s.= "..|---|\n";
- $s.= "..|<img src='images/editcopy.png' alt='' border='0' class='center'> "._("Copy all")."|\n";
- $s.= "..|<img src='images/editcut.png' alt='' border='0' class='center'> "._("Cut all")."|\n";
$this->SetDropDownHeaderMenu($s);
$this->SetListHeader($listhead);
diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc
index 1685af29c2cc4282b0f8ee5f1ef61ea1aa9f303e..268e5b33e2c0ee8634f14c2908195ef260715e04 100644 (file)
$s_entry = preg_replace("/^cut_/i","",$key);
}
}
-
-
+
/* Incoming handling
* If someone made a systemtype and ogroup selection
* Display the new requested entry type ... servtab in case of server and so on.
$s_action ="edit";
$s_entry = $_GET['id'];
}
+ /* Create options */
+ if(isset($_GET['act']) && preg_match("/^newsystem_/",$_GET['act'])){
+ $s_action = "newsystem";
+ $s_entry = preg_replace("/^newsystem_/","",$_GET['act']);
+ }
/* Check for exeeded sizelimit */
if (($message= check_sizelimit()) != ""){
}
$this->dn= "new";
}
+
$tabs = array(
"terminal" => array("CLASS"=>"TERMTABS", "TABNAME"=>"termgeneric", "TABCLASS" =>"termtabs", "ACL"=> "terminal"),
"workstation" => array("CLASS"=>"WORKTABS", "TABNAME"=>"workgeneric", "TABCLASS" =>"worktabs", "ACL"=> "workstation"),
"server" => array("CLASS"=>"SERVTABS", "TABNAME"=>"servgeneric", "TABCLASS" =>"servtabs", "ACL"=> "server"),
"printer" => array("CLASS"=>"PRINTTABS", "TABNAME"=>"printgeneric", "TABCLASS" =>"printtabs", "ACL"=> "printer"),
"phone" => array("CLASS"=>"PHONETABS", "TABNAME"=>"phoneGeneric", "TABCLASS" =>"phonetabs", "ACL"=> "phone"),
- "component" => array("CLASS"=>"COMPONENTTABS","TABNAME"=>"componentgeneric","TABCLASS" =>"componenttabs", "ACL"=> "component"));
+ "component" => array("CLASS"=>"COMPONENTTABS","TABNAME"=>"componentGeneric","TABCLASS" =>"componenttabs", "ACL"=> "component"));
if(isset($tabs[$sw])){
$class = $tabs[$sw]["CLASS"];
"TABCLASS" =>"printtabs", "ACL" =>"printer"),
"phone" => array( "CLASS" =>"PHONETABS", "TABNAME" =>"phoneGeneric",
"TABCLASS" =>"phonetabs", "ACL" =>"phone"),
- "component" => array( "CLASS" =>"COMPONENTTABS","TABNAME" =>"componentgeneric",
+ "component" => array( "CLASS" =>"COMPONENTTABS","TABNAME" =>"componentGeneric",
"TABCLASS" =>"componenttabs","ACL" =>"component"));
/* Add a single entry to queue */
index 3d7d53dde965e79ac08cbf69101d50f89918cd1f..941203e24aa8ef958e81f8bfd95dfdc83aaf69ad 100644 (file)
{
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
- $baseobject= $this->by_object['componentgeneric'];
+ $baseobject= $this->by_object['componentGeneric'];
$this->dn= "cn=$baseobject->cn,ou=netdevices,ou=systems,".$baseobject->base;
$baseobject->dn= $this->dn;