[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 | |
---|
| 51 | <!-- breadcrumbs --> |
---|
[11030] | 52 | <drop css:theme="div.kofa-breadcrumbs-box-long" |
---|
[10917] | 53 | css:if-not-content="ul.breadcrumb" /> |
---|
[11030] | 54 | <drop css:theme="div.kofa-breadcrumbs-box-long" |
---|
| 55 | css:if-content="div.wfstatus" /> |
---|
| 56 | <drop css:theme="div.kofa-breadcrumbs-box-short" |
---|
| 57 | css:if-not-content="ul.breadcrumb" /> |
---|
| 58 | <drop css:theme="div.kofa-breadcrumbs-box-short" |
---|
| 59 | css:if-not-content="div.wfstatus" /> |
---|
[10977] | 60 | <replace css:theme-children="ol.kofa-breadcrumbs" |
---|
| 61 | css:content-children="ul.breadcrumb" /> |
---|
[10917] | 62 | |
---|
[11030] | 63 | <!-- student status --> |
---|
| 64 | <drop css:theme="div.kofa-student-status-box" |
---|
| 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 | |
---|
| 71 | <drop css:theme="div.kofa-sidebar" |
---|
| 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 | |
---|
| 80 | <drop css:theme="div.kofa-content-narrow" |
---|
| 81 | css:if-not-content="div.sidebar" /> |
---|
| 82 | <drop css:theme="div.kofa-content-wide" |
---|
| 83 | css:if-content="div.sidebar" /> |
---|
| 84 | <replace css:theme-children="div.kofa-content" |
---|
| 85 | css:content-children="div.kofa-content" /> |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | <!-- scripts --> |
---|
| 89 | <drop css:theme="script.kofa-script-tooltip" |
---|
[11436] | 90 | css:if-not-content="[data-toggle='tooltip']" /> |
---|
[10917] | 91 | |
---|
[11041] | 92 | <drop css:theme="script.kofa-script-datepicker" |
---|
| 93 | css:if-not-content="input.datepicker-le-year" /> |
---|
| 94 | |
---|
| 95 | <drop css:theme="script.kofa-script-datatable" |
---|
[11051] | 96 | css:if-not-content="table.kofa-data-table" /> |
---|
[11041] | 97 | |
---|
[11436] | 98 | <rules css:if-not-content="input.datepicker-le-year"> |
---|
| 99 | <drop css:theme="script.jquery-ui" |
---|
| 100 | css:if-not-content="[data-toggle='tooltip']" /> |
---|
| 101 | </rules> |
---|
| 102 | |
---|
| 103 | |
---|
[10917] | 104 | <!-- |
---|
| 105 | <after css:theme-children="html head" |
---|
| 106 | css:content="html head meta" /> |
---|
| 107 | --> |
---|
| 108 | <!-- |
---|
| 109 | <after css:theme-children="html head" |
---|
| 110 | css:content="html head base" /> |
---|
| 111 | --> |
---|
| 112 | |
---|
| 113 | <!-- top navigation --> |
---|
| 114 | <!-- left top navigation --> |
---|
| 115 | <!-- |
---|
| 116 | <replace css:theme-children="ul.kofa-navbar-left" |
---|
| 117 | css:content-children="ul.kofa-navbar-left" /> |
---|
| 118 | --> |
---|
| 119 | |
---|
| 120 | <!-- the language selector |
---|
| 121 | |
---|
[11021] | 122 | quite tricky. We insert a <li> element at beginning of |
---|
| 123 | ul.kofa-navbar-right. This <li> has a header element |
---|
[10917] | 124 | (the 'Language' button) and the a number of <li> elements |
---|
| 125 | representing the supported languages. |
---|
| 126 | We change the input content of format |
---|
| 127 | |
---|
| 128 | <a href="foo" title="Lang">Abbrev</a> |
---|
| 129 | |
---|
| 130 | to |
---|
| 131 | |
---|
| 132 | <a href="foo">Lang</a> |
---|
| 133 | |
---|
| 134 | creating new nodes (<xsl:element>) with attributes copied over. |
---|
| 135 | --> |
---|
[11064] | 136 | <before css:theme-children="ul.kofa-navbar-right"> |
---|
[10917] | 137 | <li class="dropdown kofa-langselect"> |
---|
| 138 | <a href="#" class="dropdown-toggle" |
---|
[11021] | 139 | data-toggle="dropdown"> |
---|
[11040] | 140 | <img src="/static/img/earth.png" /> |
---|
[11022] | 141 | </a> |
---|
[10917] | 142 | <ul class="dropdown-menu"> |
---|
| 143 | <xsl:for-each css:select=" .language a"> |
---|
| 144 | <li class="kofa-language"> |
---|
| 145 | <xsl:element name="a"> |
---|
| 146 | <xsl:attribute name="href"> |
---|
| 147 | <xsl:value-of select="@href" /> |
---|
| 148 | </xsl:attribute> |
---|
| 149 | <xsl:value-of select="@title" /> |
---|
| 150 | </xsl:element> |
---|
| 151 | </li> |
---|
| 152 | </xsl:for-each> |
---|
| 153 | </ul> |
---|
| 154 | </li> |
---|
[11064] | 155 | </before> |
---|
[10917] | 156 | |
---|
[11040] | 157 | <!-- Make all data tables responsive --> |
---|
[10917] | 158 | |
---|
[11051] | 159 | <replace css:content="table.kofa-data-table"> |
---|
[11040] | 160 | <div class="table-responsive"> |
---|
[11051] | 161 | <xsl:apply-templates css:select="table.kofa-data-table" mode="raw"/> |
---|
[11040] | 162 | </div> |
---|
| 163 | </replace> |
---|
[10917] | 164 | |
---|
[11041] | 165 | </rules> |
---|
[10917] | 166 | |
---|
| 167 | </rules> |
---|