From: hickert Date: Tue, 23 Feb 2010 09:43:27 +0000 (+0000) Subject: Added manager patch X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=478a026c0199f572d998539c9c295a6d611d8764;p=gosa.git Added manager patch git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15667 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc index 7df04a8e6..5185fd9a3 100644 --- a/gosa-core/plugins/personal/generic/class_user.inc +++ b/gosa-core/plugins/personal/generic/class_user.inc @@ -108,12 +108,15 @@ class user extends plugin var $view_logged = FALSE; + var $manager = ""; + + /* attribute list for save action */ var $attributes= array("sn", "givenName", "uid", "personalTitle", "academicTitle", "homePostalAddress", "homePhone", "labeledURI", "ou", "o", "dateOfBirth", "gender","preferredLanguage", "departmentNumber", "employeeNumber", "employeeType", "l", "st","jpegPhoto", "roomNumber", "telephoneNumber", "mobile", "pager", "cn", "userPKCS12", - "postalAddress", "facsimileTelephoneNumber", "userSMIMECertificate", "gosaLoginRestriction"); + "postalAddress", "facsimileTelephoneNumber", "userSMIMECertificate", "gosaLoginRestriction", "manager"); var $objectclasses= array("top", "person", "organizationalPerson", "inetOrgPerson", "gosaAccount"); @@ -290,6 +293,17 @@ class user extends plugin $smarty->assign("usePrototype", "true"); $smarty->assign("gosaLoginRestrictionWidget", $this->gosaLoginRestrictionWidget->render()); + /* Assign managers */ + $ldap = $this->config->get_ldap_link(); + $ldap->cd($this->config->current["BASE"]); + $ldap->search("(objectClass=inetOrgPerson)", array("cn", "dn")); + $managers = array(); + while($attrs = $ldap->fetch()) { + $managers[$attrs["dn"]] = $attrs["cn"][0]; + } + asort($managers); + $smarty->assign("managers", $managers); + /* Assign sex */ $sex= array(0 => " ", "F" => _("female"), "M" => _("male")); $smarty->assign("gender_list", $sex); @@ -1632,6 +1646,7 @@ class user extends plugin "o" => _("Organization"), "ou" => _("Department"), "departmentNumber" => _("Department number"), + "manager" => _("Manager"), "employeeNumber" => _("Employee number"), "employeeType" => _("Employee type"), diff --git a/gosa-core/plugins/personal/generic/generic.tpl b/gosa-core/plugins/personal/generic/generic.tpl index 6ef9d87e4..7d7a2e735 100644 --- a/gosa-core/plugins/personal/generic/generic.tpl +++ b/gosa-core/plugins/personal/generic/generic.tpl @@ -316,6 +316,19 @@ {render acl=$departmentNumberACL checkbox=$multiple_support checked=$use_departmentNumber} +{/render} + + + + + +{render acl=$managerACL checkbox=$multiple_support checked=$use_manager} + {/render} diff --git a/gosa-core/plugins/personal/generic/multiple_generic.tpl b/gosa-core/plugins/personal/generic/multiple_generic.tpl deleted file mode 100644 index 590a15c6f..000000000 --- a/gosa-core/plugins/personal/generic/multiple_generic.tpl +++ /dev/null @@ -1,480 +0,0 @@ - - - - - - - - - -
- -

{t}Personal information{/t}

-
- - - - -
- {t}Personal picture{/t} -
-
- - - - - - - - - - - - - -
- - - - -
- - - - -
-
-
- -
-
-
- - - -
-
- - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- - - - -
-
-
-
-
-

- - - - - - - - {if $governmentmode ne "true"} - - - - - - - - - {else} - - - - - - - {/if} - -
-

- -  {t}Organizational information{/t}

-
- - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
-
-   - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
-
-   - - - - - - - - - - - - - - -
- - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
-
- - -