src/main/webapp/WEB-INF/jsp/language.jsp

Sat, 30 May 2020 18:05:06 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 30 May 2020 18:05:06 +0200
changeset 83
24a3596b8f98
parent 74
91d1fc2a3a14
child 86
0a658e53177c
permissions
-rw-r--r--

adds version selection in issue editor

13
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 <%--
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3
24
8137ec335416 updates copyright header
Mike Becker <universe@uap-core.de>
parents: 15
diff changeset
4 Copyright 2018 Mike Becker. All rights reserved.
13
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6 Redistribution and use in source and binary forms, with or without
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 modification, are permitted provided that the following conditions are met:
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
8
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9 1. Redistributions of source code must retain the above copyright
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 notice, this list of conditions and the following disclaimer.
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 2. Redistributions in binary form must reproduce the above copyright
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13 notice, this list of conditions and the following disclaimer in the
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
14 documentation and/or other materials provided with the distribution.
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
15
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
20 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 --%>
39
e722861558bb fixes minor issues that were reported by default inspection
Mike Becker <universe@uap-core.de>
parents: 29
diff changeset
27 <%@page pageEncoding="UTF-8" %>
13
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28 <%@page import="de.uapcore.lightpit.Constants" %>
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
30 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
31
39
e722861558bb fixes minor issues that were reported by default inspection
Mike Becker <universe@uap-core.de>
parents: 29
diff changeset
32 <jsp:useBean id="languages" type="java.util.List<java.util.Locale>" scope="request"/>
e722861558bb fixes minor issues that were reported by default inspection
Mike Becker <universe@uap-core.de>
parents: 29
diff changeset
33 <jsp:useBean id="browserLanguage" type="java.util.Locale" scope="request"/>
13
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
34
39
e722861558bb fixes minor issues that were reported by default inspection
Mike Becker <universe@uap-core.de>
parents: 29
diff changeset
35 <c:set scope="page" var="currentLanguage" value="${sessionScope[Constants.SESSION_ATTR_LANGUAGE]}"/>
e722861558bb fixes minor issues that were reported by default inspection
Mike Becker <universe@uap-core.de>
parents: 29
diff changeset
36
e722861558bb fixes minor issues that were reported by default inspection
Mike Becker <universe@uap-core.de>
parents: 29
diff changeset
37 <form method="POST" id="lang-selector">
13
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
38 <c:forEach items="${languages}" var="l">
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
39 <label>
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
40 <input type="radio" name="language" value="${l.language}"
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
41 <c:if test="${l.language eq currentLanguage.language}">checked</c:if>/>
39
e722861558bb fixes minor issues that were reported by default inspection
Mike Becker <universe@uap-core.de>
parents: 29
diff changeset
42 ${l.displayLanguage}
e722861558bb fixes minor issues that were reported by default inspection
Mike Becker <universe@uap-core.de>
parents: 29
diff changeset
43 (${l.getDisplayLanguage(currentLanguage)}
e722861558bb fixes minor issues that were reported by default inspection
Mike Becker <universe@uap-core.de>
parents: 29
diff changeset
44 <c:if test="${not empty browserLanguage and l.language eq browserLanguage.language}"><c:set
e722861558bb fixes minor issues that were reported by default inspection
Mike Becker <universe@uap-core.de>
parents: 29
diff changeset
45 var="browserLanguagePresent" value="true"/>&nbsp;-&nbsp;<fmt:message key="browserLanguage"/></c:if>)
13
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
46 </label>
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
47 </c:forEach>
15
bb594abac796 language selector completed
Mike Becker <universe@uap-core.de>
parents: 13
diff changeset
48 <c:if test="${not browserLanguagePresent}">
72
0646c14e36fb some reformatting
Mike Becker <universe@uap-core.de>
parents: 39
diff changeset
49 <span class="blNA"><fmt:message key="browserLanguageNotAvailable"/></span>
15
bb594abac796 language selector completed
Mike Becker <universe@uap-core.de>
parents: 13
diff changeset
50 </c:if>
13
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
51 <input type="submit" value="<fmt:message key="submit" />"/>
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
52 </form>

mercurial