[python] 1

Viewer

  1. {% extends 'base.html' %}
  2.  
  3. {% block title %}Заявки{% endblock %}
  4.  
  5. {% block content %}
  6. <div class="container">
  7.     <h1>Заявки</h1>
  8.     <form method="get" class="mb-3">
  9.         <div class="form-row">
  10.             <div class="form-col">
  11.                 <label for="search" class="form-label">Поиск заявок...</label>
  12.                 <input type="text" id="search" name="search" class="form-control" placeholder="Введите текст для поиска">
  13.             </div>
  14.             <div class="form-col">
  15.                 <label for="status" class="form-label">Статус</label>
  16.                 <select id="status" name="status" class="form-control">
  17.                     <option value="">Все статусы</option>
  18.                     <option value="открыто">Открытые</option>
  19.                     <option value="в_работе">В работе</option>
  20.                     <option value="закрыто">Закрытые</option>
  21.                 </select>
  22.             </div>
  23.             <div class="form-col">
  24.                 <label for="company" class="form-label">Компания</label>
  25.                 <select id="company" name="company" class="form-control">
  26.                     <option value="">Все компании</option>
  27.                     {for company in companies %}
  28.                     <option value="{{ company.id }}">{{ company.name }}</option>
  29.                     {% endfor %}
  30.                 </select>
  31.             </div>
  32.             <div class="form-col">
  33.                 <label for="priority" class="form-label">Приоритет</label>
  34.                 <select id="priority" name="priority" class="form-control">
  35.                     <option value="">Все приоритеты</option>
  36.                     <option value="низкий">Низкий</option>
  37.                     <option value="средний">Средний</option>
  38.                     <option value="высокий">Высокий</option>
  39.                 </select>
  40.             </div>
  41.             <div class="form-col">
  42.                 <label for="type" class="form-label">Тип</label>
  43.                 <select id="type" name="type" class="form-control">
  44.                     <option value="">Все типы</option>
  45.                     <option value="проблема">Проблема</option>
  46.                     <option value="запрос">Запрос</option>
  47.                 </select>
  48.             </div>
  49.             <div class="form-col form-col-button">
  50.                 <button type="submit" class="btn btn-primary">Фильтр</button>
  51.             </div>
  52.         </div>
  53.     </form>
  54.     <div class="table-container">
  55.         <table class="table table-fullwidth table-responsive" id="tickets-table">
  56.             <thead>
  57.                 <tr>
  58.                     <th>Выбрать</th>
  59.                     <th>Название</th>
  60.                     <th>Описание</th>
  61.                     <th>Статус</th>
  62.                     <th>Компания</th>
  63.                     <th>Приоритет</th>
  64.                     <th>Тип</th>
  65.                     <th>Дата обращения</th>
  66.                     <th>Ответственный</th>
  67.                     <th>№ телефона</th>
  68.                     <th>Время обращения</th>
  69.                     <th>Табельный № заявителя</th>
  70.                     <th>Подразделение</th>
  71.                     <th>Рабочее место</th>
  72.                     <th>Проблема (описание)</th>
  73.                     <th>Решение (описание)</th>
  74.                 </tr>
  75.             </thead>
  76.             <tbody>
  77.                 {for ticket in tickets %}
  78.                 <tr>
  79.                     <td><input type="radio" name="selected_ticket" value="{{ ticket.id }}"></td>
  80.                     <td>{{ ticket.title }}</td>
  81.                     <td style="white-space: pre-wrap;">{{ ticket.description }}</td>
  82.                     <td>{{ ticket.get_status_display }}</td>
  83.                     <td>{{ ticket.company }}</td>
  84.                     <td>{{ ticket.get_priority_display }}</td>
  85.                     <td>{{ ticket.get_type_display }}</td>
  86.                     <td>{{ ticket.received_date }}</td>
  87.                     <td>{{ ticket.responsible }}</td>
  88.                     <td>{{ ticket.phone_number }}</td>
  89.                     <td>{{ ticket.received_time }}</td>
  90.                     <td>{{ ticket.employee_id }}</td>
  91.                     <td>{{ ticket.department }}</td>
  92.                     <td>{{ ticket.problem_description }}</td>
  93.                     <td>{{ ticket.workplace }}</td>
  94.                     <td>{{ ticket.solution_description }}</td>
  95.                 </tr>
  96.                 {% endfor %}
  97.             </tbody>
  98.         </table>
  99.     </div>
  100.     <div class="d-flex justify-content-end mt-3">
  101.         <button class="btn btn-primary" id="editButton">Редактировать</button>
  102.         <button class="btn btn-danger" id="closeButton">Закрыть</button>
  103.         <button class="btn btn-danger" id="deleteButton">Удалить</button>
  104.     </div>
  105. </div>
  106. {% endblock %}
  107.  

Editor

You can edit this paste and save as new:


File Description
  • 1
  • Paste Code
  • 30 Jun-2024
  • 5.15 Kb
You can Share it: