[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" /> |
---|
[11949] | 17 | <replace css:theme-children="#ikoba-error-message" |
---|
[10917] | 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" /> |
---|
[11949] | 24 | <replace css:theme-children="#ikoba-error-message" |
---|
[10917] | 25 | css:content-children="body" /> |
---|
| 26 | </rules> |
---|
| 27 | |
---|
| 28 | <!-- regular rules --> |
---|
[11949] | 29 | <rules css:if-content="body.ikoba-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) --> |
---|
[11949] | 38 | <copy attributes="href" css:theme="a.ikoba-brand-link" |
---|
| 39 | css:content="a.ikoba-brand-link" /> |
---|
| 40 | <replace css:theme-children="a.ikoba-brand-link" |
---|
| 41 | css:content-children="a.ikoba-brand-link" /> |
---|
[10917] | 42 | |
---|
| 43 | <!-- left top navigation --> |
---|
[11949] | 44 | <replace css:theme-children="ul.ikoba-navbar-left" |
---|
| 45 | css:content-children="ul.ikoba-navbar-left" /> |
---|
[10917] | 46 | |
---|
| 47 | <!-- right side top navigation --> |
---|
[11949] | 48 | <replace css:theme-children="ul.ikoba-navbar-right" |
---|
| 49 | css:content-children="ul.ikoba-navbar-right" /> |
---|
[10917] | 50 | |
---|
| 51 | <!-- breadcrumbs --> |
---|
[11949] | 52 | <drop css:theme="div.ikoba-breadcrumbs-box-long" |
---|
[10917] | 53 | css:if-not-content="ul.breadcrumb" /> |
---|
[11949] | 54 | <drop css:theme="div.ikoba-breadcrumbs-box-long" |
---|
[11030] | 55 | css:if-content="div.wfstatus" /> |
---|
[11949] | 56 | <drop css:theme="div.ikoba-breadcrumbs-box-short" |
---|
[11030] | 57 | css:if-not-content="ul.breadcrumb" /> |
---|
[11949] | 58 | <drop css:theme="div.ikoba-breadcrumbs-box-short" |
---|
[11030] | 59 | css:if-not-content="div.wfstatus" /> |
---|
[11949] | 60 | <replace css:theme-children="ol.ikoba-breadcrumbs" |
---|
[10977] | 61 | css:content-children="ul.breadcrumb" /> |
---|
[10917] | 62 | |
---|
[12170] | 63 | <!-- customer status --> |
---|
| 64 | <drop css:theme="div.ikoba-customer-status-box" |
---|
[11030] | 65 | css:if-not-content="div.wfstatus" /> |
---|
| 66 | <replace css:theme-children="div.wfstatus" |
---|
| 67 | css:content-children="div.wfstatus" /> |
---|
[11029] | 68 | |
---|
[10917] | 69 | <!-- sidebar --> |
---|
| 70 | |
---|
[11949] | 71 | <drop css:theme="div.ikoba-sidebar" |
---|
[10917] | 72 | css:if-not-content="div.sidebar" /> |
---|
[10969] | 73 | <replace css:theme-children="div.sidebar-nav" |
---|
[10977] | 74 | css:content-children="div.sidebar" /> |
---|
[10917] | 75 | |
---|
| 76 | <!-- content --> |
---|
| 77 | |
---|
| 78 | <!-- drop one of the both content areas, depending on sidebar --> |
---|
| 79 | |
---|
[11949] | 80 | <drop css:theme="div.ikoba-content-narrow" |
---|
[10917] | 81 | css:if-not-content="div.sidebar" /> |
---|
[11949] | 82 | <drop css:theme="div.ikoba-content-wide" |
---|
[10917] | 83 | css:if-content="div.sidebar" /> |
---|
[11949] | 84 | <replace css:theme-children="div.ikoba-content" |
---|
| 85 | css:content-children="div.ikoba-content" /> |
---|
[10917] | 86 | |
---|
| 87 | |
---|
| 88 | <!-- scripts --> |
---|
[11949] | 89 | <drop css:theme="script.ikoba-script-tooltip" |
---|
[11436] | 90 | css:if-not-content="[data-toggle='tooltip']" /> |
---|
[10917] | 91 | |
---|
[11949] | 92 | <drop css:theme="script.ikoba-script-datepicker" |
---|
[11041] | 93 | css:if-not-content="input.datepicker-le-year" /> |
---|
| 94 | |
---|
[11949] | 95 | <drop css:theme="script.ikoba-script-datatable" |
---|
| 96 | css:if-not-content="table.ikoba-data-table" /> |
---|
[11041] | 97 | |
---|
[11463] | 98 | <!-- |
---|
| 99 | |
---|
[11436] | 100 | <rules css:if-not-content="input.datepicker-le-year"> |
---|
| 101 | <drop css:theme="script.jquery-ui" |
---|
| 102 | css:if-not-content="[data-toggle='tooltip']" /> |
---|
| 103 | </rules> |
---|
| 104 | |
---|
[11463] | 105 | --> |
---|
[10917] | 106 | <!-- |
---|
| 107 | <after css:theme-children="html head" |
---|
| 108 | css:content="html head meta" /> |
---|
| 109 | --> |
---|
| 110 | <!-- |
---|
| 111 | <after css:theme-children="html head" |
---|
| 112 | css:content="html head base" /> |
---|
| 113 | --> |
---|
| 114 | |
---|
| 115 | <!-- top navigation --> |
---|
| 116 | <!-- left top navigation --> |
---|
| 117 | <!-- |
---|
[11949] | 118 | <replace css:theme-children="ul.ikoba-navbar-left" |
---|
| 119 | css:content-children="ul.ikoba-navbar-left" /> |
---|
[10917] | 120 | --> |
---|
| 121 | |
---|
| 122 | <!-- the language selector |
---|
| 123 | |
---|
[11021] | 124 | quite tricky. We insert a <li> element at beginning of |
---|
[11949] | 125 | ul.ikoba-navbar-right. This <li> has a header element |
---|
[10917] | 126 | (the 'Language' button) and the a number of <li> elements |
---|
| 127 | representing the supported languages. |
---|
| 128 | We change the input content of format |
---|
| 129 | |
---|
| 130 | <a href="foo" title="Lang">Abbrev</a> |
---|
| 131 | |
---|
| 132 | to |
---|
| 133 | |
---|
| 134 | <a href="foo">Lang</a> |
---|
| 135 | |
---|
| 136 | creating new nodes (<xsl:element>) with attributes copied over. |
---|
| 137 | --> |
---|
[11949] | 138 | <before css:theme-children="ul.ikoba-navbar-right"> |
---|
| 139 | <li class="dropdown ikoba-langselect"> |
---|
[10917] | 140 | <a href="#" class="dropdown-toggle" |
---|
[11021] | 141 | data-toggle="dropdown"> |
---|
[11040] | 142 | <img src="/static/img/earth.png" /> |
---|
[11022] | 143 | </a> |
---|
[10917] | 144 | <ul class="dropdown-menu"> |
---|
| 145 | <xsl:for-each css:select=" .language a"> |
---|
[11949] | 146 | <li class="ikoba-language"> |
---|
[10917] | 147 | <xsl:element name="a"> |
---|
| 148 | <xsl:attribute name="href"> |
---|
| 149 | <xsl:value-of select="@href" /> |
---|
| 150 | </xsl:attribute> |
---|
| 151 | <xsl:value-of select="@title" /> |
---|
| 152 | </xsl:element> |
---|
| 153 | </li> |
---|
| 154 | </xsl:for-each> |
---|
| 155 | </ul> |
---|
| 156 | </li> |
---|
[11064] | 157 | </before> |
---|
[10917] | 158 | |
---|
[11040] | 159 | <!-- Make all data tables responsive --> |
---|
[10917] | 160 | |
---|
[11949] | 161 | <replace css:content="table.ikoba-data-table"> |
---|
[11040] | 162 | <div class="table-responsive"> |
---|
[11949] | 163 | <xsl:apply-templates css:select="table.ikoba-data-table" mode="raw"/> |
---|
[11040] | 164 | </div> |
---|
| 165 | </replace> |
---|
[10917] | 166 | |
---|
[11041] | 167 | </rules> |
---|
[10917] | 168 | |
---|
| 169 | </rules> |
---|