Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
- <head>
- <title>Spring i Thymeleaf: lista pracowników</title>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" />
- <style>
- img.empPhoto {
- width: 300px;
- }
- .fired {
- color: firebrick;
- }
- </style>
- </head>
- <body>
- <div class="container-fluid">
- <h1>Pan Prezes</h1>
- <p>
- <b>
- <!--<span th:text='${boss.firstName}'></span>-->
- <!--<span th:text='${boss.lastName}'></span>-->
- <span th:text='|${boss.firstName} ${boss.lastName}|'></span>
- </b>
- </p>
- <img th:src="${boss.photoUrl}" class="empPhoto" />
- <h1>Pracownicy firmy</h1>
- <table class="table table-striped">
- <tr>
- <th>Lp</th>
- <th>Imię i nazwisko</th>
- <th>Stanowisko</th>
- <th>Wynagrodzenie</th>
- <th>Data zatrudnienia</th>
- <th>Data zwolnienia</th>
- <th>Umiejętności</th>
- <th>Uwagi</th>
- <th>Zdjęcie</th>
- </tr>
- <tr th:each="employee,iterStat : ${employees} ">
- <td></td>
- <td th:text='|${employee.firstName} ${employee.lastName}|'></td>
- <td th:text='${employee.jobTitle}'></td>
- <td th:text='${#numbers.formatDecimal(employee.salary, 3,"WHITESPACE",2,"POINT")}'></td>
- <td th:text='${#dates.format(employee.dateOfEmployment, "dd.MM.yyyy")}'></td>
- <td>
- <span th:if="${employee.dateOfTermination} != null"
- th:text='${#dates.format(employee.dateOfTermination, "dd.MM.yyyy")}'
- th:class="fired"></span>
- <span th:if="${employee.dateOfTermination} == null"
- th:text="'Wciąż pracuje'"></span>
- </td>
- <td>
- </td>
- <td>
- </td>
- <td>
- <img
- th:src="@{${employee.photoUrl}}"
- th:alt-title="#{logo}"
- th:class="empPhoto"/>
- </td>
- </tr>
- </table>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement