source: main/waeup.kofa/trunk/layout/rules.xml @ 15840

Last change on this file since 15840 was 14422, checked in by Henrik Bettermann, 8 years ago

Implement Filtered Select Box.

File size: 5.8 KB
RevLine 
[10917]1<?xml version="1.0" encoding="UTF-8"?>
2<rules
3    xmlns="http://namespaces.plone.org/diazo"
4    xmlns:css="http://namespaces.plone.org/diazo/css"
5    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6    xmlns:xi="http://www.w3.org/2001/XInclude">
7
[10936]8  <!-- Cases where we do not want themes... -->
9  <notheme if-path="/++grokui++" />  <!-- do not theme GrokUI -->
10  <notheme if-path="/_debug" /><!-- output by debugger -->
11  <notheme css:if-content="div#error-area" />
[10917]12
[11060]13  <!-- use error page if there is a <table class="layout">
[10917]14       tag in content. This tag is rendered in Zope 3 errors. -->
15  <rules css:if-content="table#layout">
16    <theme href="error-zope.html" />
17    <replace css:theme-children="#kofa-error-message"
18             css:content-children="h3" />
19  </rules>
20  <!-- use error page if there is no <div> tag in content.
21       This happens if something in the application went wrong. -->
22  <rules css:if-not-content="div">
23    <theme href="error-zope.html" />
24    <replace css:theme-children="#kofa-error-message"
25             css:content-children="body" />
26  </rules>
27
28  <!-- regular rules -->
[10925]29  <rules css:if-content="body.kofa-body">
[10917]30
31    <theme href="theme.html" />
32
33    <!-- head elements -->
34    <replace css:theme="html head title"
35             css:content="html head title" />
36
37    <!-- brand (upper left) -->
38    <copy attributes="href" css:theme="a.kofa-brand-link"
39          css:content="a.kofa-brand-link" />
40    <replace css:theme-children="a.kofa-brand-link"
41             css:content-children="a.kofa-brand-link" />
42
43    <!-- left top navigation -->
44    <replace css:theme-children="ul.kofa-navbar-left"
45             css:content-children="ul.kofa-navbar-left" />
46
47    <!-- right side top navigation -->
48    <replace css:theme-children="ul.kofa-navbar-right"
49             css:content-children="ul.kofa-navbar-right" />
50
[13513]51    <!-- maintenance mode warning -->
52    <drop css:theme="div.kofa-maintenance"
53          css:if-not-content="div.maintenance-warning" />
54    <replace css:theme-children="div.maintenance-warning"
55             css:content-children="div.maintenance-warning" />
56
[10917]57    <!-- breadcrumbs -->
[11030]58    <drop css:theme="div.kofa-breadcrumbs-box-long"
[10917]59          css:if-not-content="ul.breadcrumb" />
[11030]60    <drop css:theme="div.kofa-breadcrumbs-box-long"
61          css:if-content="div.wfstatus" />
62    <drop css:theme="div.kofa-breadcrumbs-box-short"
63          css:if-not-content="ul.breadcrumb" />
64    <drop css:theme="div.kofa-breadcrumbs-box-short"
65          css:if-not-content="div.wfstatus" />
[10977]66    <replace css:theme-children="ol.kofa-breadcrumbs"
67             css:content-children="ul.breadcrumb" />
[10917]68
[11030]69    <!-- student status -->
70    <drop css:theme="div.kofa-student-status-box"
71          css:if-not-content="div.wfstatus" />
72    <replace css:theme-children="div.wfstatus"
73             css:content-children="div.wfstatus" />
[11029]74
[10917]75    <!-- sidebar -->
76
77    <drop css:theme="div.kofa-sidebar"
78          css:if-not-content="div.sidebar" />
[10969]79    <replace css:theme-children="div.sidebar-nav"
[10977]80             css:content-children="div.sidebar" />
[10917]81
82    <!-- content -->
83
84    <!-- drop one of the both content areas, depending on sidebar -->
85
86    <drop css:theme="div.kofa-content-narrow"
87          css:if-not-content="div.sidebar" />
88    <drop css:theme="div.kofa-content-wide"
89          css:if-content="div.sidebar" />
90    <replace css:theme-children="div.kofa-content"
91             css:content-children="div.kofa-content" />
92
93
94    <!-- scripts -->
95    <drop css:theme="script.kofa-script-tooltip"
[11436]96          css:if-not-content="[data-toggle='tooltip']" />
[10917]97
[11041]98    <drop css:theme="script.kofa-script-datepicker"
99          css:if-not-content="input.datepicker-le-year" />
100
101    <drop css:theme="script.kofa-script-datatable"
[11051]102          css:if-not-content="table.kofa-data-table" />
[11041]103
[14422]104    <drop css:theme="script.kofa-filterByText"
105          css:if-not-content="input.kofa-filterbox" />
106
[11463]107<!--
108
[11436]109    <rules css:if-not-content="input.datepicker-le-year">
110        <drop css:theme="script.jquery-ui"
111              css:if-not-content="[data-toggle='tooltip']" />
112    </rules>
113
[11463]114-->
[10917]115<!--
116    <after css:theme-children="html head"
117           css:content="html head meta" />
118-->
119<!--
120    <after css:theme-children="html head"
121           css:content="html head base" />
122-->
123
124    <!-- top navigation -->
125    <!-- left top navigation -->
126<!--
127    <replace css:theme-children="ul.kofa-navbar-left"
128             css:content-children="ul.kofa-navbar-left" />
129-->
130
131    <!-- the language selector
132
[11021]133      quite tricky. We insert a <li> element at beginning of
134      ul.kofa-navbar-right. This <li> has a header element
[10917]135      (the 'Language' button) and the a number of <li> elements
136      representing the supported languages.
137      We change the input content of format
138
139         <a href="foo" title="Lang">Abbrev</a>
140
141      to
142
143         <a href="foo">Lang</a>
144
145      creating new nodes (<xsl:element>) with attributes copied over.
146    -->
[11064]147    <before css:theme-children="ul.kofa-navbar-right">
[10917]148      <li class="dropdown kofa-langselect">
149        <a href="#" class="dropdown-toggle"
[11021]150           data-toggle="dropdown">
[11040]151           <img src="/static/img/earth.png" />
[11022]152        </a>
[10917]153        <ul class="dropdown-menu">
154          <xsl:for-each css:select=" .language a">
155            <li class="kofa-language">
156              <xsl:element name="a">
157                <xsl:attribute name="href">
158                  <xsl:value-of select="@href" />
159                </xsl:attribute>
160                <xsl:value-of select="@title" />
161              </xsl:element>
162            </li>
163          </xsl:for-each>
164        </ul>
165      </li>
[11064]166    </before>
[10917]167
[11040]168    <!-- Make all data tables responsive -->
[10917]169
[11051]170    <replace css:content="table.kofa-data-table">
[11040]171      <div class="table-responsive">
[11051]172        <xsl:apply-templates css:select="table.kofa-data-table" mode="raw"/>
[11040]173      </div>
174    </replace>
[10917]175
[11041]176   </rules>
[10917]177
178</rules>
Note: See TracBrowser for help on using the repository browser.