source: src/main/resources/templates/support_ticket/support_ticket.html

Last change on this file was 5ea00d7, checked in by Malek Alavi <malekalavi7@…>, 3 days ago

Initial project upload

  • Property mode set to 100644
File size: 1.9 KB
Line 
1<!DOCTYPE html>
2<html xmlns:th="http://www.thymeleaf.org"
3 xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
4<head>
5 <meta charset="UTF-8">
6 <title>Support Tickets</title>
7 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
8</head>
9<body>
10
11<div class="container mt-5">
12 <div class="d-flex justify-content-between align-items-center mb-3">
13 <h2>Support Tickets</h2>
14 <a href="/add/support-ticket" class="btn btn-primary">Add Ticket</a>
15 </div>
16
17 <div class="mb-3">
18 <a href="/" class="btn btn-secondary">&larr; Back to Home</a>
19 </div>
20
21 <table class="table table-striped">
22 <thead class="table-dark">
23 <tr>
24 <th>ID</th>
25 <th>Subject</th>
26 <th>Description</th>
27 <th>Status</th>
28 <th>Actions</th>
29 </tr>
30 </thead>
31 <tbody>
32 <tr th:each="ticket : ${tickets}">
33 <td th:text="${ticket.ticketId}">1</td>
34 <td th:text="${ticket.subject}">Sample Subject</td>
35 <td th:text="${ticket.description}">Sample Description</td>
36 <td>
37 <span th:text="${ticket.status == 'RESOLVED' ? 'Resolved' : 'Open'}"
38 th:classappend="${ticket.status == 'RESOLVED' ? 'text-success' : 'text-warning'}"></span>
39 </td>
40 <td>
41 <!-- Resolve button visible only for ADMIN users -->
42 <form th:if="${ticket.status == 'UNRESOLVED'}" th:action="@{'/resolve/support-ticket/' + ${ticket.ticketId}}" method="post" class="d-inline"
43 sec:authorize="hasRole('ADMIN')">
44 <button type="submit" class="btn btn-sm btn-success">Resolve</button>
45 </form>
46 </td>
47 </tr>
48 </tbody>
49 </table>
50</div>
51
52<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
53</body>
54</html>
Note: See TracBrowser for help on using the repository browser.