Code

Added filter and listing templates for the new baseSelectDialog
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 18 Jan 2010 11:05:18 +0000 (11:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 18 Jan 2010 11:05:18 +0000 (11:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15169 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/ihtml/themes/default/baseSelect-filter.tpl [new file with mode: 0644]
gosa-core/ihtml/themes/default/baseSelect-filter.xml [new file with mode: 0644]
gosa-core/ihtml/themes/default/baseSelect-list.tpl [new file with mode: 0644]
gosa-core/ihtml/themes/default/baseSelect-list.xml [new file with mode: 0644]

diff --git a/gosa-core/ihtml/themes/default/baseSelect-filter.tpl b/gosa-core/ihtml/themes/default/baseSelect-filter.tpl
new file mode 100644 (file)
index 0000000..3d4595c
--- /dev/null
@@ -0,0 +1,29 @@
+<div class="contentboxh">
+ <p class="contentboxh">
+  <img src="images/launch.png" align="right" alt="[F]">{t}Filter{/t}
+ </p>
+</div>
+
+<div class="contentboxb">
+
+ <table summary="" style="width:100%;border-top:1px solid #B0B0B0;">
+  <tr>
+   <td>
+    <label for="NAME">
+     <img src="images/lists/search.png" align=middle>&nbsp;Name
+    </label>
+   </td>
+   <td>
+    {$NAME}
+   </td>
+  </tr>
+ </table>
+
+ <table summary=""  width="100%"  style="background:#EEEEEE;border-top:1px solid #B0B0B0;">
+  <tr>
+   <td width="100%" align="right">
+    {$APPLY}
+   </td>
+  </tr>
+ </table>
+</div>
diff --git a/gosa-core/ihtml/themes/default/baseSelect-filter.xml b/gosa-core/ihtml/themes/default/baseSelect-filter.xml
new file mode 100644 (file)
index 0000000..2411c81
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<filterdef>
+  <definition>
+    <category>departments</category>
+    <template>dep-filter.tpl</template>
+    <initial>true</initial>
+  </definition>
+
+  <search>
+    <query>
+      <backend>LDAP</backend>
+      <filter>(&amp;(objectClass=gosaDepartment)$NAME)</filter>
+      <attribute>dn</attribute>
+      <attribute>objectClass</attribute>
+      <attribute>ou</attribute>
+      <attribute>description</attribute>
+    </query>
+    <scope>one</scope>
+  </search>
+
+  <element>
+    <type>textfield</type>
+    <tag>NAME</tag>
+    <size>18</size>
+    <maxlength>60</maxlength>
+    <default></default>
+    <unset></unset>
+    <set>(|(ou=*$*)(dc=*$*)(c=*$*)(l=*$*))</set>
+    <alphabet>false</alphabet>
+    <autocomplete>
+      <backend>LDAP</backend>
+      <filter>(&amp;(objectClass=gosaDepartment)(|(ou=*$NAME*)(dc=*$NAME*)(l=*$NAME*)(c=*$NAME*)))</filter>
+      <attribute>cn</attribute>
+      <frequency>0.5</frequency>
+      <characters>3</characters>
+    </autocomplete>
+  </element>
+
+</filterdef>
diff --git a/gosa-core/ihtml/themes/default/baseSelect-list.tpl b/gosa-core/ihtml/themes/default/baseSelect-list.tpl
new file mode 100644 (file)
index 0000000..dfa5b83
--- /dev/null
@@ -0,0 +1,30 @@
+<input type='image' src='images/empty.png' name='no_action_posted' value='do_nothing' alt='' style='width:2px;height:2px;'>
+
+<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=2>
+  <tr>
+    <td style="vertical-align:top; width:50%;">
+      <div class="contentboxh">
+        <p class="contentboxh">&nbsp;{$HEADLINE}&nbsp;{$SIZELIMIT}</p>
+      </div>
+      
+      <div class="contentboxb">
+       <div style='background:white;padding:0px;padding:3px;'>
+        <table><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;<input class='center' type='image' src='images/lists/submit.png' align='middle' title='{t}Update{/t}' name='submit_department' alt='{t}Submit{/t}'>&nbsp;</td><td>{$SEPARATOR}&nbsp;</td><td><img src='images/rocket.png' alt='' class='center'></td><td> {$ACTIONS}</td>
+        </tr></table>
+       </div>
+      </div>
+      
+      <div style='height:4px;'>
+      </div>
+      
+      <input type="hidden" id="d_save" value="450">
+      {$LIST}
+    </td>
+    <td style='vertical-align:top'>
+      {$FILTER}
+    </td>
+  </tr>
+</table>
+
+<input type="hidden" name="ignore">
diff --git a/gosa-core/ihtml/themes/default/baseSelect-list.xml b/gosa-core/ihtml/themes/default/baseSelect-list.xml
new file mode 100644 (file)
index 0000000..d515ee7
--- /dev/null
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<list>
+  <definition>
+    <departmentBrowser>false</departmentBrowser>
+    <departmentRootVisible>false</departmentRootVisible>
+    <baseMode>true</baseMode>
+    <multiSelect>true</multiSelect>
+    <template>dep-list.tpl</template>
+    <module>departments</module>
+    <label>List of departments</label>
+    <defaultSortColumn>1</defaultSortColumn>
+
+    <objectType>
+      <label>Domain</label>
+      <objectClass>domain</objectClass>
+      <category>department</category>
+      <class>domain</class>
+      <image>plugins/departments/images/domain.png</image>
+    </objectType>
+
+    <objectType>
+      <label>Domain component</label>
+      <objectClass>dcObject</objectClass>
+      <category>department</category>
+      <class>dcObject</class>
+      <image>plugins/departments/images/dc.png</image>
+    </objectType>
+
+    <objectType>
+      <label>Country</label>
+      <objectClass>country</objectClass>
+      <category>department</category>
+      <class>country</class>
+      <image>plugins/departments/images/country.png</image>
+    </objectType>
+
+    <objectType>
+      <label>Locality</label>
+      <objectClass>locality</objectClass>
+      <category>department</category>
+      <class>locality</class>
+      <image>plugins/departments/images/locality.png</image>
+    </objectType>
+
+    <objectType>
+      <label>Organization</label>
+      <objectClass>department</objectClass>
+      <category>department</category>
+      <class>organization</class>
+      <image>plugins/departments/images/organization.png</image>
+    </objectType>
+
+    <objectType>
+      <label>Department</label>
+      <objectClass>organizationalUnit</objectClass>
+      <category>department</category>
+      <class>department</class>
+      <image>images/lists/folder.png</image>
+    </objectType>
+  </definition>
+
+  <table>
+    <layout>|20px|||70px;r|</layout>
+
+    <column>
+      <value>%{filter:objectType(dn,objectClass)}</value>
+    </column>
+
+    <column>
+      <label>Department</label>
+      <sortAttribute>ou</sortAttribute>
+      <sortType>string</sortType>
+      <value>%{filter:depLabel(row,dn,"%s",ou,pid,base)}</value>
+      <export>true</export>
+    </column>
+
+    <column>
+      <label>Description</label>
+      <sortAttribute>description</sortAttribute>
+      <sortType>string</sortType>
+      <value>%{filter:depLabel(row,dn,"%s",description,pid,base)}</value>
+      <export>true</export>
+    </column>
+
+    <column>
+      <label>Actions</label>
+      <value>%{filter:actions(dn,row,objectClass)}</value>
+    </column>
+
+  </table>
+
+  <actionmenu>
+
+    <action>
+     <type>sub</type>
+     <image>images/lists/new.png</image>
+     <label>Create</label>
+
+     <action>
+      <name>new_domain</name>
+      <type>entry</type>
+      <label>Domain</label>
+      <image>plugins/departments/images/domain.png</image>
+     </action>
+    
+     <action>
+      <name>new_dcObject</name>
+      <type>entry</type>
+      <label>Domain component</label>
+      <image>plugins/departments/images/dc.png</image>
+     </action>
+
+     <action>
+      <name>new_country</name>
+      <type>entry</type>
+      <label>Country</label>
+      <image>plugins/departments/images/country.png</image>
+     </action>
+
+     <action>
+      <name>new_locality</name>
+      <type>entry</type>
+      <label>Locality</label>
+      <image>plugins/departments/images/locality.png</image>
+     </action>
+
+     <action>
+      <name>new_organization</name>
+      <type>entry</type>
+      <label>Organization</label>
+      <image>plugins/departments/images/organization.png</image>
+     </action>
+
+     <action>
+      <name>new_organizationalUnit</name>
+      <type>entry</type>
+      <label>Department</label>
+      <image>images/lists/folder.png</image>
+     </action>
+
+    </action>
+
+    <action>
+      <type>separator</type>
+    </action>
+
+    <action>
+      <type>exporter</type>
+    </action>
+
+    <action>
+      <type>separator</type>
+    </action>
+
+    <action>
+      <name>remove</name>
+      <type>entry</type>
+      <image>images/lists/trash.png</image>
+      <label>Remove</label>
+    </action>
+
+  </actionmenu>
+
+  <actiontriggers snapshot="false" copypaste="false">
+
+    <action>
+      <name>edit</name>
+      <type>entry</type>
+      <nospan></nospan>
+      <image>images/lists/edit.png</image>
+      <label>Edit</label>
+    </action>
+
+    <action>
+      <name>remove</name>
+      <type>entry</type>
+      <nospan></nospan>
+      <image>images/lists/trash.png</image>
+      <acl>department[d]</acl>
+      <label>Remove</label>
+    </action>
+
+  </actiontriggers>
+
+</list>