Commit 9a9f26ec by Bogdan Andjelkovic

lajkovi na fornut dodati, uradjen ceo back, dodata prosecna ocena korisnika

parent aff4a65a
...@@ -108,6 +108,7 @@ public class ProfileController ...@@ -108,6 +108,7 @@ public class ProfileController
} }
model.addAttribute("komentari", komentari); model.addAttribute("komentari", komentari);
model.addAttribute("korisniciKomentari", korisniciKomentari); model.addAttribute("korisniciKomentari", korisniciKomentari);
model.addAttribute("avgOcena", komRepo.averageOcenaByKorisnikId( korisnikId));
return "korisnik"; return "korisnik";
} }
} }
...@@ -108,7 +108,8 @@ ...@@ -108,7 +108,8 @@
alt="slika korisnika"> alt="slika korisnika">
</div> </div>
<div class="filter-content"> <div class="filter-content">
<p class="fw-bold h4 mt-3"><span th:text="${korisnik.getIme()}"></span></p> <p class="fw-bold h4 mt-3"><span th:text="${korisnik.ime + ' ' + korisnik.prezime}"></span></p>
<p th:object="${avgOcena}" th:text="${'Prosecna ocena korisnika: ' + avgOcena}"></p>
</div> </div>
</article> </article>
</div> </div>
......
...@@ -146,6 +146,13 @@ ...@@ -146,6 +146,13 @@
<h1 th:text="${oglas.naslov}" class="oglas-naslov"></h1> <h1 th:text="${oglas.naslov}" class="oglas-naslov"></h1>
</div> </div>
<div class="row w-100 border-bottom-grey my-3 flex-row justify-content-end align-items-center pb-3"> <div class="row w-100 border-bottom-grey my-3 flex-row justify-content-end align-items-center pb-3">
<div class="col d-flex justify-content-evenly" style="color: #777;">
<p th:object="${likesCount}">
<span th:text="${likesCount}"></span>
<a th:if="${(loggedUser!=null)&&(!liked)}" th:href="@{/lajkuj-oglas/{oglasId}(oglasId=${oglas.oglasId})}" style="text-decoration: none; color: red;"><!--<i class="bi bi-heart" style="display: inline-block; height: 1rem; width: 1rem; color: red;"></i>--></a>
<a th:if="${(loggedUser!=null)&&(liked)}" th:href="@{/lajkuj-oglas/{oglasId}(oglasId=${oglas.oglasId})}" style="text-decoration: none; color: red;"><!--<i class="bi bi-heart-fill" style="display: inline-block; height: 1rem; width: 1rem; color: red;"></i>--></a>
</p>
</div>
<a th:href="@{/korisnik/{korisnikId}(korisnikId=${vlasnik.korisnikId})}" <a th:href="@{/korisnik/{korisnikId}(korisnikId=${vlasnik.korisnikId})}"
th:text="${vlasnik.ime + ' '+ vlasnik.prezime}" class="text-right w-50" th:text="${vlasnik.ime + ' '+ vlasnik.prezime}" class="text-right w-50"
style="color:#495056;text-decoration: none"></a> style="color:#495056;text-decoration: none"></a>
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
</div> </div>
</div> </div>
</a> </a>
<p class="fw-bold h4 mt-3"><span th:text="${loggedUser.getKorisnik().getIme()}"></span></p> <p class="fw-bold h4 mt-3"><a th:href="@{/korisnik/{korisnikId}(korisnikId=${loggedUser.getKorisnik().korisnikId})}"><span th:text="${loggedUser.getKorisnik().getIme()}"></span></a></p>
<p class="text-muted" th:object="${profileRole}" th:text="${profileRole}"></p> <p class="text-muted" th:object="${profileRole}" th:text="${profileRole}"></p>
<div class="d-flex justify-content-around w-75"> <div class="d-flex justify-content-around w-75">
<a th:href="@{/profile/edit}"> <a th:href="@{/profile/edit}">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment