From cb72d09b8cefe3438d2e4bec8d03ac3caa1d39c8 Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 14 Apr 2008 12:24:44 +0000 Subject: [PATCH] * Folder fix * Added templatize template git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10419 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/plugins/admin/acl/acl_role.tpl | 2 +- .../departments/class_divListDepartment.inc | 4 +- .../plugins/admin/departments/generic.tpl | 2 +- .../admin/groups/class_divListGroup.inc | 2 +- gosa-core/plugins/admin/groups/generic.tpl | 2 +- .../admin/ogroups/class_divListOGroup.inc | 2 +- gosa-core/plugins/admin/ogroups/generic.tpl | 2 +- .../admin/users/class_divListUsers.inc | 2 +- .../admin/users/class_userManagement.inc | 29 +++++++------- gosa-core/plugins/admin/users/templatize.tpl | 38 +++++++++++++++++++ .../plugins/personal/generic/generic.tpl | 2 +- .../personal/generic/multiple_generic.tpl | 2 +- gosa-core/setup/setup_ldap.tpl | 2 +- 13 files changed, 66 insertions(+), 25 deletions(-) create mode 100644 gosa-core/plugins/admin/users/templatize.tpl diff --git a/gosa-core/plugins/admin/acl/acl_role.tpl b/gosa-core/plugins/admin/acl/acl_role.tpl index 3dce4dc8a..bf4eda013 100644 --- a/gosa-core/plugins/admin/acl/acl_role.tpl +++ b/gosa-core/plugins/admin/acl/acl_role.tpl @@ -34,7 +34,7 @@ {/render} {render acl=$baseACL disable_picture='images/lists/folder_grey.png'} - + {/render} diff --git a/gosa-core/plugins/admin/departments/class_divListDepartment.inc b/gosa-core/plugins/admin/departments/class_divListDepartment.inc index 0abfb0d8b..d33e817d3 100644 --- a/gosa-core/plugins/admin/departments/class_divListDepartment.inc +++ b/gosa-core/plugins/admin/departments/class_divListDepartment.inc @@ -216,7 +216,7 @@ class divListDepartment extends MultiSelectWindow "attach" => "style='width:20px;'"); } - $field0 = array("string" => "department", "attach" => "style='text-align:center;width:20px;'"); + $field0 = array("string" => "department", "attach" => "style='text-align:center;width:20px;'"); $field1 = array("string" => sprintf($linkopen,base64_encode($key),$val), "attach" => "style='' title='".$title."'"); $field2 = array("string" => preg_replace("/%KEY%/", base64_encode($key), $actions), "attach" => "style='width:60px;border-right:0px;text-align: right;'"); @@ -227,7 +227,7 @@ class divListDepartment extends MultiSelectWindow /* Create summary string for list footer */ $num_deps=count($list); $num_dep_str = _("Number of listed departments"); - $str = "".$num_dep_str." ".$num_deps."    "; $this->set_List_Bottom_Info($str); diff --git a/gosa-core/plugins/admin/departments/generic.tpl b/gosa-core/plugins/admin/departments/generic.tpl index 36921ad1e..a1d42430e 100644 --- a/gosa-core/plugins/admin/departments/generic.tpl +++ b/gosa-core/plugins/admin/departments/generic.tpl @@ -42,7 +42,7 @@ {/render} {render acl=$baseACL disable_picture='images/lists/folder_grey.png'} - + {/render} diff --git a/gosa-core/plugins/admin/groups/class_divListGroup.inc b/gosa-core/plugins/admin/groups/class_divListGroup.inc index aec943a89..7122fa212 100644 --- a/gosa-core/plugins/admin/groups/class_divListGroup.inc +++ b/gosa-core/plugins/admin/groups/class_divListGroup.inc @@ -366,7 +366,7 @@ class divListGroup extends MultiSelectWindow $str = "".$num_grp_str." ".$num_grps."    "; - $str.= "".$num_dep_str." ".$num_deps."    "; $this->set_List_Bottom_Info($str); diff --git a/gosa-core/plugins/admin/groups/generic.tpl b/gosa-core/plugins/admin/groups/generic.tpl index aa6b61a2f..76df0b150 100644 --- a/gosa-core/plugins/admin/groups/generic.tpl +++ b/gosa-core/plugins/admin/groups/generic.tpl @@ -46,7 +46,7 @@ {/render} {render acl=$baseACL disable_picture='images/lists/folder_grey.png'} - + {/render} diff --git a/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc b/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc index db7bae3f1..3c7fdf0ec 100644 --- a/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc +++ b/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc @@ -353,7 +353,7 @@ class divListOGroup extends MultiSelectWindow $str = "".$num_obj_str." ".$num_objs."    "; - $str.= "".$num_dep_str." ".$num_deps."    "; $this->set_List_Bottom_Info($str); diff --git a/gosa-core/plugins/admin/ogroups/generic.tpl b/gosa-core/plugins/admin/ogroups/generic.tpl index 19cb69cac..a091d1747 100644 --- a/gosa-core/plugins/admin/ogroups/generic.tpl +++ b/gosa-core/plugins/admin/ogroups/generic.tpl @@ -31,7 +31,7 @@ {/render} {render acl=$baseACL disable_picture='images/lists/folder_grey.png'} - + {/render} diff --git a/gosa-core/plugins/admin/users/class_divListUsers.inc b/gosa-core/plugins/admin/users/class_divListUsers.inc index ad94f6eb1..3c6a019f6 100644 --- a/gosa-core/plugins/admin/users/class_divListUsers.inc +++ b/gosa-core/plugins/admin/users/class_divListUsers.inc @@ -446,7 +446,7 @@ class divListUsers extends MultiSelectWindow $str = "".$num_user_str." ".$num_users."    "; - $str.= "".$num_dep_str." ".$num_deps."    "; $this->set_List_Bottom_Info($str); diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index 7f29d036c..7b9535cb4 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -440,12 +440,14 @@ class userManagement extends plugin /******************** Apply template to multiple entries requested, display confirm dialog ********************/ + + # TODO: show dialog to choose # * template # * when the template is choosen refresh the list of # available attributes with a checkbox - everything checked # * when pressing apply do the stuff below - if ($s_action=="ttemplatize_multiple"){ + if ($s_action=="templatize_multiple"){ $ids = $this->list_get_selected_items(); $this->dns = array(); if(count($ids)){ @@ -459,20 +461,21 @@ class userManagement extends plugin } } - # Test stuff - foreach ($this->dns as $dn){ - - echo "Template test with '$dn'
"; - $template_dn= "cn=super44 super44,ou=people,dc=gonicus,dc=de"; - $usertab= new usertabs($this->config, $this->config->data['TABS']['USERTABS'], $dn); - $usertab->adapt_from_template($template_dn, array("sn", "givenName", "uid")); - $usertab->save(); - unset ($usertab); - $usertab= NULL; - } - + return($smarty->fetch(get_template_path('templatize.tpl', TRUE))); } +# TODO: apply after we pressed some button +# foreach ($this->dns as $dn){ +# +# echo "Template test with '$dn'
"; +# $template_dn= "cn=super44 super44,ou=people,dc=gonicus,dc=de"; +# $usertab= new usertabs($this->config, $this->config->data['TABS']['USERTABS'], $dn); +# $usertab->adapt_from_template($template_dn, array("sn", "givenName", "uid")); +# $usertab->save(); +# unset ($usertab); +# $usertab= NULL; +# } + /******************** Delete MULTIPLE entries requested, display confirm dialog diff --git a/gosa-core/plugins/admin/users/templatize.tpl b/gosa-core/plugins/admin/users/templatize.tpl new file mode 100644 index 000000000..3288ebf2b --- /dev/null +++ b/gosa-core/plugins/admin/users/templatize.tpl @@ -0,0 +1,38 @@ +
+ {t}Applying a template to users{/t} +
+ +

+ {t}Applying a template to several users will replace all user attributes defined in the template.{/t} +

+ +

 

+ +
+ + + + + + +
+ +
+ +
+

+ +   + +

+ + + + + diff --git a/gosa-core/plugins/personal/generic/generic.tpl b/gosa-core/plugins/personal/generic/generic.tpl index a0130e8f2..0f5c0cfd4 100644 --- a/gosa-core/plugins/personal/generic/generic.tpl +++ b/gosa-core/plugins/personal/generic/generic.tpl @@ -177,7 +177,7 @@ {/render} {render acl=$baseACL disable_picture='images/lists/folder_grey.png'} - + {/render} diff --git a/gosa-core/plugins/personal/generic/multiple_generic.tpl b/gosa-core/plugins/personal/generic/multiple_generic.tpl index 06ed929ac..e8a1a21ab 100644 --- a/gosa-core/plugins/personal/generic/multiple_generic.tpl +++ b/gosa-core/plugins/personal/generic/multiple_generic.tpl @@ -53,7 +53,7 @@ - + diff --git a/gosa-core/setup/setup_ldap.tpl b/gosa-core/setup/setup_ldap.tpl index 8c3788db8..93525a39e 100644 --- a/gosa-core/setup/setup_ldap.tpl +++ b/gosa-core/setup/setup_ldap.tpl @@ -75,7 +75,7 @@
{if $append_base_to_admin_dn},{$base_to_append}{/if} - +
-- 2.30.2