Changeset e272096 for src/main/resources


Ignore:
Timestamp:
02/18/24 22:01:54 (5 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
Location:
src/main/resources/templates
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • src/main/resources/templates/fragments/header.html

    rbde8b13 re272096  
    1010      <div class="collapse navbar-collapse justify-content-end" id="navbarsExampleDefault">
    1111        <ul class="navbar-nav m-auto">
    12           <li class="nav-item m-auto">
     12          <li sec:hasRole class="nav-item m-auto">
    1313            <a class="nav-link active" href="/bilet">Bileti</a>
    1414          </li>
     
    4242            <a class="nav-link" href="#"></a>
    4343          </li>
    44           <li class="nav-item">
    45             <a class="btn btn-success btn-sm ml-3" href="/shopping-cart">
    46               <i class="fa fa-shopping-cart"></i> Cart
    47             </a>
    48           </li>
     44
    4945          <li class="nav-item" sec:authorize="isAuthenticated()">
    5046            <a href="#" class="btn btn-light btn-sm ml-3" sec:authentication="name">
  • src/main/resources/templates/kontrola.html

    rbde8b13 re272096  
    11<div xmlns:th="http://www.thymeleaf.org">
    2     <section class="jumbotron text-center">
    3         <div class="container">
    4             <h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>
    5             <h3 class="jumbotron-heading">All products</h3>
    6         </div>
    7     </section>
    82
     3    <div class="container mb-4">
     4        <div class="row">
     5            <div class="col-12" >
    96
    107    <form class="form-signin mt-xl-5" method="post" th:action="@{'/kontrola/{id}/kazni-neregistriran'(id=${kontrola.kontrolaId})}">
     
    129
    1310        <p>
    14             <label for="dokument" class="sr-only">Email</label>
     11            <label for="dokument" >Dokument</label>
    1512            <input class="form-control" name="dokument" id="dokument" type="text">
    1613        </p>
     
    1815
    1916        <p>
    20             <label for="telefon" class="sr-only">Telefon</label>
     17            <label for="telefon" >Telefon</label>
    2118            <input class="form-control" name="telefon" id="telefon" type="text">
    2219        </p>
    2320
    2421        <p>
    25             <label for="ime" class="sr-only">Ime</label>
     22            <label for="ime" >Ime</label>
    2623            <input class="form-control" name="ime" id="ime" type="text">
    2724        </p>
    2825
    2926        <p>
    30             <label for="adresa" class="sr-only">Adresa</label>
     27            <label for="adresa" >Adresa</label>
    3128            <input class="form-control" name="adresa" id="adresa" type="text">
    3229        </p>
     
    3431
    3532        <p>
    36             <label for="iznos" class="sr-only">Iznos</label>
     33            <label for="iznos" >Iznos</label>
    3734            <input class="form-control" name="iznos" id="iznos" type="number">
    3835        </p>
     
    4946
    5047
     48
    5149    <form class="form-signin mt-xl-5" method="post" th:action="@{'/kontrola/{id}/kazni-registriran'(id=${kontrola.kontrolaId})}">
    5250        <h2 class="form-signin-heading">Kazna za regirstiran</h2>
    5351
    5452        <p>
    55             <label for="dk" class="sr-only">Dokument</label>
     53            <label for="dk" >Dokument</label>
    5654            <input class="form-control" name="dokument" id="dk" type="text">
    5755        </p>
    5856
    5957        <p>
    60             <label for="iz" class="sr-only">Iznos</label>
     58            <label for="iz" >Iznos</label>
    6159            <input class="form-control" name="iznos" id="iz" type="number">
    6260        </p>
    6361
    6462        <p>
    65             <label for="patnik" class="sr-only">Patnik</label>
     63            <label for="patnik" >Patnik</label>
    6664            <select id="patnik" name="patnik" class="form-control">
    6765                <option th:each="patnik : ${patnici}"
     
    8280        </div>
    8381    </form>
     82
     83            </div>
     84        </div>
     85    </div>
     86
    8487
    8588
     
    114117
    115118                            <td class="text-right">
    116                                 <th:block sec:authorize="hasRole('ROLE_ADMIN')">
    117                                     <form th:action="@{'/products/delete/{id}' (id=${kazna.kzId})}"
    118                                           th:method="DELETE">
    119                                         <button type="submit"
    120                                                 class="btn btn-sm btn-danger delete-product">
    121                                             <i class="fas fa-trash-alt"></i> Delete
    122                                         </button>
    123                                     </form>
    124                                 </th:block>
     119<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
     120<!--                                    <form th:action="@{'/products/delete/{id}' (id=${kazna.kzId})}"-->
     121<!--                                          th:method="DELETE">-->
     122<!--                                        <button type="submit"-->
     123<!--                                                class="btn btn-sm btn-danger delete-product">-->
     124<!--                                            <i class="fas fa-trash-alt"></i> Delete-->
     125<!--                                        </button>-->
     126<!--                                    </form>-->
     127<!--                                </th:block>-->
    125128                            </td>
    126129                            <td>
    127                                 <th:block sec:authorize="hasRole('ROLE_ADMIN')">
    128                                     <a th:href="@{'/products/edit-form/{id}' (id=${kazna.kzId})}"
    129                                        class="btn btn-sm btn-info edit-product">
    130                                         <i class="fas fa-edit"></i> Edit
    131                                     </a>
    132                                 </th:block>
     130<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
     131<!--                                    <a th:href="@{'/products/edit-form/{id}' (id=${kazna.kzId})}"-->
     132<!--                                       class="btn btn-sm btn-info edit-product">-->
     133<!--                                        <i class="fas fa-edit"></i> Edit-->
     134<!--                                    </a>-->
     135<!--                                </th:block>-->
    133136                            </td>
    134137                            <td>
    135                                 <form th:action="@{'/shopping-cart/add-product/{id}' (id=${kazna.kzId})}"
    136                                       th:method="POST">
    137                                     <button type="submit" class="btn btn-sm btn-success add-to-cart">
    138                                         <i class="fas fa-shopping-cart"></i> Add to cart
    139                                     </button>
    140                                 </form>
     138
    141139                            </td>
    142140                        </tr>
  • src/main/resources/templates/kupiBilet.html

    rbde8b13 re272096  
    11<div xmlns:th="http://www.thymeleaf.org">
    2     <section class="jumbotron text-center">
    3         <div class="container">
    4             <h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>
    5             <h3 class="jumbotron-heading">All products</h3>
    6         </div>
    7     </section>
     2
    83
    94    <div style="width: 500px">
  • src/main/resources/templates/listBileti.html

    rbde8b13 re272096  
    11<div xmlns:th="http://www.thymeleaf.org">
    2     <section class="jumbotron text-center">
    3         <div class="container">
    4             <h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>
    5             <h3 class="jumbotron-heading">All products</h3>
    6         </div>
    7     </section>
     2
    83
    94    <div class="container mb-4">
     
    3126
    3227                            <td class="text-right">
    33                                 <th:block sec:authorize="hasRole('ROLE_ADMIN')">
    34                                     <form th:action="@{'/products/delete/{id}' (id=${bilet.bId})}"
    35                                           th:method="DELETE">
    36                                         <button type="submit"
    37                                                 class="btn btn-sm btn-danger delete-product">
    38                                             <i class="fas fa-trash-alt"></i> Delete
    39                                         </button>
    40                                     </form>
    41                                 </th:block>
     28<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
     29<!--                                    <form th:action="@{'/products/delete/{id}' (id=${bilet.bId})}"-->
     30<!--                                          th:method="DELETE">-->
     31<!--                                        <button type="submit"-->
     32<!--                                                class="btn btn-sm btn-danger delete-product">-->
     33<!--                                            <i class="fas fa-trash-alt"></i> Delete-->
     34<!--                                        </button>-->
     35<!--                                    </form>-->
     36<!--                                </th:block>-->
    4237                            </td>
    4338                            <td>
    44                                 <th:block sec:authorize="hasRole('ROLE_ADMIN')">
    45                                     <a th:href="@{'/products/edit-form/{id}' (id=${bilet.bId})}"
    46                                        class="btn btn-sm btn-info edit-product">
    47                                         <i class="fas fa-edit"></i> Edit
    48                                     </a>
    49                                 </th:block>
     39<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
     40<!--                                    <a th:href="@{'/products/edit-form/{id}' (id=${bilet.bId})}"-->
     41<!--                                       class="btn btn-sm btn-info edit-product">-->
     42<!--                                        <i class="fas fa-edit"></i> Edit-->
     43<!--                                    </a>-->
     44<!--                                </th:block>-->
    5045                            </td>
    5146                            <td>
    52                                 <form th:action="@{'/shopping-cart/add-product/{id}' (id=${bilet.bId})}"
    53                                       th:method="POST">
    54                                     <button type="submit" class="btn btn-sm btn-success add-to-cart">
    55                                         <i class="fas fa-shopping-cart"></i> Add to cart
    56                                     </button>
    57                                 </form>
     47
    5848                            </td>
    5949                        </tr>
  • src/main/resources/templates/listInstanci.html

    rbde8b13 re272096  
    11<div xmlns:th="http://www.thymeleaf.org">
    2     <section class="jumbotron text-center">
    3         <div class="container">
    4             <h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>
    5             <h3 class="jumbotron-heading">All products</h3>
    6         </div>
    7     </section>
     2
    83
    94    <div class="container mb-4">
     
    6156                                      th:method="GET">
    6257                                    <button type="submit" class="btn btn-sm btn-success add-to-cart">
    63                                         <i class="fas fa-shopping-cart"></i> Kontrola
     58                                        Kontrola
    6459                                    </button>
    6560                                </form>
  • src/main/resources/templates/listKazni.html

    rbde8b13 re272096  
    11<div xmlns:th="http://www.thymeleaf.org">
    2     <section class="jumbotron text-center">
    3         <div class="container">
    4             <h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>
    5             <h3 class="jumbotron-heading">All products</h3>
    6         </div>
    7     </section>
     2
    83
    94    <div class="container mb-4">
     
    1611                            <th scope="col">#</th>
    1712                            <th scope="col">Iznos</th>
     13                            <th scope="col">Datum</th>
    1814                            <th scope="col">Plateno</th>
     15                            <th scope="col">Datum plateno</th>
    1916                            <th scope="col">Dokument</th>
    2017                            <th scope="col"></th>
     
    2724                            <td th:text="${kazna.kzId}"></td>
    2825                            <td th:text="${kazna.kzIznos}"></td>
     26                            <td th:text="${kazna.kzDatum}"></td>
    2927                            <td th:text="${kazna.kzPlateno}"></td>
     28                            <td th:text="${kazna.kzDatumPlateno}"></td>
    3029                            <td th:text="${kazna.kzDokument}"></td>
    3130
    3231                            <td class="text-right">
    33                                 <th:block sec:authorize="hasRole('ROLE_ADMIN')">
    34                                     <form th:action="@{'/products/delete/{id}' (id=${kazna.kzId})}"
    35                                           th:method="DELETE">
    36                                         <button type="submit"
    37                                                 class="btn btn-sm btn-danger delete-product">
    38                                             <i class="fas fa-trash-alt"></i> Delete
    39                                         </button>
    40                                     </form>
    41                                 </th:block>
     32<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
     33<!--                                    <form th:action="@{'/products/delete/{id}' (id=${kazna.kzId})}"-->
     34<!--                                          th:method="DELETE">-->
     35<!--                                        <button type="submit"-->
     36<!--                                                class="btn btn-sm btn-danger delete-product">-->
     37<!--                                            <i class="fas fa-trash-alt"></i> Delete-->
     38<!--                                        </button>-->
     39<!--                                    </form>-->
     40<!--                                </th:block>-->
    4241                            </td>
    4342                            <td>
    44                                 <th:block sec:authorize="hasRole('ROLE_ADMIN')">
    45                                     <a th:href="@{'/products/edit-form/{id}' (id=${kazna.kzId})}"
    46                                        class="btn btn-sm btn-info edit-product">
    47                                         <i class="fas fa-edit"></i> Edit
    48                                     </a>
    49                                 </th:block>
     43<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
     44<!--                                    <a th:href="@{'/products/edit-form/{id}' (id=${kazna.kzId})}"-->
     45<!--                                       class="btn btn-sm btn-info edit-product">-->
     46<!--                                        <i class="fas fa-edit"></i> Edit-->
     47<!--                                    </a>-->
     48<!--                                </th:block>-->
    5049                            </td>
    5150                            <td>
    52                                 <form th:action="@{'/shopping-cart/add-product/{id}' (id=${kazna.kzId})}"
     51                                <form th:action="@{'/kazna/{id}/pay' (id=${kazna.kzId})}"
    5352                                      th:method="POST">
    5453                                    <button type="submit" class="btn btn-sm btn-success add-to-cart">
    55                                         <i class="fas fa-shopping-cart"></i> Add to cart
     54                                         Pay
    5655                                    </button>
    5756                                </form>
  • 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>
  • src/main/resources/templates/master-template.html

    rbde8b13 re272096  
    2020<header th:replace="fragments/header"/>
    2121
     22<div th:text="${error}"></div>
     23
    2224<section th:include="${bodyContent}">
    2325
  • src/main/resources/templates/register.html

    rbde8b13 re272096  
    11<div xmlns:th="http://www.thymeleaf.org">
    2   <section class="jumbotron text-center">
    3     <div class="container">
    4       <h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>
    5       <h3 class="jumbotron-heading">All products</h3>
    6     </div>
    7   </section>
    82
    93  <div class="container mb-4">
     
    3529      </p>
    3630
     31      <p sec:authorize="hasRole('ROLE_ADMIN')">
     32        <label for="vrabotenType" class="sr-only">Vraboten Type</label>
     33        <select name="vrabotenType" id="vrabotenType">
     34          <option th:each="type : ${types}"
     35                  th:text="${type.name()}"
     36                  th:value="${type}" ></option>
     37        </select>
     38      </p>
     39
     40      <p sec:authorize="hasRole('ROLE_ADMIN')">
     41        <label for="salary" class="sr-only">Salary</label>
     42        <input type="number" id="salary" name="salary">
     43      </p>
     44
     45
    3746
    3847
Note: See TracChangeset for help on using the changeset viewer.