Code

Updated trust select
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 16 Mar 2010 13:17:42 +0000 (13:17 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 16 Mar 2010 13:17:42 +0000 (13:17 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16631 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/personal/posix/trustSelect/class_trustSelect.inc
gosa-core/plugins/personal/posix/trustSelect/trust-filter.tpl [deleted file]
gosa-core/plugins/personal/posix/trustSelect/trust-filter.xml
gosa-core/plugins/personal/posix/trustSelect/trust-list.tpl
gosa-core/plugins/personal/posix/trustSelect/trust-list.xml

index 03828f892bac0d992d5c99023d64ebbe85937f89..f64881f6dea9640bfb26f0353cb1cad6aeeb52f6 100644 (file)
@@ -33,13 +33,13 @@ class trustSelect extends management
 
     $this->storagePoints = array(get_ou("workstationRDN"),get_ou("terminalRDN"),get_ou("serverRDN"),);
 
-    // 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("trust-filter.xml", true, dirname(__FILE__)));
       $filter->setObjectStorage($this->storagePoints);
-    }
+    #}
     $this->setFilter($filter);
 
     // Build headpage
diff --git a/gosa-core/plugins/personal/posix/trustSelect/trust-filter.tpl b/gosa-core/plugins/personal/posix/trustSelect/trust-filter.tpl
deleted file mode 100644 (file)
index 6197369..0000000
+++ /dev/null
@@ -1,37 +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>
- {$SERVER}&nbsp;{t}Show servers{/t}<br>
- {$WORKSTATION}&nbsp;{t}Show workstations{/t}<br>
- {$TERMINAL}&nbsp;{t}Show terminals{/t}<br>
- <div style="border-top:1px solid #AAAAAA"></div>
- {$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"}&nbsp;Name
-    </label>
-   </td>
-   <td>
-    {$NAME}
-   </td>
-  </tr>
-  <tr>
-   <td colspan="2" align="right"  style="background:#EEEEEE;border-top:1px solid #B0B0B0;">
-    {$APPLY}
-   </td>
-  </tr>
- </table>
-</div>
index b30118e63e364d778fa4720decb84c2c4be15130..1b32632e712d208773f03d3d32be85f0ffc7cdc8 100644 (file)
@@ -1,64 +1,29 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <filterdef>
-<definition>
-<category>groups</category>
-<template>../plugins/personal/posix/trustSelect/trust-filter.tpl</template>
-<initial>true</initial>
-</definition>
+  <definition>
+    <category>groups</category>
+    <initial>true</initial>
+    <default>default</default>
+    <scope>auto</scope>
+    <attribute>dn</attribute>
+    <attribute>objectClass</attribute>
+    <attribute>cn</attribute>
+    <attribute>description</attribute>
+  </definition>
 
-<search>
-<query>
-<backend>LDAPBlacklist</backend>
-<filter>(&amp;(|$SERVER $WORKSTATION $TERMINAL)$NAME)</filter>
-<attribute>dn</attribute>
-<attribute>objectClass</attribute>
-<attribute>cn</attribute>
-<attribute>description</attribute>
-</query>
-<scope>auto</scope>
-</search>
-
-<element>
-<type>textfield</type>
-<tag>NAME</tag>
-<size>20</size>
-<maxlength>60</maxlength>
-<default></default>
-<unset></unset>
-<set>(cn=*$*)</set>
-<alphabet>false</alphabet>
-<autocomplete>
-<backend>LDAPBlacklist</backend>
-<filter>(cn=*$NAME*)</filter>
-<attribute>cn</attribute>
-<frequency>0.5</frequency>
-<characters>3</characters>
-</autocomplete>
-</element>
-
-<element>
-<type>checkbox</type>
-<tag>SERVER</tag>
-<default>true</default>
-<unset></unset>
-<set>(objectClass=goServer)</set>
-</element>
-
-<element>
-<type>checkbox</type>
-<tag>WORKSTATION</tag>
-<default>true</default>
-<unset></unset>
-<set>(objectClass=gotoWorkstation)</set>
-</element>
-
-<element>
-<type>checkbox</type>
-<tag>TERMINAL</tag>
-<default>true</default>
-<unset></unset>
-<set>(objectClass=gotoTerminal)</set>
-</element>
+  <search>
+    <tag>default</tag>
+    <label>Default filter</label>
+    <query>
+      <backend>LDAPBlacklist</backend>
+      <filter>(&amp;(|(objectClasS=goServer)(objectClass=gotoWorkstation)(objectClass=gotoTerminal))(cn=$))</filter>
+    </query>
+    <autocomplete>
+      <attribute>cn</attribute>
+      <frequency>0.5</frequency>
+      <characters>3</characters>
+    </autocomplete>
+  </search>
 
 </filterdef>
index d5d7b459cd8d79f1707f8f139015c468fd5f6bde..9345f7ebc052159f6ab9733c5e31d57cde5cdfe0 100644 (file)
@@ -1,36 +1,35 @@
-<table style="width:100%;height:100%" cellpadding=2
-  summary="{t}List of systems{/t}">
- <tr>
-  <td style="width:100%;">
-   <div class="contentboxh">
-    <p class="contentboxh">&nbsp;{$HEADLINE}&nbsp;{$SIZELIMIT}</p>
-   </div>
-   
-   <div class="contentboxb">
-    <div style='background:white;padding:3px;'>
-     <table summary="{t}List navigation{/t}">
-      <tr>
-       <td>{$ROOT}&nbsp;</td><td>{$BACK}&nbsp;</td><td>{$HOME}&nbsp;</td><td>{$RELOAD}&nbsp;</td><td>{$SEPARATOR}&nbsp;</td><td>{t}Base{/t} {$BASE}&nbsp;</td><td>{$SEPARATOR}&nbsp;</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}&nbsp;{$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>
+
+  {$LIST}
+</div>
+
+<div class="clear"></div>
+
+<input type="hidden" name="ignore">
 
 <hr>
 <div class="plugin-actions">
-<button type='submit' name='add_ws_finish'>{msgPool type=addButton}</button>
-<button type='submit' name='add_ws_cancel'>{msgPool type=cancelButton}</button>
+  <button type='submit' name='add_ws_finish'>{msgPool type=addButton}</button>
+  <button type='submit' name='add_ws_cancel'>{msgPool type=cancelButton}</button>
 </div>
 
 <input type="hidden" name="ignore">
index a46c30fb912742a71bf54c15952d1e4b97f5397c..4c3f8724d3d2725b8289ad609b9a5d26e1b2b5a4 100644 (file)
@@ -1,79 +1,64 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <list>
-<definition>
-<departmentbrowser>true</departmentbrowser>
-<departmentrootvisible>false</departmentrootvisible>
-<basemode>true</basemode>
-<multiselect>true</multiselect>
-<template>../plugins/personal/posix/trustSelect/trust-list.tpl</template>
-<label>Please select the desired entries</label>
-<defaultsortcolumn>1</defaultsortcolumn>
-
-<objecttype>
-<label>Server</label>
-<objectclass>goServer</objectclass>
-<category>server</category>
-<class>servgeneric</class>
-<image>plugins/systems/images/select_server.png</image>
-</objecttype>
-
-<objecttype>
-<label>Workstation</label>
-<objectclass>gotoWorkstation</objectclass>
-<category>workstation</category>
-<class>workgeneric</class>
-<image>plugins/systems/images/select_workstation.png</image>
-</objecttype>
-
-<objecttype>
-<label>Terminal</label>
-<objectclass>gotoTerminal</objectclass>
-<category>terminal</category>
-<class>termgeneric</class>
-<image>plugins/systems/images/select_terminal.png</image>
-</objecttype>
-
-</definition>
-
-<table>
- <layout>|20px;c|||</layout>
- <department>
- <value>%{filter:objectType(dn,objectClass)}</value>
- </department>
- <department>
- <value>%{filter:departmentLink(row,dn,description)}</value>
- <span>1</span>
- </department>
- <column>
- <value>%{filter:objectType(dn,objectClass)}</value>
- </column>
- <column>
- <label>Name</label>
- <sortattribute>cn</sortattribute>
- <sorttype>string</sorttype>
- <value>%{cn}</value>
- <export>true</export>
- </column>
- <column>
- <label>Description</label>
- <sortattribute>description</sortattribute>
- <sorttype>string</sorttype>
- <value>%{description}</value>
- <export>true</export>
- </column>
-</table>
-
-<actionmenu>
+  <definition>
+    <departmentBrowser>true</departmentBrowser>
+    <departmentRootVisible>false</departmentRootVisible>
+    <baseMode>true</baseMode>
+    <multiSelect>true</multiSelect>
+    <template>../plugins/personal/posix/trustSelect/trust-list.tpl</template>
+    <label>Please select the desired entries</label>
+    <defaultSortColumn>1</defaultSortColumn>
+    <objectType>
+      <label>Server</label>
+      <objectClass>goServer</objectClass>
+      <category>server</category>
+      <class>servgeneric</class>
+      <image>plugins/systems/images/select_server.png</image>
+    </objectType>
+    <objectType>
+      <label>Workstation</label>
+      <objectClass>gotoWorkstation</objectClass>
+      <category>workstation</category>
+      <class>workgeneric</class>
+      <image>plugins/systems/images/select_workstation.png</image>
+    </objectType>
+    <objectType>
+      <label>Terminal</label>
+      <objectClass>gotoTerminal</objectClass>
+      <category>terminal</category>
+      <class>termgeneric</class>
+      <image>plugins/systems/images/select_terminal.png</image>
+    </objectType>
+  </definition>
+  <table>
+    <layout>|20px;c|||</layout>
+    <department>
+      <value>%{filter:objectType(dn,objectClass)}</value>
+    </department>
+    <department>
+      <value>%{filter:departmentLink(row,dn,description)}</value>
+      <span>1</span>
+    </department>
+    <column>
+      <value>%{filter:objectType(dn,objectClass)}</value>
+    </column>
+    <column>
+      <label>Name</label>
+      <sortattribute>cn</sortattribute>
+      <sorttype>string</sorttype>
+      <value>%{cn}</value>
+      <export>true</export>
+    </column>
+    <column>
+      <label>Description</label>
+      <sortattribute>description</sortattribute>
+      <sorttype>string</sorttype>
+      <value>%{description}</value>
+      <export>true</export>
+    </column>
+  </table>
+  <actionmenu>
 </actionmenu>
-
-<actiontriggers snapshot="false" copypaste="false">
+  <actiontriggers snapshot="false" copypaste="false">
 </actiontriggers>
-
 </list>