summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 23279e6)
raw | patch | inline | side by side (parent: 23279e6)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 16 Mar 2010 13:01:54 +0000 (13:01 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 16 Mar 2010 13:01:54 +0000 (13:01 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16629 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/plugins/personal/posix/groupSelect/class_filterLDAPBlacklist.inc b/gosa-core/plugins/personal/posix/groupSelect/class_filterLDAPBlacklist.inc
index a465d0916089fa7f774e84e32240a0c2bd235e7f..b78f2b2871be4d7f4043df69f3c9d79a91455465 100644 (file)
class filterLDAPBlacklist {
-static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "")
-{
-$result = filterLDAP::query($base, $scope, $filter, $attributes, $category, $objectStorage);
-return(filterLDAPBlacklist::filterByBlacklist($result));
-}
+ static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "")
+ {
+ $result = filterLDAP::query($base, $scope, $filter, $attributes, $category, $objectStorage);
+ return(filterLDAPBlacklist::filterByBlacklist($result));
+ }
-static function filterByBlacklist($entries)
-{
-if(session::is_set('filterBlacklist')){
-$blist = session::get('filterBlacklist');
-foreach($blist as $attr_name => $attr_values){
-foreach($attr_values as $match){
-foreach($entries as $id => $entry){
-if(isset($entry[$attr_name])){
-$test = $entry[$attr_name];
-if(!is_array($test)) $test = array($test);
-if(in_array($match, $test)) unset($entries[$id]);
-}
-}
-}
-}
-}
-return(array_values($entries));
-}
+ static function filterByBlacklist($entries)
+ {
+ if(session::is_set('filterBlacklist')){
+ $blist = session::get('filterBlacklist');
+ foreach($blist as $attr_name => $attr_values){
+ foreach($attr_values as $match){
+ foreach($entries as $id => $entry){
+ if(isset($entry[$attr_name])){
+ $test = $entry[$attr_name];
+ if(!is_array($test)) $test = array($test);
+ if(in_array($match, $test)) unset($entries[$id]);
+ }
+ }
+ }
+ }
+ }
+ return(array_values($entries));
+ }
}
?>
diff --git a/gosa-core/plugins/personal/posix/groupSelect/class_groupSelect.inc b/gosa-core/plugins/personal/posix/groupSelect/class_groupSelect.inc
index 2c98adada43047b617227f3d15ae71251fa518ea..b681d00a6074784f83d009369da3ca28d4b12055 100644 (file)
$this->storagePoints = array(get_ou("groupRDN"));
- // Build filter
- if (session::global_is_set(get_class($this)."_filter")){
- $filter= session::global_get(get_class($this)."_filter");
- } else {
+# // Build filter
+ # if (session::global_is_set(get_class($this)."_filter")){
+ # $filter= session::global_get(get_class($this)."_filter");
+ # } else {
$filter = new filter(get_template_path("group-filter.xml", true, dirname(__FILE__)));
$filter->setObjectStorage($this->storagePoints);
- }
+ #}
$this->setFilter($filter);
// Build headpage
diff --git a/gosa-core/plugins/personal/posix/groupSelect/group-filter.tpl b/gosa-core/plugins/personal/posix/groupSelect/group-filter.tpl
+++ /dev/null
@@ -1,34 +0,0 @@
-<div class="contentboxh">
- <p class="contentboxh">
- {image path="images/launch.png" align="right"}{t}Filter{/t}
- </p>
-</div>
-
-<div class="contentboxb">
-
- <div style="border-top:1px solid #AAAAAA"></div>
-
- {$PRIMARY} <label for='TEMPLATES'>{t}Show primary groups{/t}</label><br>
- {$SAMBA} <label for='TEMPLATES'>{t}Show samba groups{/t}</label><br>
- {$MAIL} <label for='TEMPLATES'>{t}Show mail groups{/t}</label><br>
-
- {$SCOPE}
-
- <table summary='{t}Filter options{/t}' style="width:100%;border-top:1px solid #B0B0B0;">
- <tr>
- <td>
- <label for="NAME">
- {image path="images/lists/search.png"} Name
- </label>
- </td>
- <td>
- {$NAME}
- </td>
- </tr>
- <tr>
- <td width="100%" align="right" colspan="2" style="background:#EEEEEE;border-top:1px solid #B0B0B0;">
- {$APPLY}
- </td>
- </tr>
- </table>
-</div>
diff --git a/gosa-core/plugins/personal/posix/groupSelect/group-filter.xml b/gosa-core/plugins/personal/posix/groupSelect/group-filter.xml
index f44ca24580e1b251fd7dee53854dbf74247789ac..a3e6aa917d3eedaf0b88f90d104aa141c9fff35e 100644 (file)
<filterdef>
<definition>
<category>groups</category>
- <template>../plugins/personal/posix/groupSelect/group-filter.tpl</template>
<initial>true</initial>
+ <default>default</default>
+ <scope>auto</scope>
+ <attribute>dn</attribute>
+ <attribute>objectClass</attribute>
+ <attribute>cn</attribute>
+ <attribute>description</attribute>
</definition>
<search>
+ <tag>default</tag>
+ <label>Default filter</label>
<query>
<backend>LDAPBlacklist</backend>
- <filter>(&(objectClass=posixGroup)$NAME(|$PRIMARY$MAIL$SAMBA))</filter>
- <attribute>dn</attribute>
- <attribute>objectClass</attribute>
- <attribute>cn</attribute>
- <attribute>description</attribute>
+ <filter>(&(objectClass=posixGroup)(cn=$))</filter>
</query>
- <scope>auto</scope>
- </search>
-
- <element>
- <type>checkbox</type>
- <tag>PRIMARY</tag>
- <default>true</default>
- <unset/>
- <set>(!(objectClass=gosaObject))</set>
- </element>
-
- <element>
- <type>checkbox</type>
- <tag>MAIL</tag>
- <default>true</default>
- <unset/>
- <set>(objectClass=gosaMailAccount)</set>
- </element>
-
- <element>
- <type>checkbox</type>
- <tag>SAMBA</tag>
- <default>true</default>
- <unset/>
- <set>(objectClass=sambaGroupMapping)</set>
- </element>
-
- <element>
- <type>textfield</type>
- <tag>NAME</tag>
- <size>20</size>
- <maxlength>60</maxlength>
- <default/>
- <unset/>
- <set>(|(cn=*$*)(description=*$*))</set>
- <alphabet>true</alphabet>
<autocomplete>
- <backend>LDAPBlacklist</backend>
- <filter>(&(objectClass=posixGroup)(|(cn=*$NAME*)(description=*$NAME*)))</filter>
<attribute>cn</attribute>
<frequency>0.5</frequency>
<characters>3</characters>
</autocomplete>
- </element>
+ </search>
</filterdef>
diff --git a/gosa-core/plugins/personal/posix/groupSelect/group-list.tpl b/gosa-core/plugins/personal/posix/groupSelect/group-list.tpl
index 55950530310a3c15e6f911581984a1cc4b01c786..af0f2c69ff3c9dc9f76a7d7b5f8f271c10e53d03 100644 (file)
-<table summary="{t}Group selection{/t}"
- style="width:100%;height:100%" cellpadding=2>
- <tr>
- <td style="width:100%;">
- <div class="contentboxh">
- <p class="contentboxh"> {$HEADLINE} {$SIZELIMIT}</p>
- </div>
-
- <div class="contentboxb">
- <div style='background:white;padding:3px;'>
- <table><tr>
- <td>{$ROOT} </td><td>{$BACK} </td><td>{$HOME} </td><td>{$RELOAD} </td><td>{$SEPARATOR} </td><td>{t}Base{/t} {$BASE} </td><td>{$SEPARATOR} </td><td>{image path="images/rocket.png"}
- </td><td> {$ACTIONS}</td>
- </tr></table>
- </div>
- </div>
-
- <div style='height:4px;'>
+<input type='image' src='images/empty.png' name='no_action_posted' value='do_nothing' alt='' style='width:2px;height:2px;'>
+
+<div id="mainlist">
+
+ <div class="mainlist-header">
+ <p>{$HEADLINE} {$SIZELIMIT}</p>
+ <div class="mainlist-nav">
+ <table>
+ <tr>
+ <td>{$ROOT}</td>
+ <td>{$BACK}</td>
+ <td>{$HOME}</td>
+ <td>{$RELOAD}</td>
+ <td class="left-border">{t}Base{/t} {$BASE}</td>
+ <td class="left-border">{$ACTIONS}</td>
+ <td class="left-border">{$FILTER}</td>
+ </tr>
+ </table>
</div>
- {$LIST}
- </td>
- <td style='min-width:250px'>
- {$FILTER}
- </td>
- </tr>
-</table>
+ </div>
-<input type="hidden" value="1" name="PosixGroupDialogPosted">
+ {$LIST}
+</div>
+
+<input type="hidden" name="ignore">
<br>
<div class="plugin-actions">
-<button type='submit' name='add_groups_finish'>{msgPool type=addButton}</button>
-<button type='submit' name='add_groups_cancel'>{msgPool type=cancelButton}</button>
+ <button type='submit' name='add_groups_finish'>{msgPool type=addButton}</button>
+ <button type='submit' name='add_groups_cancel'>{msgPool type=cancelButton}</button>
</div>
diff --git a/gosa-core/plugins/personal/posix/groupSelect/group-list.xml b/gosa-core/plugins/personal/posix/groupSelect/group-list.xml
index 9714ced2f1ad8c0b6ff89303fc14223e4d2891e1..8703cbc377d27430d1116746c10c4873f6f79eb8 100644 (file)
<?xml version="1.0" encoding="UTF-8"?>
+
<list>
<definition>
- <departmentbrowser>true</departmentbrowser>
- <departmentrootvisible>false</departmentrootvisible>
- <basemode>true</basemode>
- <multiselect>true</multiselect>
+ <departmentBrowser>true</departmentBrowser>
+ <departmentRootVisible>false</departmentRootVisible>
+ <baseMode>true</baseMode>
+ <multiSelect>true</multiSelect>
<template>../plugins/personal/posix/groupSelect/group-list.tpl</template>
<module>groups</module>
<label>Please select the desired entries</label>
- <defaultsortcolumn>1</defaultsortcolumn>
- <objecttype>
+ <defaultSortColumn>1</defaultSortColumn>
+
+ <objectType>
<label>Group</label>
- <objectclass>posixGroup</objectclass>
+ <objectClass>posixGroup</objectClass>
<category>groups</category>
<class>group</class>
<image>plugins/groups/images/select_group.png</image>
- </objecttype>
+ </objectType>
+
</definition>
<table>