Skip to content
Snippets Groups Projects
Commit e85cf741 authored by Cédric Willekens's avatar Cédric Willekens
Browse files

Fix styling of feedback page

parent 53f09a95
No related branches found
No related tags found
2 merge requests!774Deploy,!770Allow feedback to be flagged
...@@ -291,10 +291,10 @@ public class HomeController { ...@@ -291,10 +291,10 @@ public class HomeController {
return "home/feedback"; return "home/feedback";
} }
@GetMapping("/feedback/{id}/report") @GetMapping("/feedback/report")
@PreAuthorize("@permissionService.canViewFeedback(#id)") @PreAuthorize("@permissionService.canViewFeedback(#id)")
public String reportFeedback(@RequestParam Long request, @RequestParam Long assistant, public String reportFeedback(@RequestParam Long request, @RequestParam Long assistant,
@RequestParam String callback, @PathVariable String id) { @RequestParam String callback) {
System.out.printf("Report for request %s for assistant %s", request, System.out.printf("Report for request %s for assistant %s", request,
assistant); assistant);
fs.reportFeedback(new Feedback.Id(request, assistant)); fs.reportFeedback(new Feedback.Id(request, assistant));
......
...@@ -118,14 +118,21 @@ ...@@ -118,14 +118,21 @@
th:if="${fb.feedback != null && !fb.feedback.isEmpty()}"> th:if="${fb.feedback != null && !fb.feedback.isEmpty()}">
<div class="flex space-between"> <div class="flex space-between">
<div class="tooltip"> <div class="flex" >
<i class="fa-solid fa-circle-exclamation tooltip__control"></i> <div th:if="${fb.isReported() && @permissionService.canViewDeanonimisedFeedback()}" class="tooltip"
style="justify-content:
space-evenly; margin: auto">
<i class="tooltip__control"
style="min-height: 1.1rem">!</i>
<p role="tooltip" style="width: 30rem; white-space: initial"> <p role="tooltip" style="width: 30rem; white-space: initial">
This feedback item has been reported and This feedback item has been reported and
will not be shown anymore to the TA. will not be shown anymore to the TA.
</p> </p>
</div> </div>
<p th:text="${fb.feedback}"></p> <p th:text="${fb.feedback}"
style="justify-content: space-around; margin:
auto; vertical-align: middle"></p>
</div>
<div class="menu-wrapper"> <div class="menu-wrapper">
<button aria-haspopup="menu" <button aria-haspopup="menu"
class="fa-solid fa-ellipsis-vertical button" class="fa-solid fa-ellipsis-vertical button"
...@@ -134,7 +141,7 @@ ...@@ -134,7 +141,7 @@
<ul class="menu" th:id="|feedback-${fb.id}|" role="menu"> <ul class="menu" th:id="|feedback-${fb.id}|" role="menu">
<li> <li>
<form method="get" <form method="get"
th:action="@{/feedback/{id}/report(id=${fb.id})}"> th:action="@{/feedback/report}">
<input hidden <input hidden
th:value="${fb.id.requestId}" th:value="${fb.id.requestId}"
name="request"> name="request">
...@@ -147,10 +154,6 @@ ...@@ -147,10 +154,6 @@
<button role="menuitem">Report <button role="menuitem">Report
as inappropriate</button> as inappropriate</button>
</form> </form>
<!-- <a role="menuitem"-->
<!-- th:href="|/feedback/report?request=${fb.id.requestId}&assistant=${fb.id.assistantId}&callback=/${#httpServletRequest.requestURI}|"-->
<!-- >Report as-->
<!-- inappropriate</a>-->
</li> </li>
</ul> </ul>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment