Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en" xmlns:th="http://www.w3.org/1999/xhtml" xmlns:form="http://www.w3.org/1999/xhtml">
- <head>
- <meta charset="UTF-8">
- <title>Panel administratora</title>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
- <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
- </head>
- <body>
- <div th:if="${employee.position.idPosition == 17}" class="text-center">
- <div th:insert="fragments/menu.html :: menu_auth"/>
- <div th:insert="fragments/menu.html :: menu_admin"/>
- <hr/>
- </div>
- <div th:unless="${employee.position.idPosition == 17}" class="text-center">
- <div th:insert="fragments/menu.html :: menu_unauth"/>
- <hr/>
- </div>
- <div class="container text-center">
- <h1>Lista pracowników</h1>
- <input type="button" class="btn btn-secondary" value="Dodaj pracownika" name="add" onclick="location.href='/add_employee'"/>
- <table class="table table-striped">
- <thead>
- <th scope="row" style="text-align: center">#ID</th>
- <th scope="row" style="text-align: center">Imie</th>
- <th scope="row" style="text-align: center">Nazwisko</th>
- <th scope="row" style="text-align: center">Czas pracy</th>
- <th scope="row" style="text-align: center">Szczegóły</th>
- <th scope="row" style="text-align: center">Edytuj</th>
- <th scope="row" style="text-align: center">Usuń</th>
- </thead>
- <tbody>
- <tr th:each="employee : ${employeeList}">
- <td th:text="${employee.idEmployee}"/>
- <td th:text="${employee.employeeDetails.name}"/>
- <td th:text="${employee.employeeDetails.surname}"/>
- <td>
- <input type="button" class="btn btn-secondary" value="Czas pracy" name="workTime"/>
- </td>
- <td>
- <input type="button" class="btn btn-secondary" value="Więcej..." name="more"/>
- </td>
- <td>
- <input type="button" class="btn btn-secondary" value="Edytuj" name="update"/>
- </td>
- <td>
- <button type="button" class="btn btn-danger" data-toggle="modal"
- th:attr="data-target='#myModal-'+${employee.idEmployee}">Usuń</button>
- <!-- The Modal -->
- <form th:attr="action='/delete_employee/'+${employee.idEmployee}" method="post">
- <div class="modal fade" th:attr="id='myModal-'+${employee.idEmployee}">
- <div class="modal-dialog">
- <div class="modal-content">
- <!-- Modal Header -->
- <div class="modal-header">
- <h4 class="modal-title" th:text="'Czy na pewno chcesz usunąć użytkownika '+${employee.login}+'?'"></h4>
- </div>
- <!-- Modal footer -->
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" data-dismiss="modal">Anuluj</button>
- <button type="submit" class="btn btn-danger">Usuń</button>
- </div>
- </div>
- </div>
- </div>
- </form>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement