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

Sat, 09 Nov 2024 11:47:20 +0100

author
Mike Becker <universe@uap-core.de>
date
Sat, 09 Nov 2024 11:47:20 +0100
changeset 335
1eed60b779da
parent 222
src/main/webapp/WEB-INF/jsp/language.jsp@390127090ad2
permissions
-rw-r--r--

change language menu to settings menu and add timezone settings - fixes #402

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
180
009700915269 merge resource bundles
Mike Becker <universe@uap-core.de>
parents: 86
diff changeset
4 Copyright 2021 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 <%@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
29 <%@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
30
335
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
31 <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.SettingsView" scope="request"/>
39
e722861558bb fixes minor issues that were reported by default inspection
Mike Becker <universe@uap-core.de>
parents: 29
diff changeset
32
335
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
33 <form method="POST" id="settings-form">
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
34 <h2><fmt:message key="settings.language"/></h2>
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
35 <div class="flex-column">
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
36 <c:forEach items="${viewmodel.languages}" var="l">
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
37 <label>
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
38 <input type="radio" name="language" value="${l.language}"
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
39 <c:if test="${l.language eq viewmodel.currentLanguage.language}">checked</c:if>/>
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
40 ${l.displayLanguage}
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
41 (${l.getDisplayLanguage(viewmodel.currentLanguage)}
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
42 <c:if test="${not empty viewmodel.browserLanguage and l.language eq viewmodel.browserLanguage.language}"><c:set
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
43 var="browserLanguagePresent" value="true"/>&nbsp;-&nbsp;<fmt:message key="language.browser"/></c:if>)
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
44 </label>
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
45 </c:forEach>
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
46 <c:if test="${not browserLanguagePresent}">
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
47 <span class="blNA"><fmt:message key="language.browser.unavailable"/></span>
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
48 </c:if>
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
49 </div>
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
50 <h2><fmt:message key="settings.timezone"/></h2>
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
51 <div>
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
52 <select name="timezone">
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
53 <c:forEach items="${viewmodel.timezones}" var="tz">
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
54 <option value="${tz}" <c:if test="${tz eq viewmodel.currentTimezone}">selected</c:if> >${tz}</option>
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
55 </c:forEach>
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
56 </select>
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
57 </div>
1eed60b779da change language menu to settings menu and add timezone settings - fixes #402
Mike Becker <universe@uap-core.de>
parents: 222
diff changeset
58 <button type="submit"><fmt:message key="button.apply" /></button>
13
f4608ad6c947 adds dynamic fragments to LightPIT request handling framework + basic language recognition code
Mike Becker <universe@uap-core.de>
parents:
diff changeset
59 </form>

mercurial