summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bdc6289)
raw | patch | inline | side by side (parent: bdc6289)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 14 Aug 2009 10:06:36 +0000 (10:06 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 14 Aug 2009 10:06:36 +0000 (10:06 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14065 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/users/class_userManagement.inc | patch | blob | history | |
gosa-core/plugins/admin/users/user-list.xml | patch | blob | history |
diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc
index f9368e414e89c244177135f8a7222e4b80165701..1375040a68092775b5ab0d07ed02bc2bb79d0834 100644 (file)
$this->DivListUsers->setEntries($this->list);
# FILTER Test #################################################
-
## Build filter
#$filter = new filter(get_template_path("user-filter.xml", true));
#$filter->setObjectStorage(get_people_ou());
## Build headpage
#$headpage = new listing(get_template_path("user-list.xml", true));
#$headpage->registerElementFilter("accountProperties", "userManagement::filterProperties");
+ #$headpage->registerElementFilter("lockLabel", "userManagement::filterLockLabel");
+ #$headpage->registerElementFilter("lockImage", "userManagement::filterLockImage");
#$headpage->setFilter($filter);
## Needs to be called before update!
}
+ static function filterLockImage($userPassword)
+ {
+ $image= "images/empty.png";
+
+ if(isset($userPassword[0]) && preg_match("/^\{[^\}]/",$userPassword[0])){
+ if(preg_match("/^[^\}]*+\}!/",$userPassword[0])){
+ $image= "images/lists/locked.png";
+ }else{
+ $image= "images/lists/unlocked.png";
+ }
+ }
+
+ return $image;
+ }
+
+
+ static function filterLockLabel($userPassword)
+ {
+ $label= "";
+
+ if(isset($userPassword[0]) && preg_match("/^\{[^\}]/",$userPassword[0])){
+ if(preg_match("/^[^\}]*+\}!/",$userPassword[0])){
+ $label= _("Unlock account");
+ }else{
+ $label= _("Lock account");
+ }
+ }
+
+ return $label;
+ }
+
+
static function filterProperties($dn, $row, $class)
{
$result= "";
diff --git a/gosa-core/plugins/admin/users/user-list.xml b/gosa-core/plugins/admin/users/user-list.xml
index 0cd971cda786ba1dc263c8a701b44b70f36dd525..f1a8f8dc5c5fd5c5a60d5a5407fe2ac4dbd5cab0 100644 (file)
</definition>
<table>
- <layout>|20px||145px|80px;r|</layout>
+ <layout>|20px||145px|100px;r|</layout>
<column>
<value>%{filter:objectType(dn,objectClass)}</value>
</action>
<action>
- <name>edit</name>
+ <name>templatize</name>
<type>entry</type>
- <objectclass>gosaUserTemplate</objectclass>
- <image>images/lists/edit.png</image>
- <label>Edit user</label>
+ <objectclass>!gosaUserTemplate</objectclass>
+ <image>plugins/users/images/wizard.png</image>
+ <label>Apply template</label>
</action>
<action>