Ignore:
Timestamp:
01/03/23 23:03:00 (18 months ago)
Author:
andrejtodorovski <82031894+andrejtodorovski@…>
Branches:
main
Children:
6832924
Parents:
feffc2f
Message:

Added master template and added filtering parts by car and category

File:
1 edited

Legend:

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

    rfeffc2f r60de3eb  
    1 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
    2       lang="en">
    3 <head>
    4     <meta charset="utf-8"/>
    5     <title>Почетна</title>
    6 </head>
    7 <body>
     1<div>
    82<header>
    93    <a th:href="${'/orders/4'}">Мои нарачки</a>
     
    137<main>
    148    <h1>Сите производи</h1>
     9    <form th:action="@{/filtered}">
     10        <label for="cartype"></label><select id="cartype" required name="cartype">
     11            <option  th:each="car : ${cars}"
     12                     th:text="${car.getCartype()}"
     13                     th:value="${car.getCartype()}">
     14            </option>
     15        </select>
     16        <label for="category"></label><select id="category" required name="category">
     17            <option  th:each="cat : ${categories}"
     18                     th:text="${cat.getCname()}"
     19                     th:value="${cat.getCname()}">
     20            </option>
     21        </select>
     22        <button type="submit">Филтрирај</button>
     23    </form>
    1524    <table>
    1625        <thead>
    1726        <tr>
    1827            <th>Name</th>
    19             <th>Description</th>
    2028            <th>Manufacturer</th>
    2129            <th>Details</th>
     
    2533        <tr th:each="part : ${parts}">
    2634            <td th:text="${part.getName()}"></td>
    27             <td th:text="${part.getDescription()}"></td>
    2835            <td th:text="${part.getManufacturer().getName()}"></td>
    2936            <td>
     
    3643    </table>
    3744</main>
    38 </body>
    39 </html>
     45</div>
Note: See TracChangeset for help on using the changeset viewer.