Ignore:
Timestamp:
02/18/24 22:01:54 (4 months ago)
Author:
ppaunovski <paunovskipavel@…>
Branches:
master
Children:
4251327
Parents:
bde8b13
Message:

All 3 main use cases implemented.

  1. Starting a commute
  2. Writing a ticket
  3. Starting an instance of a Bus Line
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/resources/templates/listVozenja.html

    rbde8b13 re272096  
    66        </div>
    77    </section>
     8
     9    <form method="get" action="/vozenje">
     10        <select name="status">
     11            <option th:each="status : ${vozStatus}" th:value="${status}" th:text="${status.name()}"></option>
     12        </select>
     13
     14        <input type="submit" value="Search">
     15    </form>
    816
    917    <div class="container mb-4">
     
    3341
    3442                            <td class="text-right">
    35                                 <th:block sec:authorize="hasRole('ROLE_ADMIN')">
    36                                     <form th:action="@{'/products/delete/{id}' (id=${vozenje.vozenjeId})}"
    37                                           th:method="DELETE">
     43                                <th:block  >
     44                                    <form th:action="@{'/vozenje/{id}/end' (id=${vozenje.vozenjeId})}"
     45                                          th:hidden="${vozenje.vozenjeStatus.name().equals('FINISHED')} ? 'true' : 'false'"
     46                                          th:method="GET">
    3847                                        <button type="submit"
    3948                                                class="btn btn-sm btn-danger delete-product">
    40                                             <i class="fas fa-trash-alt"></i> Delete
     49                                            <i class="fas fa-trash-alt"></i> End
    4150                                        </button>
    4251                                    </form>
     
    4453                            </td>
    4554                            <td>
    46                                 <th:block sec:authorize="hasRole('ROLE_ADMIN')">
    47                                     <a th:href="@{'/products/edit-form/{id}' (id=${vozenje.vozenjeId})}"
    48                                        class="btn btn-sm btn-info edit-product">
    49                                         <i class="fas fa-edit"></i> Edit
    50                                     </a>
    51                                 </th:block>
     55<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
     56<!--                                    <a th:href="@{'/products/edit-form/{id}' (id=${vozenje.vozenjeId})}"-->
     57<!--                                       class="btn btn-sm btn-info edit-product">-->
     58<!--                                        <i class="fas fa-edit"></i> Edit-->
     59<!--                                    </a>-->
     60<!--                                </th:block>-->
    5261                            </td>
    5362                            <td>
    54                                 <form th:action="@{'/vozenje/{vozenjeId}/end'(vozenjeId=${vozenje.vozenjeId})}"
    55                                       th:method="GET">
    56                                     <button type="submit" class="btn btn-sm btn-success add-to-cart">
    57                                         <i class="fas fa-shopping-cart"></i> End vozenje
    58                                     </button>
    59                                 </form>
     63
    6064                            </td>
    6165                        </tr>
Note: See TracChangeset for help on using the changeset viewer.