Ignore:
Timestamp:
02/08/22 20:13:23 (3 years ago)
Author:
Petar Partaloski <ppartaloski@…>
Branches:
main
Children:
0226942, 3fe36de
Parents:
3c0f9a9
Message:

Added new core functionalities, fixed bugs and improved visual clarity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • target/classes/templates/discussion.html

    r3c0f9a9 rc02189f  
    11<div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
    22    <div style="width: 85%; text-align: justify; margin: auto; clear: both">
    3         <div>
    4             <h1 th:text="${disc.getTitle()}" style="width: 80%; float: left"></h1>
     3        <div style="background-color: rgba(128,128,128, 0.2); border-radius: 20px; padding: 20px">
     4            <h1 th:text="${disc.getTitle()}" style="width: 80%; display: inline; height: fit-content; clear: both"></h1>
    55        </div>
    6         <hr><br><br>
     6        <hr>
    77        <div>
    88            <h5 th:text="${disc.getText()}" style="width: 90%; margin: auto; background-color: lightblue; border-radius: 4px; padding: 20px"></h5>
    99        </div>
    10         <br><br><br>
     10        <br>
     11        <h4>
     12            <span th:if="${!disc.getUser().equals(user)}" sec:authorize="isAuthenticated()">
     13                <a class='btn btn-success button-like-discussion' th:if="${!likedDiscussions.contains(disc)}" th:discussion-id="${disc.getDiscussionId()}" th:user-id="${user.getUserId()}" >❤</a>
     14                <a class='btn btn-danger button-unlike-discussion' th:if="${likedDiscussions.contains(disc)}" th:discussion-id="${disc.getDiscussionId()}" th:user-id="${user.getUserId()}" >💔</a>
     15            </span>
     16            <span>Број на допаѓања:</span>
     17            <span th:text="${likes}" id="likes_count"></span>
     18        </h4>
     19        <br>
    1120        <h6 style="width: 60%; float:left;">
    1221            <span th:text="${'Поставено од: '+disc.getUser().getUsername()}"></span>
     
    1726        </h6>
    1827        <div style="float: right"  sec:authorize="isAuthenticated()">
    19         <a th:if="${disc.getUser().equals(user)}" class="btn btn-warning" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Промени</a>
    20         <a th:if="${disc.getUser().equals(user)}" class="btn btn-danger button-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a>
    21         <a class="btn btn-success" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a>
    22         </div>
     28            <a th:if="${disc.getUser().equals(user)}" class="btn btn-warning" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Промени</a>
     29            <a th:if="${disc.getUser().equals(user)}" class="btn btn-danger button-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a>
     30            <a class="btn btn-success" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a>
     31
     32        </div><br>
    2333    </div>
    2434    <table class="table table-striped" style="width: 70%; margin: auto;">
Note: See TracChangeset for help on using the changeset viewer.