Skip to content

Commit a3dbd7d

Browse files
Merge remote-tracking branch 'origin/master' into publisher-info
# Conflicts: # src/main/resources/messages_de.properties
2 parents 2fb3cdd + 4e64bae commit a3dbd7d

File tree

12 files changed

+54
-34
lines changed

12 files changed

+54
-34
lines changed

docs/testbericht/chapters/04_bugs.tex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,9 @@ \section{Footer überdeckt Sidebar auf kleineren Bildschirmen}
107107
\reason{Der Footer wurde fix positioniert, was zur Folge hatte, dass seine Höhe nicht berücksichtigt wurde.}
108108
\solution{Die Sidebar wurde mittels Flexbox so angepasst, dass der Footer keine besondere Positionierung benötigt.}
109109

110+
\section{Fehlerdialoge sind nicht zentriert}
111+
\symptom{Fehlerdialoge sind nicht zentriert.}
112+
\reason{Die Positionierung der Fehlerdialoge wurde nicht korrekt festgelegt.}
113+
\solution{Die Positionierung der Fehlerdialoge wurde korrekt festgelegt.}
114+
110115
\todo{Jeden gefundenen Bug dokumentieren}

src/main/java/edu/kit/hci/soli/config/template/JteContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public JteContext(MessageSource messageSource, String hostname, Locale locale, T
2727
this.hostname = hostname;
2828
this.locale = locale;
2929
this.symbols = new DateFormatSymbols(locale == null ? Locale.getDefault() : locale);
30-
this.dateTimeFormatter = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM)
30+
this.dateTimeFormatter = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.SHORT)
3131
.withLocale(locale)
3232
.withZone(timeZone.toZoneId());
33-
this.timeFormatter = DateTimeFormatter.ofLocalizedTime(FormatStyle.MEDIUM)
33+
this.timeFormatter = DateTimeFormatter.ofLocalizedTime(FormatStyle.SHORT)
3434
.withLocale(locale)
3535
.withZone(timeZone.toZoneId());
3636
this.timeZone = timeZone;

src/main/java/edu/kit/hci/soli/filter/DisabledUsersFilter.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,18 @@ protected void doFilterInternal(HttpServletRequest request, @NotNull HttpServlet
3232
return;
3333
}
3434

35+
// Make sure we are not running into a recursion
3536
if (request.getRequestURI().equals("/disabled")) {
3637
filterChain.doFilter(request, response);
3738
return;
3839
}
3940

41+
// Add an exception for style related stuff
42+
if (request.getRequestURI().equals("/favicon.svg") || request.getRequestURI().equals("/soli.css")) {
43+
filterChain.doFilter(request, response);
44+
return;
45+
}
46+
4047
// The principal is preserved throughout the session, but we always need to check latest user status
4148
User user = userService.findByUserId(request.getUserPrincipal().getName());
4249

src/main/jte/bookings/create/conflict.jte

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717
<div class="max-w-md">
1818
<h1 class="text-2xl font-bold mb-2">${context.localize("bookings.conflict.resolution")}</h1>
1919

20-
<ul class="list bg-base-100 rounded-box shadow-md text-left">
21-
<li class="mb-4">${context.localize("bookings.conflict.recommend")}</li>
20+
<ul class="list bg-base-100 rounded-box shadow-md text-left p-8 mb-3">
21+
<li>${context.localize("bookings.conflict.recommend")}</li>
2222

2323
@if (!bookingResult.contact().isEmpty())
24-
<h2>${context.localize("bookings.conflict.contact")}</h2>
24+
<h2 class="mt-4">${context.localize("bookings.conflict.contact")}</h2>
25+
<p class="text-gray-500 text-sm">${context.localize("bookings.conflict.contact.message")}</p>
2526
@for (Booking booking : bookingResult.contact())
2627
<li class="list-row">
2728
<div class="text-xs uppercase font-semibold opacity-60 list-col-grow">
@@ -38,7 +39,7 @@
3839
@endif
3940

4041
@if (!bookingResult.override().isEmpty())
41-
<h2>${context.localize("bookings.conflict.delete")}</h2>
42+
<h2 class="mt-4">${context.localize("bookings.conflict.delete")}</h2>
4243
<p class="text-gray-500 text-sm">${context.localize("bookings.conflict.delete.message")}</p>
4344
@for (Booking booking : bookingResult.override())
4445
<li class="list-row">
@@ -56,7 +57,7 @@
5657
@endif
5758

5859
@if (!bookingResult.cooperate().isEmpty())
59-
<h2>${context.localize("bookings.conflict.cooperate")}</h2>
60+
<h2 class="mt-4">${context.localize("bookings.conflict.cooperate")}</h2>
6061
<p class="text-gray-500 text-sm">${context.localize("bookings.conflict.cooperate.message")}</p>
6162
@for (Booking booking : bookingResult.cooperate())
6263
<li class="list-row">
@@ -73,9 +74,13 @@
7374
@endfor
7475
@endif
7576
</ul>
76-
@template.util.form(csrf = csrf, action = "/" + attemptedBooking.getRoom().getId() + "/bookings/new/conflict", method = POST, content = @`
77-
<button class="btn btn-primary" type="submit" title="${context.localize("bookings.conflict.solve.tooltip")}">${context.localize("bookings.conflict.solve")}</button>
78-
`)
77+
78+
<div class="modal-action">
79+
<a class="btn" href="/${attemptedBooking.getRoom().getId()}">${context.localize("generic.cancel")}</a>
80+
@template.util.form(csrf = csrf, action = "/" + attemptedBooking.getRoom().getId() + "/bookings/new/conflict", method = POST, content = @`
81+
<button class="btn btn-primary" type="submit" title="${context.localize("bookings.conflict.solve.tooltip")}">${context.localize("bookings.conflict.solve")}</button>
82+
`)
83+
</div>
7984
</div>
8085
</div>
8186
`)

src/main/jte/bookings/list.jte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<td>${booking.getId()} ${booking.getOpenRequests().isEmpty() ? context.empty() : context.localize("bookings.outstanding", booking.getOpenRequests().size())}</td>
3939
<td>${booking.getDescription()}</td>
4040
<td>${context.format(booking.getStartDate())}</td>
41-
<td>${context.format(booking.getEndDate())}</td>
41+
<td>${context.format(booking.getEndDate().toLocalTime())}</td>
4242
<td>${context.localize("bookings.share." + booking.getShareRoomType())}</td>
4343
<td>${context.localize("bookings.priority." + booking.getPriority())}</td>
4444
<td>

src/main/jte/bookings/single.jte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
@if (!booking.getOpenRequests().isEmpty())
3636
<p>${context.localize("bookings.outstanding", booking.getOpenRequests().size())}</p>
3737
@endif
38-
<p>${context.localize("bookings.start.value", context.format(booking.getStartDate()))}</p>
39-
<p>${context.localize("bookings.end.value", context.format(booking.getEndDate()))}</p>
38+
<p>${context.format(booking.getStartDate())} - ${context.format(booking.getEndDate().toLocalTime())}</p>
4039

4140
@if (!booking.getDescription().isBlank())
4241
<label class="label">${context.localize("bookings.description")}</label>
@@ -56,6 +55,8 @@
5655
<i class="fa-solid fa-pen"></i>
5756
</label>
5857
<input type="checkbox" id="soli-edit-toggle" class="hidden" />
58+
@else
59+
<label class="label">${context.localize("bookings.description.none")}</label>
5960
@endif
6061
@if (allowEditing)
6162
@template.util.form(csrf = csrf, cssClass = "soli-edit-content relative w-full", action = "/" + booking.getRoom().getId() + "/bookings/" + booking.getId(), method = PATCH, content = @`

src/main/jte/error/disabled_user.jte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
@param Date timestamp
1111

1212
@template.layout(page = context.page("error"), context = context, layout = layout, content = @`
13-
<div class="hero-content text-center">
13+
<div class="hero-content text-center mx-auto">
1414
<div class="max-w-md">
1515
<h1 class="text-5xl font-bold">${context.localize("user.deactivated.title")}</h1>
1616
<p class="py-6">${context.localize("user.deactivated.message")}</p>

src/main/jte/error/known.jte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@param KnownError error
99

1010
@template.layout(page = context.page(error.title), context = context, layout = layout, content = @`
11-
<div class="hero-content text-center">
11+
<div class="hero-content text-center mx-auto">
1212
<div class="max-w-md">
1313
<h1 class="text-5xl font-bold">${context.localize(error.title)}</h1>
1414
<p class="py-6">${context.localize(error.message)}</p>

src/main/jte/error/unknown.jte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@param String error = null
99

1010
@template.layout(page = context.page("error"), context = context, layout = layout, content = @`
11-
<div class="hero-content text-center">
11+
<div class="hero-content text-center mx-auto">
1212
<div class="max-w-md">
1313
<h1 class="text-5xl font-bold">${context.localize("error.unknown.title")}</h1>
1414
<p class="py-6">${context.localize("error.unknown.message")}</p>

src/main/jte/layout.jte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,7 @@
146146

147147
@if(layout.getRoom() != null)
148148
<div class="divider"></div>
149-
<li class="pointer-events-none">
150-
<label>${context.localize("layout.current_room", layout.getRoom().getName())}</label>
151-
</li>
149+
<li><a href="/"><i class="fa-solid fa-folder-tree"></i> ${context.localize("layout.current_room", layout.getRoom().getName())}</a></li>
152150
@endif
153151

154152
@if(layout.getLogin().kind() == LoginStateModel.Kind.ADMIN)

0 commit comments

Comments
 (0)