Created
June 8, 2020 00:04
-
-
Save Khuzha/4a7ed7015934d5e77b5c32522e91d772 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title><%= lodger.lastName %> <%= lodger.firstName %> <%= lodger.fathersName %></title> | |
| <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" | |
| integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous"> | |
| </head> | |
| <body class="container mt-3"> | |
| <% if (edited) { %> | |
| <div class="alert alert-success" role="alert"> | |
| Изменение баллов успешно сохранено. | |
| </div> | |
| <% } %> | |
| <h1><%= lodger.lastName %> <%= lodger.firstName %> <%= lodger.fathersName %>, комната <%= roomId %>, <%= floor.title %></h1> | |
| <hr><br> | |
| <h3>Редактирование баллов</h3> | |
| <form action="/editPoints/floor_<%= floor.id %>/room_<%= roomId %>/lodger_<%= lodger.id %>" method="post"> | |
| <div class="form-row"> | |
| <div class="form-group col-md-3"> | |
| <label for="count">Количество</label> | |
| <input type="number" name="count" id="count" | |
| class="form-control" placeholder="только числовые значения"> | |
| </div> | |
| <div class="form-group col-md-9"> | |
| <label for="reason">Причина</label> | |
| <input type="text" name="reason" id="reason" class="form-control"> | |
| </div> | |
| </div> | |
| <button type="submit" class="btn btn-primary">Сохранить</button> | |
| </form><br> | |
| <h4>Текущее количество баллов: <%= points %></h4> | |
| <h4>История изменений баллов:</h4> | |
| <table class="table table-striped table-hover"> | |
| <thead class="thead-light"> | |
| <tr> | |
| <th>№</th> | |
| <th>Количество</th> | |
| <th>Причина</th> | |
| <th>Дата</th> | |
| </tr> | |
| </thead> | |
| <% for (let i = 0; i < lodger.points.length; i++) { %> | |
| <tr> | |
| <td><%= i + 1 %></td> | |
| <td><%= lodger.points[i].count %></td> | |
| <td><%= lodger.points[i].reason %></td> | |
| <td><%= new Date(lodger.points[i].date) %></td> | |
| </tr> | |
| <% } %> | |
| </table> | |
| <br><hr> | |
| <div class="pb-3"> | |
| <a href="/">На главную</a> | |
| </div> | |
| <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" | |
| integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" | |
| crossorigin="anonymous"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" | |
| integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" | |
| crossorigin="anonymous"></script> | |
| <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" | |
| integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" | |
| crossorigin="anonymous"></script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment