Code

Re-added action filter
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Oct 2009 14:14:56 +0000 (14:14 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Oct 2009 14:14:56 +0000 (14:14 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14655 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/users/class_userManagement.inc
gosa-core/plugins/admin/users/user-filter.tpl
gosa-core/plugins/admin/users/user-filter.xml
gosa-core/plugins/admin/users/user-list.xml

index 173b75460454a06c83c9e9789e3ca70d753ed59c..c46da475bf0659eaf968e7e6d6076e01cf28406c 100644 (file)
@@ -57,6 +57,7 @@ class userManagement extends management
     $headpage = new listing(get_template_path("user-list.xml", true));
     $headpage->registerElementFilter("lockLabel", "userManagement::filterLockLabel");
     $headpage->registerElementFilter("lockImage", "userManagement::filterLockImage");
+    $headpage->registerElementFilter("filterProperties", "userManagement::filterProperties");
     $headpage->setFilter($filter);
 
     // Add copy&paste and snapshot handler.
@@ -676,6 +677,57 @@ class userManagement extends management
     }
     return $label;
   }
+
+
+  static function filterProperties($row, $classes)
+  {
+    $result= "";
+    $map= array( "gosaAccount" => array( "image" => "plugins/users/images/select_user.png",
+                                         "plugin" => "user",
+                                         "alt" => _("Generic"),
+                                         "title" => _("Edit generic properties")),
+                 "posixAccount" => array("image" => "images/penguin.png",
+                                         "plugin" => "posixAccount",
+                                         "alt" => _("POSIX"),
+                                         "title" => _("Edit POSIX properties")),
+                 "gosaMailAccount" => array("image" => "images/mailto.png",
+                                         "alt" => _("Mail"),
+                                         "plugin" => "mailAccount",
+                                         "title" => _("Edit mail properties")),
+                 "sambaSamAccount" => array("image" => "plugins/systems/images/select_winstation.png",
+                                         "plugin" => "sambaAccount",
+                                         "alt" => _("Samba"),
+                                         "title" => _("Edit samba properties")),
+                 "apple-user" => array("image" => "plugins/netatalk/images/select_netatalk.png",
+                                         "plugin" => "sambaAccount",
+                                         "alt" => _("Netatalk"),
+                                         "title" => _("Edit netatalk properties")),
+                 "gotoEnvironment" => array("image" => "plugins/users/images/small_environment.png",
+                                         "plugin" => "gotoEnvironment",
+                                         "alt" => _("Environment"),
+                                         "title" => _("Edit environment properties")),
+                 "goFaxAccount" => array("image" => "plugins/users/images/fax_small.png",
+                                         "plugin" => "goFaxAccount",
+                                         "alt" => _("FAX"),
+                                         "title" => _("Edit FAX properties")),
+                 "goFonAccount" => array("image" => "plugins/gofon/images/select_phone.png",
+                                         "plugin" => "goFonAccount",
+                                         "alt" => _("Phone"),
+                                         "title" => _("Edit phone properties")));
+
+    // Walk thru map
+    foreach ($map as $oc => $properties) {
+      if (in_array_ics($oc, $classes)) {
+        $result.="<input class='center' type='image' src='".$properties['image']."' ".
+                 "alt='".$properties['alt']."' title='".$properties['title'].
+                 "' name='listing_edit_".$properties['plugin']."_$row' style='padding:1px'>";
+      } else {
+        $result.="<img src='images/empty.png' alt=' ' class='center' style='padding:1px'>";
+      }
+    }
+    return $result;
+  }
+
 } 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>
index 417b7bf2e1a8746fe70068eb5332b0deaed98da6..948b8e6f0bc70dd333cf935ee175e0f208c52264 100644 (file)
@@ -5,6 +5,14 @@
 </div>
 
 <div class="contentboxb">
+<div style="border-top:1px solid #AAAAAA"></div>
+
+{$TEMPLATES}&nbsp;<LABEL for='TEMPLATES'>{t}Show templates{/t}</LABEL><br>
+{$FUNCTIONAL}&nbsp;<LABEL for='FUNCTIONAL'>{t}Show functional users{/t}</LABEL><br>
+{$POSIX}&nbsp;<LABEL for='POSIX'>{t}Show POSIX users{/t}</LABEL><br>
+{$MAIL}&nbsp;<LABEL for='MAIL'>{t}Show Mail users{/t}</LABEL><br>
+{$SAMBA}&nbsp;<LABEL for='SAMBA'>{t}Show Samba users{/t}</LABEL><br>
+
  <div style="border-top:1px solid #AAAAAA"></div>
  {$SCOPE}
 
index 0fb3fe8d93df736bfff748100425096ae9e6f6e6..5b009f6729ce1ec7f2f4924589854be1dd68bdbb 100644 (file)
     </autocomplete>
   </element>
 
+  <element>
+    <type>checkbox</type>
+    <tag>TEMPLATES</tag>
+    <default>false</default>
+    <unset>(!(objectClass=gosaUserTemplate))</unset>
+    <set></set>
+  </element>
+
+  <element>
+    <type>checkbox</type>
+    <tag>FUNCTIONAL</tag>
+    <default>true</default>
+    <unset></unset>
+    <set>(objectClass=gosaAccount)</set>
+  </element>
+
+  <element>
+    <type>checkbox</type>
+    <tag>POSIX</tag>
+    <default>true</default>
+    <unset></unset>
+    <set>(objectClass=posixAccount)</set>
+  </element>
+
+  <element>
+    <type>checkbox</type>
+    <tag>MAIL</tag>
+    <default>true</default>
+    <unset></unset>
+    <set>(objectClass=gosaMailAccount)</set>
+  </element>
+
+  <element>
+    <type>checkbox</type>
+    <tag>SAMBA</tag>
+    <default>true</default>
+    <unset></unset>
+    <set>(objectClass=sambaSamAccount)</set>
+  </element>
+
 </filterdef>
index d0b8efc33136204530be8744cb567d7eb0f68f57..39be2da318d19554efccc916d2486b12286444ab 100644 (file)
@@ -30,7 +30,7 @@
   </definition>
 
   <table>
-    <layout>|20px||200px|150px|180px;r|</layout>
+    <layout>|20px||120px|120px|150px|170px;r|</layout>
 
     <department>
       <value>%{filter:objectType(dn,objectClass)}</value>
       <export>true</export>
     </column>
 
+    <column>
+      <label>Properties</label>
+      <value>%{filter:filterProperties(row,objectClass)}</value>
+    </column>
+
     <column>
       <label>Actions</label>
       <value>%{filter:actions(dn,row,objectClass)}</value>