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