From b3c9433f94fb186d0d168a6f3fadc84d9b5165ef Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 24 Jun 2008 12:52:57 +0000 Subject: [PATCH] Added Department templates. -Locality, country, organization git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11418 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../departments/class_departmentGeneric.inc | 13 +- .../departments/class_organizationGeneric.inc | 45 ++++- .../plugins/admin/departments/country.tpl | 54 ++++++ .../plugins/admin/departments/generic.tpl | 180 ------------------ .../plugins/admin/departments/locality.tpl | 54 ++++++ .../admin/departments/organization.tpl | 102 ++++++++++ 6 files changed, 260 insertions(+), 188 deletions(-) create mode 100644 gosa-core/plugins/admin/departments/country.tpl create mode 100644 gosa-core/plugins/admin/departments/locality.tpl create mode 100644 gosa-core/plugins/admin/departments/organization.tpl diff --git a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc index 3962c4794..c8da2b281 100644 --- a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc +++ b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc @@ -172,7 +172,18 @@ class department extends plugin } $smarty->assign("dep_type",$this->type); - return($smarty->fetch (get_template_path('generic.tpl', TRUE))); + + switch($this->type){ + case 'c' : $tpl ="country.tpl";break; + case 'o' : $tpl ="organization.tpl";break; + case 'l' : $tpl ="locality.tpl";break; + case 'ou' : $tpl ="generic.tpl";break; + case 'alias' : $tpl ="alias.tpl";break; + case 'referal' : $tpl ="referal.tpl";break; + default : $tpl ="generic.tpl"; + } + + return($smarty->fetch (get_template_path($tpl, TRUE))); } function clear_fields() diff --git a/gosa-core/plugins/admin/departments/class_organizationGeneric.inc b/gosa-core/plugins/admin/departments/class_organizationGeneric.inc index 248c48201..467aa85e5 100644 --- a/gosa-core/plugins/admin/departments/class_organizationGeneric.inc +++ b/gosa-core/plugins/admin/departments/class_organizationGeneric.inc @@ -23,20 +23,51 @@ class organization extends department { /* attribute list for save action */ - var $attributes = array( "o", "description"); - var $objectclasses = array("top", "organization"); - var $type ="o"; - var $o =""; - var $orgi_o =""; + var $attributes = array( "o", "description","userPassword","searchGuide", + "seeAlso","businessCategory","x121Address","registeredAddress", + "destinationIndicator","preferredDeliveryMethod","telexNumber", + "telephoneNumber","internationaliSDNNumber","facsimileTelephoneNumber","street", + "postOfficeBox","postalCode", "postalAddress","physicalDeliveryOfficeName", + "st","l","teletexTerminalIdentifier"); - var $namingAttr = "o"; + var $objectclasses = array("top", "organization"); + + /* Attributes + */ + var $st ="c"; + var $l ="c"; + var $description ="c"; + var $userPassword ="c"; + var $searchGuide ="c"; + var $seeAlso ="c"; + var $businessCategory ="c"; + var $x121Address ="c"; + var $registeredAddress ="c"; + var $destinationIndicator ="c"; + var $preferredDeliveryMethod ="c"; + var $telexNumber ="c"; + var $telephoneNumber ="c"; + var $internationaliSDNNumber ="c"; + var $facsimileTelephoneNumber ="c"; + var $street ="c"; + var $postOfficeBox ="c"; + var $postalCode ="c"; + var $postalAddress ="c"; + var $teletexTerminalIdentifier="c"; + var $physicalDeliveryOfficeName="c"; + + /* Naming attributes + */ + var $o =""; + var $type = "o"; + var $orgi_o = ""; + var $namingAttr = "o"; function check() { $message = plugin::check(); return($message); } - } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/gosa-core/plugins/admin/departments/country.tpl b/gosa-core/plugins/admin/departments/country.tpl new file mode 100644 index 000000000..437a1c2a6 --- /dev/null +++ b/gosa-core/plugins/admin/departments/country.tpl @@ -0,0 +1,54 @@ + + + + + + +
+

{t}Properties{/t}

+ + + + + + + + + + + + + +
{$must} +{render acl=$ouACL} + +{/render} +
{$must} +{render acl=$descriptionACL} + +{/render} +
{$must} +{render acl=$baseACL} + +{/render} + +{render acl=$baseACL disable_picture='images/lists/folder_grey.png'} + +{/render} +
+
+

 

+ + + + +
+

{t}Administrative settings{/t}

+{render acl=$gosaUnitTagACL} + +{/render} +
diff --git a/gosa-core/plugins/admin/departments/generic.tpl b/gosa-core/plugins/admin/departments/generic.tpl index df3c9121f..3b44f6f1e 100644 --- a/gosa-core/plugins/admin/departments/generic.tpl +++ b/gosa-core/plugins/admin/departments/generic.tpl @@ -1,185 +1,6 @@ - -{if $dep_type == "l"} - - - - - - - -
-

{t}Properties{/t}

- - - - - - - - - - - - - -
{$must} -{render acl=$ouACL} - -{/render} -
{$must} -{render acl=$descriptionACL} - -{/render} -
{$must} -{render acl=$baseACL} - -{/render} - -{render acl=$baseACL disable_picture='images/lists/folder_grey.png'} - -{/render} -
-
-

 

- - - - -
-

{t}Administrative settings{/t}

-{render acl=$gosaUnitTagACL} - -{/render} -
- - -{elseif $dep_type == "o"} - - - - - - - -
-

{t}Properties{/t}

- - - - - - - - - - - - - -
{$must} -{render acl=$ouACL} - -{/render} -
{$must} -{render acl=$descriptionACL} - -{/render} -
{$must} -{render acl=$baseACL} - -{/render} - -{render acl=$baseACL disable_picture='images/lists/folder_grey.png'} - -{/render} -
-
-

 

- - - - -
-

{t}Administrative settings{/t}

-{render acl=$gosaUnitTagACL} - -{/render} -
- - -{elseif $dep_type == "c"} - - - - - - - -
-

{t}Properties{/t}

- - - - - - - - - - - - - -
{$must} -{render acl=$ouACL} - -{/render} -
{$must} -{render acl=$descriptionACL} - -{/render} -
{$must} -{render acl=$baseACL} - -{/render} - -{render acl=$baseACL disable_picture='images/lists/folder_grey.png'} - -{/render} -
-
-

 

- - - - -
-

{t}Administrative settings{/t}

-{render acl=$gosaUnitTagACL} - -{/render} -
- - -{elseif $dep_type == "ou"} - - -
@@ -295,7 +116,6 @@
-{/if} diff --git a/gosa-core/plugins/admin/departments/locality.tpl b/gosa-core/plugins/admin/departments/locality.tpl new file mode 100644 index 000000000..10c929013 --- /dev/null +++ b/gosa-core/plugins/admin/departments/locality.tpl @@ -0,0 +1,54 @@ + + + + + + +
+

{t}Properties{/t}

+ + + + + + + + + + + + + +
{$must} +{render acl=$ouACL} + +{/render} +
{$must} +{render acl=$descriptionACL} + +{/render} +
{$must} +{render acl=$baseACL} + +{/render} + +{render acl=$baseACL disable_picture='images/lists/folder_grey.png'} + +{/render} +
+
+

 

+ + + + +
+

{t}Administrative settings{/t}

+{render acl=$gosaUnitTagACL} + +{/render} +
diff --git a/gosa-core/plugins/admin/departments/organization.tpl b/gosa-core/plugins/admin/departments/organization.tpl new file mode 100644 index 000000000..25b79dcdb --- /dev/null +++ b/gosa-core/plugins/admin/departments/organization.tpl @@ -0,0 +1,102 @@ + + + + + + + +
+

{t}Properties{/t}

+ + + + + + + + + + + + + +
{$must} +{render acl=$ouACL} + +{/render} +
{$must} +{render acl=$descriptionACL} + +{/render} +
{$must} +{render acl=$baseACL} + +{/render} + +{render acl=$baseACL disable_picture='images/lists/folder_grey.png'} + +{/render} +
+
+   + +

{t}Location{/t}

+ + + + + + + + + + + + + + + + + + + + + + +
+{render acl=$stACL} + +{/render} +
+{render acl=$lACL} + +{/render} +
+{render acl=$postalAddressACL} + +{/render} +
+{render acl=$telephoneNumberACL} + +{/render} +
+{render acl=$facsimileTelephoneNumberACL} + +{/render} +
+
+

 

+ + + + +
+

{t}Administrative settings{/t}

+{render acl=$gosaUnitTagACL} + +{/render} +
-- 2.30.2