source: src/main/resources/templates/reportPost.html@ ab49338

Last change on this file since ab49338 was ab49338, checked in by KostaFortumanov <kfortumanov@…>, 3 years ago

Dodadeno prijavuvanje na objavi

  • Property mode set to 100644
File size: 6.5 KB
Line 
1<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml" xmlns:sec="http://www.w3.org/1999/xhtml">
2<head>
3 <meta charset="UTF-8"/>
4 <meta name="viewport" content="width=device-width, initial-scale=1"/>
5 <title>Register</title>
6 <!-- Bootstrap core CSS -->
7 <link href="/css/bootstrap.min.css" rel="stylesheet"/>
8 <link href="/css/carousel.css" rel="stylesheet"/>
9 <meta name="theme-color" content="#7952b3"/>
10</head>
11<body>
12<header th:replace="common/navbar :: navbar"></header>
13<br/>
14<br/>
15<br/>
16<div th:if="${notFound}">
17 Post not found
18</div>
19<div th:unless="${notFound}">
20 <div class="row">
21 <div class="col-md-6" style="margin-left: 5px">
22 <div class="col-md-12">
23
24 <div id="myCarousel" class="carousel carousel-dark slide card" data-bs-ride="carousel">
25 <div class="carousel-indicators">
26 <button th:each="image, itrStat : ${post.donationPost.moderatorPath}" type="button"
27 data-bs-target="#myCarousel"
28 th:data-bs-slide-to="${itrStat.index}"
29 th:classappend="${itrStat.index} == 0 ? active"></button>
30 </div>
31 <div class="carousel-inner">
32 <div th:each="image, itrStat : ${post.donationPost.moderatorPath}"
33 th:classappend="${itrStat.index} == 0 ? active"
34 class="carousel-item">
35 <img class="card-img" th:src="${image}" style="object-fit: contain">
36 </div>
37 </div>
38 <button class="carousel-control-prev" type="button" data-bs-target="#myCarousel"
39 data-bs-slide="prev">
40 <span class="carousel-control-prev-icon" aria-hidden="true"></span>
41 <span class="visually-hidden">Previous</span>
42 </button>
43 <button class="carousel-control-next" type="button" data-bs-target="#myCarousel"
44 data-bs-slide="next">
45 <span class="carousel-control-next-icon" aria-hidden="true"></span>
46 <span class="visually-hidden">Next</span>
47 </button>
48 </div>
49 </div>
50 </div>
51 <div class="col-md-5" style="margin-left: 5px">
52 <div class="col-md-12">
53 <h1 th:text="${post.donationPost.title}"></h1>
54 <h5>Description:</h5>
55 <p th:text="${post.donationPost.description}"></p>
56 <h5>Funds needed:</h5>
57 <p><span th:text="${total}"></span>/<span th:text="${post.donationPost.fundsNeeded}"></span> - <span
58 th:text="${post.donationPost.currency}"></span></p>
59 <h5>Date due:</h5>
60 <p th:text="${post.donationPost.dateDue}"></p>
61 <h5>Bank account:</h5>
62 <p th:text="${post.donationPost.bankAccount}"></p>
63 <h5>Phone numbers:</h5>
64 <p><span th:text="${post.donationPost.phoneNumbers[0]}"></span> - Telekom</p>
65 <p><span th:text="${post.donationPost.phoneNumbers[1]}"></span> - A1</p>
66 <h5>Created by:</h5>
67 <p><span th:text="${createdByFirstName}"></span> <span th:text="${createdByLastName}"></span></p>
68 <h5>Approved by:</h5>
69 <p th:unless="${moderatorFirstName}">Not approved</p>
70 <p><span th:text="${moderatorFirstName}"></span> <span th:text="${moderatorLastName}"></span></p>
71
72 <div th:if="${report}">
73 <a class="btn btn-success" th:href="@{/moderator/dismiss(postid=${post.id})}">Dismiss</a>
74 <button type="button" class="btn btn-danger" data-bs-toggle="modal"
75 data-bs-target="#staticBackdrop">
76 Delete
77 </button>
78 </div>
79 </div>
80 </div>
81 </div>
82 <div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false"
83 tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
84 <div class="modal-dialog modal-dialog-centered">
85 <div class="modal-content">
86 <div class="modal-header">
87 <h5 class="modal-title" id="staticBackdropLabel">Delete post</h5>
88 <button type="button" class="btn-close" data-bs-dismiss="modal"
89 aria-label="Close"></button>
90 </div>
91 <div class="modal-body">
92 <div class="card-body">
93 <form th:action="@{/moderator/deletePost(postid=${post.id})}" method="post"
94 id="myForm">
95 <label for="description">Description</label>
96 <textarea class="form-control" id="description" name="description"
97 rows="5"></textarea>
98 </form>
99 </div>
100 </div>
101 <div class="modal-footer">
102 <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
103 <input type="submit" class="btn btn-primary" form="myForm" value="Confirm">
104 </div>
105 </div>
106 </div>
107 </div>
108</div>
109<div class="row" th:if="${report}">
110 <div class="col-md-12">
111 <div class="col-md-8">
112 <h3>Reports</h3>
113 <div class="card mb-3">
114 <div class="card-body">
115 <div class="row">
116 <div class="col">
117 <h6>Description</h6>
118 </div>
119 <div class="col text-secondary">
120 <h6>User</h6>
121 </div>
122 </div>
123 <div class="row" th:each="reason : ${post.reasons}">
124 <div class="col">
125 <h6 th:text="${reason.description}"></h6>
126 </div>
127 <div class="col text-secondary" th:text="${reason.user.firstName} + ' ' + ${reason.user.lastName}">
128 </div>
129 <hr class="dropdown-divider">
130 </div>
131 </div>
132 </div>
133 </div>
134 </div>
135</div>
136<script src="/js/bootstrap.min.js"></script>
137</body>
138</html>
Note: See TracBrowser for help on using the repository browser.