Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 4.11 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns:th="http://www.w3.org/1999/xhtml" xmlns:form="http://www.w3.org/1999/xhtml">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>Panel administratora</title>
  6.     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  7.     <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
  8. </head>
  9. <body>
  10.  
  11.     <div th:if="${employee.position.idPosition == 17}" class="text-center">
  12.         <div th:insert="fragments/menu.html :: menu_auth"/>
  13.         <div th:insert="fragments/menu.html :: menu_admin"/>
  14.         <hr/>
  15.     </div>
  16.     <div th:unless="${employee.position.idPosition == 17}" class="text-center">
  17.         <div th:insert="fragments/menu.html :: menu_unauth"/>
  18.         <hr/>
  19.     </div>
  20.  
  21.     <div class="container text-center">
  22.         <h1>Lista pracowników</h1>
  23.  
  24.         <input type="button" class="btn btn-secondary" value="Dodaj pracownika" name="add" onclick="location.href='/add_employee'"/>
  25.  
  26.         <table class="table table-striped">
  27.             <thead>
  28.                 <th scope="row" style="text-align: center">#ID</th>
  29.                 <th scope="row" style="text-align: center">Imie</th>
  30.                 <th scope="row" style="text-align: center">Nazwisko</th>
  31.                 <th scope="row" style="text-align: center">Czas pracy</th>
  32.                 <th scope="row" style="text-align: center">Szczegóły</th>
  33.                 <th scope="row" style="text-align: center">Edytuj</th>
  34.                 <th scope="row" style="text-align: center">Usuń</th>
  35.             </thead>
  36.             <tbody>
  37.                 <tr th:each="employee : ${employeeList}">
  38.                     <td th:text="${employee.idEmployee}"/>
  39.                     <td th:text="${employee.employeeDetails.name}"/>
  40.                     <td th:text="${employee.employeeDetails.surname}"/>
  41.                     <td>
  42.                         <input type="button" class="btn btn-secondary" value="Czas pracy" name="workTime"/>
  43.                     </td>
  44.                     <td>
  45.                         <input type="button" class="btn btn-secondary" value="Więcej..." name="more"/>
  46.                     </td>
  47.                     <td>
  48.                         <input type="button" class="btn btn-secondary" value="Edytuj" name="update"/>
  49.                     </td>
  50.                     <td>
  51.                         <button type="button" class="btn btn-danger" data-toggle="modal"
  52.                        th:attr="data-target='#myModal-'+${employee.idEmployee}">Usuń</button>
  53.  
  54.                         <!-- The Modal -->
  55.                         <form th:attr="action='/delete_employee/'+${employee.idEmployee}" method="post">
  56.                             <div class="modal fade" th:attr="id='myModal-'+${employee.idEmployee}">
  57.                                 <div class="modal-dialog">
  58.                                     <div class="modal-content">
  59.  
  60.                                         <!-- Modal Header -->
  61.                                         <div class="modal-header">
  62.                                             <h4 class="modal-title" th:text="'Czy na pewno chcesz usunąć użytkownika '+${employee.login}+'?'"></h4>
  63.                                         </div>
  64.  
  65.                                         <!-- Modal footer -->
  66.                                         <div class="modal-footer">
  67.                                             <button type="button" class="btn btn-primary" data-dismiss="modal">Anuluj</button>
  68.                                             <button type="submit" class="btn btn-danger">Usuń</button>
  69.                                         </div>
  70.                                     </div>
  71.                                 </div>
  72.                             </div>
  73.                         </form>
  74.                     </td>
  75.  
  76.                 </tr>
  77.             </tbody>
  78.         </table>
  79.     </div>
  80.  
  81.  
  82.  
  83.  
  84.  
  85.     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  86.     <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  87. </body>
  88. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement