1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
3 | |
---|
4 | <!-- |
---|
5 | main html banner |
---|
6 | --> |
---|
7 | <xsl:template name="banner"> |
---|
8 | |
---|
9 | <table width="100%"> |
---|
10 | |
---|
11 | <!-- title --> |
---|
12 | <tr class="banner"> |
---|
13 | <td class="banner"> |
---|
14 | <img src="{/root/gui/url}/images/ISIC_Harwell V4-1_header.jpeg" alt="World picture" align="top" /> |
---|
15 | </td> |
---|
16 | <td align="right" class="banner"> |
---|
17 | <img src="{/root/gui/url}/images/NCEO_logo_lrg_header.jpeg" alt="GeoNetwork opensource logo" align="top" /> |
---|
18 | </td> |
---|
19 | </tr> |
---|
20 | |
---|
21 | <!-- buttons --> |
---|
22 | <tr class="banner"> |
---|
23 | <td class="banner-menu" width="380px"> |
---|
24 | <a class="banner" href="{/root/gui/locService}/main.home"><xsl:value-of select="/root/gui/strings/home"/></a> |
---|
25 | | |
---|
26 | <!-- //FIXME <xsl:if test="string(/root/gui/results)!=''"> |
---|
27 | <xsl:choose> |
---|
28 | <xsl:when test="/root/gui/reqService='main.present'"> |
---|
29 | <font class="banner-active"><xsl:value-of select="/root/gui/strings/result"/></font> |
---|
30 | </xsl:when> |
---|
31 | <xsl:otherwise> |
---|
32 | <a class="banner" href="{/root/gui/locService}/main.present"><xsl:value-of select="/root/gui/strings/result"/></a> |
---|
33 | </xsl:otherwise> |
---|
34 | </xsl:choose> |
---|
35 | | |
---|
36 | </xsl:if> --> |
---|
37 | <xsl:if test="string(/root/gui/session/userId)!=''"> |
---|
38 | <xsl:choose> |
---|
39 | <xsl:when test="/root/gui/reqService='admin'"> |
---|
40 | <font class="banner-active"><xsl:value-of select="/root/gui/strings/admin"/></font> |
---|
41 | </xsl:when> |
---|
42 | <xsl:otherwise> |
---|
43 | <a class="banner" href="{/root/gui/locService}/admin"><xsl:value-of select="/root/gui/strings/admin"/></a> |
---|
44 | </xsl:otherwise> |
---|
45 | </xsl:choose> |
---|
46 | | |
---|
47 | </xsl:if> |
---|
48 | <xsl:choose> |
---|
49 | <xsl:when test="/root/gui/reqService='feedback'"> |
---|
50 | <font class="banner-active"><xsl:value-of select="/root/gui/strings/contactUs"/></font> |
---|
51 | </xsl:when> |
---|
52 | <xsl:otherwise> |
---|
53 | <a class="banner" href="{/root/gui/locService}/feedback"><xsl:value-of select="/root/gui/strings/contactUs"/></a> |
---|
54 | </xsl:otherwise> |
---|
55 | </xsl:choose> |
---|
56 | | |
---|
57 | <xsl:choose> |
---|
58 | <xsl:when test="/root/gui/reqService='links'"> |
---|
59 | <font class="banner-active"><xsl:value-of select="/root/gui/strings/links"/></font> |
---|
60 | </xsl:when> |
---|
61 | <xsl:otherwise> |
---|
62 | <a class="banner" href="{/root/gui/locService}/links"><xsl:value-of select="/root/gui/strings/links"/></a> |
---|
63 | </xsl:otherwise> |
---|
64 | </xsl:choose> |
---|
65 | <xsl:if test="string(/root/gui/session/userId)='' and |
---|
66 | string(/root/gui/env/userSelfRegistration/enable)='true'"> |
---|
67 | | |
---|
68 | <xsl:choose> |
---|
69 | <xsl:when test="/root/gui/reqService='user.register.get'"> |
---|
70 | <font class="banner-active"><xsl:value-of select="/root/gui/strings/register"/></font> |
---|
71 | </xsl:when> |
---|
72 | <xsl:otherwise> |
---|
73 | <a class="banner" href="{/root/gui/locService}/user.register.get"><xsl:value-of select="/root/gui/strings/register"/></a> |
---|
74 | </xsl:otherwise> |
---|
75 | </xsl:choose> |
---|
76 | </xsl:if> |
---|
77 | | |
---|
78 | <xsl:choose> |
---|
79 | <xsl:when test="/root/gui/reqService='about'"> |
---|
80 | <font class="banner-active"><xsl:value-of select="/root/gui/strings/about"/></font> |
---|
81 | </xsl:when> |
---|
82 | <xsl:otherwise> |
---|
83 | <a class="banner" href="{/root/gui/locService}/about"><xsl:value-of select="/root/gui/strings/about"/></a> |
---|
84 | </xsl:otherwise> |
---|
85 | </xsl:choose> |
---|
86 | | |
---|
87 | <!-- <xsl:choose> |
---|
88 | <xsl:when test="/root/gui/reqService='help'"> |
---|
89 | <font class="banner-active"><xsl:value-of select="/root/gui/strings/help"/></font> |
---|
90 | </xsl:when> |
---|
91 | <xsl:otherwise> |
---|
92 | <a class="banner" href="{/root/gui/locService}/help"><xsl:value-of select="/root/gui/strings/help"/></a> |
---|
93 | </xsl:otherwise> |
---|
94 | </xsl:choose> --> |
---|
95 | |
---|
96 | <!-- Help section to be displayed according to GUI language --> |
---|
97 | <xsl:choose> |
---|
98 | <xsl:when test="/root/gui/language='fr'"> |
---|
99 | <a class="banner" href="{/root/gui/url}/docs/fra/users" target="_blank"><xsl:value-of select="/root/gui/strings/help"/></a> |
---|
100 | </xsl:when> |
---|
101 | <xsl:otherwise> |
---|
102 | <a class="banner" href="{/root/gui/url}/docs/eng/users" target="_blank"><xsl:value-of select="/root/gui/strings/help"/></a> |
---|
103 | </xsl:otherwise> |
---|
104 | </xsl:choose> |
---|
105 | | |
---|
106 | </td> |
---|
107 | <td align="right" class="banner-menu" width="610px"> |
---|
108 | <xsl:if test="count(/root/gui/config/languages/*) > 1"> |
---|
109 | <!-- Redirect to current page when no error could happen |
---|
110 | (ie. when having no parameters in GET), if not redirect to the home page. --> |
---|
111 | <xsl:variable name="redirectTo"> |
---|
112 | <xsl:choose> |
---|
113 | <xsl:when test="/root/gui/reqService='metadata.show'">main.home</xsl:when> |
---|
114 | <!-- TODO : Add other exception ? --> |
---|
115 | <xsl:otherwise><xsl:value-of select="/root/gui/reqService"/></xsl:otherwise> |
---|
116 | </xsl:choose> |
---|
117 | </xsl:variable> |
---|
118 | |
---|
119 | <select class="banner-content content"> |
---|
120 | <xsl:attribute name="onchange">location.replace('../' + this.options[this.selectedIndex].value + '/<xsl:value-of select="$redirectTo"/>');</xsl:attribute> |
---|
121 | <xsl:for-each select="/root/gui/config/languages/*"> |
---|
122 | <xsl:variable name="lang" select="name(.)"/> |
---|
123 | <option value="{$lang}"> |
---|
124 | <xsl:if test="/root/gui/language=$lang"> |
---|
125 | <xsl:attribute name="selected">selected</xsl:attribute> |
---|
126 | </xsl:if> |
---|
127 | <xsl:value-of select="/root/gui/strings/*[name(.)=$lang]"/> |
---|
128 | </option> |
---|
129 | </xsl:for-each> |
---|
130 | </select> |
---|
131 | </xsl:if> |
---|
132 | </td> |
---|
133 | </tr> |
---|
134 | |
---|
135 | <!-- FIXME: should also contain links to last results and metadata --> |
---|
136 | |
---|
137 | <!-- login --> |
---|
138 | <tr class="banner"> |
---|
139 | <td class="banner-login" align="right" width="380px"> |
---|
140 | <!-- FIXME |
---|
141 | <button class="banner" onclick="goSubmit('{/root/gui/service}/es/main.present')">Last search results (11-20 of 73)</button> |
---|
142 | <a class="banner" href="{/root/gui/service}/es/main.present">Last search results (11-20 of 73)<xsl:value-of select="/root/gui/strings/results"/></a> |
---|
143 | --> |
---|
144 | </td> |
---|
145 | <xsl:choose> |
---|
146 | <xsl:when test="string(/root/gui/session/userId)!=''"> |
---|
147 | <td align="right" class="banner-login"> |
---|
148 | <form name="logout" action="{/root/gui/locService}/user.logout" method="post"> |
---|
149 | <xsl:value-of select="/root/gui/strings/user"/> |
---|
150 | <xsl:text>: </xsl:text> |
---|
151 | <xsl:value-of select="/root/gui/session/name"/> |
---|
152 | <xsl:text> </xsl:text> |
---|
153 | <xsl:value-of select="/root/gui/session/surname"/> |
---|
154 | <xsl:text> </xsl:text> |
---|
155 | <button class="banner" onclick="goSubmit('logout')"><xsl:value-of select="/root/gui/strings/logout"/></button> |
---|
156 | </form> |
---|
157 | </td> |
---|
158 | </xsl:when> |
---|
159 | <xsl:otherwise> |
---|
160 | <td align="right" class="banner-login"> |
---|
161 | <form name="login" action="{/root/gui/locService}/user.login" method="post"> |
---|
162 | <xsl:if test="string(/root/gui/env/shib/use)='true'"> |
---|
163 | <a class="banner" href="{/root/gui/env/shib/path}"> |
---|
164 | <xsl:value-of select="/root/gui/strings/shibLogin"/> |
---|
165 | </a> |
---|
166 | | |
---|
167 | </xsl:if> |
---|
168 | <input type="submit" style="display: none;" /> |
---|
169 | <xsl:value-of select="/root/gui/strings/username"/> |
---|
170 | <input class="banner" type="text" id="username" name="username" size="10" onkeypress="return entSub('login')"/> |
---|
171 | <xsl:value-of select="/root/gui/strings/password"/> |
---|
172 | <input class="banner" type="password" id="password" name="password" size="10" onkeypress="return entSub('login')"/> |
---|
173 | <button class="banner" onclick="goSubmit('login')"><xsl:value-of select="/root/gui/strings/login"/></button> |
---|
174 | </form> |
---|
175 | </td> |
---|
176 | </xsl:otherwise> |
---|
177 | </xsl:choose> |
---|
178 | </tr> |
---|
179 | </table> |
---|
180 | </xsl:template> |
---|
181 | |
---|
182 | <!-- |
---|
183 | main html banner in a popup window |
---|
184 | --> |
---|
185 | <xsl:template name="bannerPopup"> |
---|
186 | |
---|
187 | <table width="100%"> |
---|
188 | |
---|
189 | <!-- title --> |
---|
190 | <!-- TODO : Mutualize with main banner template --> |
---|
191 | <tr class="banner"> |
---|
192 | <td class="banner"> |
---|
193 | <img src="{/root/gui/url}/images/header-left.jpg" alt="GeoNetwork opensource" align="top" /> |
---|
194 | </td> |
---|
195 | <td align="right" class="banner"> |
---|
196 | <img src="{/root/gui/url}/images/header-right.gif" alt="World picture" align="top" /> |
---|
197 | </td> |
---|
198 | </tr> |
---|
199 | |
---|
200 | <!-- buttons --> |
---|
201 | <tr class="banner"> |
---|
202 | <td class="banner-menu" colspan="2"> |
---|
203 | </td> |
---|
204 | </tr> |
---|
205 | |
---|
206 | <tr class="banner"> |
---|
207 | <td class="banner-login" colspan="2"> |
---|
208 | </td> |
---|
209 | </tr> |
---|
210 | </table> |
---|
211 | </xsl:template> |
---|
212 | |
---|
213 | |
---|
214 | </xsl:stylesheet> |
---|
215 | |
---|