summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5340995)
raw | patch | inline | side by side (parent: 5340995)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 Jun 2008 12:58:59 +0000 (12:58 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 Jun 2008 12:58:59 +0000 (12:58 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11303 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc
index 7b3736f7ede389e27a2b9a0d1478a2a42c2b81a9..62b3947afa36c125cbdbf6a937bd210935c13340 100644 (file)
var $gosaUnitTag= "";
var $view_logged = FALSE;
+ var $type ="ou";
+
/* Headpage attributes */
var $last_dep_sorting= "invalid";
var $departments= array();
$smarty->assign("unitTag", "");
}
+ $smarty->assign("dep_type",$this->type);
return($smarty->fetch (get_template_path('generic.tpl', TRUE)));
}
diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc
index 174b11bd18372326457e1c38c1df1dac24a06012..baf9ae2e4d35b166650dff300021cb8f94b95b82 100644 (file)
// Post for new
}elseif(preg_match("/^remove_multiple_departments/",$key)){
$s_action="del_multiple";
- }elseif(preg_match("/dep_new.*/",$key)){
- $s_action="new";
}
}
/* Create options */
- if(isset($_POST['menu_action']) && $_POST['menu_action'] == "dep_new"){
+ if(isset($_POST['menu_action']) && preg_match("/^dep_new_/",$_POST['menu_action'])){
$s_action = "new";
+ $s_entry = preg_replace("/^dep_new_([a-z]*)/","\\1",$_POST['menu_action']);
}
/* handle remove from layers menu */
*/
if ($s_action=="new"){
$this->dn= "new";
- $this->deptabs= new deptabs($this->config,$this->config->data['TABS']['DEPTABS'], $this->dn,"department");
+ if($s_entry == "c"){
+ $this->deptabs= new deptabs($this->config,$this->config->data['TABS']['COUNTRY_TABS'], $this->dn,"country");
+ }else{
+ $this->deptabs= new deptabs($this->config,$this->config->data['TABS']['DEPTABS'], $this->dn,"department");
+ }
$this->deptabs->set_acl_base($this->DivListDepartment->selectedBase);
}
diff --git a/gosa-core/plugins/admin/departments/class_divListDepartment.inc b/gosa-core/plugins/admin/departments/class_divListDepartment.inc
index f4f85944fcbf24fc778b29330194827ca502aea2..55ef8d2fac7cd8e8f0899241808d8933c7c4cb95 100644 (file)
$s .= "..|<img src='images/lists/new.png' alt='' border='0' class='center'>".
" "._("Create")."|\n";
$s.= "...|<input class='center' type='image' src='plugins/departments/images/department.png' alt=''>".
- " "._("Department")."|dep_new|\n";
+ " "._("Department")." (ou)|dep_new_ou|\n";
+
+ $s.= "...|<input class='center' type='image' src='plugins/departments/images/department.png' alt=''>".
+ " "._("Organization")." (o)|dep_new_o|\n";
+
+ $s.= "...|<input class='center' type='image' src='plugins/departments/images/department.png' alt=''>".
+ " "._("Country")." (c)"."|dep_new_c|\n";
+
+ $s.= "...|<input class='center' type='image' src='plugins/departments/images/department.png' alt=''>".
+ " "._("Locality")." (l)|dep_new_l|\n";
+
+ $s.= "...|<input class='center' type='image' src='plugins/departments/images/department.png' alt=''>".
+ " "._("Alias")."|dep_new_alias|\n";
+
+ $s.= "...|<input class='center' type='image' src='plugins/departments/images/department.png' alt=''>".
+ " "._("Referal")."|dep_new_referal|\n";
+
$s.= "..|---|\n";
}
$s.= "..|<img src='images/lists/trash.png' alt='' border='0' class='center'>".
diff --git a/gosa-core/plugins/admin/departments/generic.tpl b/gosa-core/plugins/admin/departments/generic.tpl
index da26e94d72f68fc24eaf63e2b7d6e41ef4886b78..d3bb658e3db62deb15c926f5d0845644caeb58f4 100644 (file)
+{if $dep_type == "c"}
+<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=4>
+ <tr>
+ <td style="vertical-align:top; width:50%">
+ <h2><img class="center" alt="" align="middle" src="images/rightarrow.png"> {t}Properties{/t}</h2>
+ <table summary="">
+ <tr>
+ <td><LABEL for="c">{t}Country name{/t}</LABEL>{$must}</td>
+ <td>
+{render acl=$ouACL}
+ <input id="c" name="c" size=25 maxlength=60 value="{$c}" title="{t}Name of country to create{/t}">
+{/render}
+ </td>
+ </tr>
+ <tr>
+ <td><LABEL for="description">{t}Description{/t}</LABEL>{$must}</td>
+ <td>
+{render acl=$descriptionACL}
+ <input id="description" name="description" size=25 maxlength=80 value="{$description}" title="{t}Descriptive text for department{/t}">
+{/render}
+ </td>
+ </tr>
+ <tr>
+ <td><LABEL for="base">{t}Base{/t}</LABEL>{$must}</td>
+ <td>
+{render acl=$baseACL}
+ <select id="base" size="1" name="base" title="{t}Choose subtree to place department in{/t}">
+ {html_options options=$bases selected=$base_select}
+ </select>
+{/render}
+
+{render acl=$baseACL disable_picture='images/lists/folder_grey.png'}
+ <input type="image" name="chooseBase" src="images/lists/folder.png" class="center" title="{t}Select a base{/t}">
+{/render}
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+
+
+{else}
+
<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=4>
<tr>
<td style="vertical-align:top; width:50%">
<td>
{render acl=$ouACL}
<input id="ou" name="ou" size=25 maxlength=60 value="{$ou}" title="{t}Name of subtree to create{/t}">
+{/render}
+ </td>
+ </tr>
+ <tr>
+ <td><LABEL for="c">{t}Name of department{/t}</LABEL>{$must}</td>
+ <td>
+{render acl=$ouACL}
+ <input id="c" name="c" size=25 maxlength=60 value="{$c}" title="{t}Name of country to create{/t}">
{/render}
</td>
</tr>
</td>
</tr>
</table>
+{/if}
<!-- Place cursor -->
<input type='hidden' name='dep_generic_posted' value='1'>
diff --git a/gosa-core/plugins/admin/departments/tabs_department.inc b/gosa-core/plugins/admin/departments/tabs_department.inc
index 7e9b45c3ac4d7ea87643c2959358fcae868b0aa8..65fc151ef45dc2327fcfbb1d29213ecbd7030522 100644 (file)
function deptabs($config, $data, $dn,$category)
{
tabs::tabs($config, $data, $dn,$category);
- $this->base= $this->by_object['department']->base;
/* Add references/acls/snapshots */
$this->addSpecialTabs();