Merge develop into feature/registration_failed/html
This commit is contained in:
112
main/templates/pages/adm_ruleset.html
Normal file
112
main/templates/pages/adm_ruleset.html
Normal file
@@ -0,0 +1,112 @@
|
||||
{% extends 'base/base.html' %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% block title %}Управление{% endblock %}
|
||||
|
||||
{% block heading %}Управление{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link rel="stylesheet" href="{% static 'main/css/work.css' %}" xmlns="http://www.w3.org/1999/html">
|
||||
<link rel="stylesheet" href="{% static 'modules/notifications/dist/notifications.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_scripts %}
|
||||
<script src="https://unpkg.com/react@17/umd/react.development.js" crossorigin></script>
|
||||
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js" crossorigin></script>
|
||||
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
||||
|
||||
<script src="{% static 'modules/notifications/dist/notifications.js' %}"></script>
|
||||
<script src="{% static 'main/js/control.js'%}" type="text/babel"></script>
|
||||
<script src="{% static 'main/js/notifications.js' %}"></script>
|
||||
{% endblock%}
|
||||
{% block content %}
|
||||
<div class="container-md">
|
||||
|
||||
<div class="new-section">
|
||||
<p class="row page-description" id="licences_remaining">Свободных Мест:</p>
|
||||
</div>
|
||||
|
||||
{% for message in messages %}
|
||||
<script>create_notification('{{message}}','','{{message.tags}}',2000)</script>
|
||||
{% endfor %}
|
||||
|
||||
{% block form %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
<div class="row justify-content-center new-section">
|
||||
|
||||
<div class="col-10">
|
||||
<h6 class="table-title">Список сотрудников</h6>
|
||||
|
||||
{% block table %}
|
||||
<table class="table table-dark light-table">
|
||||
|
||||
<thead>
|
||||
<th>
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input"
|
||||
id="head-checkbox"
|
||||
/>
|
||||
</th>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Role</th>
|
||||
</thead>
|
||||
<tbody id="tbody"></tbody>
|
||||
|
||||
</table>
|
||||
<p id="loading">Данные загружаются...</p>
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% block count %}
|
||||
<div class="row justify-content-center new-section">
|
||||
<div class="col-5">
|
||||
<div class="info">
|
||||
|
||||
<div class="info-row">
|
||||
<div class="info-target">Инженеров:</div>
|
||||
<div class="info-quantity">
|
||||
<div class="status-circle-small light-green"></div>
|
||||
<span class="info-quantity-value">{{ engineers }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="info-row">
|
||||
<div class="info-target">Легких агентов:</div>
|
||||
<div class="info-quantity">
|
||||
<div class="status-circle-small light-yellow"></div>
|
||||
<span class="info-quantity-value">{{ light_agents }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block buttons %}
|
||||
<div class="col-5">
|
||||
|
||||
<button type="submit" name="engineer" class="request-acess-button default-button">
|
||||
Назначить выбранных на роль инженера
|
||||
</button>
|
||||
|
||||
<button type="submit" name="light_agent" class="hand-over-acess-button default-button">
|
||||
Назначить выбранных на роль легкого агента
|
||||
</button>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -10,17 +10,14 @@
|
||||
|
||||
|
||||
{% block extra_css %}
|
||||
<style>
|
||||
.img{
|
||||
<style>
|
||||
.img {
|
||||
width:auto;
|
||||
height:auto;
|
||||
max-width:100px!important;
|
||||
max-height:100px!important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -28,24 +25,31 @@
|
||||
<div class="row">
|
||||
<div class="col-auto">
|
||||
<div class="container">
|
||||
{% if image_url %}
|
||||
<img src={{image_url}} class="img img-thumbnail" alt="Аватар">
|
||||
{% else %}
|
||||
<img src="{% static 'no_avatar.png' %}" class="img img-thumbnail" alt="Нет изображения">
|
||||
{% endif %}
|
||||
<img
|
||||
src="{% if profile.image %}{{ profile.image }}{% else %}{% static 'no_avatar.png' %}{% endif %}"
|
||||
class="img img-thumbnail"
|
||||
alt="Нет изображения"
|
||||
>
|
||||
</div>
|
||||
<a href="{%url 'password_change' %}">Сменить пароль</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h5><span class="badge bg-secondary text-light">Имя пользователя</span> {{name}}</h5>
|
||||
<h5><span class="badge bg-secondary text-light">Имя пользователя</span> {{ profile.name }}</h5>
|
||||
<br>
|
||||
<h5><span class="badge bg-secondary text-light">Электронная почта</span> {{email}}</h5>
|
||||
<h5><span class="badge bg-secondary text-light">Электронная почта</span> {{ profile.user.email }}</h5>
|
||||
<br>
|
||||
<h5><span class="badge bg-secondary text-light">Текущая роль</span> {{role}}</h5>
|
||||
<h5><span class="badge bg-secondary text-light">Текущая роль</span>
|
||||
{% if profile.custom_role_id == ZENDESK_ROLES.engineer %}
|
||||
engineer
|
||||
{% elif profile.custom_role_id == ZENDESK_ROLES.light_agent %}
|
||||
light_agent
|
||||
{% endif %}
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div align="center">
|
||||
<form action="">
|
||||
<button class="btn btn-primary"><big>Запросить права доступа</big></button>
|
||||
<a href="{% url 'work' profile.user.id %}" class="btn btn-primary"><big>Запросить права доступа</big></a>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
106
main/templates/pages/statistic.html
Normal file
106
main/templates/pages/statistic.html
Normal file
@@ -0,0 +1,106 @@
|
||||
{% extends 'base/base.html' %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{ pagename }}{% endblock %}
|
||||
|
||||
{% block heading %} Страницы просмотра статистики{% endblock %}
|
||||
|
||||
{% block content%}
|
||||
<div class="mt-5">
|
||||
<div class="container-fluid" style="font-size:2rem">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<div class="row g-3">
|
||||
<div class="col-auto">
|
||||
{{ form.email.label }}
|
||||
</div>
|
||||
<div class="col-auto mt-4">
|
||||
{{ form.email }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3 mt-4">
|
||||
<div class="col-auto">
|
||||
{{ form.interval.label }}
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
{% for radio in form.interval%}
|
||||
{{ radio.tag }}
|
||||
<label class="btn btn-outline-secondary" for="{{ radio.id_for_label }}">
|
||||
{{ radio.choice_label }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3 mt-4">
|
||||
<div class="col-auto">
|
||||
{{ form.display_format.label }}
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
{% for radio in form.display_format%}
|
||||
{{ radio.tag }}
|
||||
<label class="btn btn-outline-secondary" for="{{ radio.id_for_label }}">
|
||||
{{ radio.choice_label }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3 mt-4">
|
||||
<div class="col-auto">
|
||||
{{ form.range_start.label}}
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class='col-sm-7'>
|
||||
{{ form.range_start}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3 mt-4">
|
||||
<div class="col-auto">
|
||||
{{ form.range_end.label}}
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class='col-sm-7'>
|
||||
{{ form.range_end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row text-center">
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-outline-primary">Посмотреть статистику</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<ul>
|
||||
{% for error in errors %}
|
||||
<li><span class="badge bg-danger">{{error}}</span></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<ul>
|
||||
{% for warning in warnings %}
|
||||
<li><span class="badge bg-warning">{{warning}}</span></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="container-fluid">
|
||||
<table class="table table-bordered text-center text-secondary mt-5" style="background-color:#f2f2f2;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td scope="col"> </td>
|
||||
{% for date in log_stats.keys %}
|
||||
<td scope="col">{{ date | date:'d.m' }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ form.email.value }}</td>
|
||||
{% for time in log_stats.values %}
|
||||
<td>{{ time | floatformat:2 }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -4,17 +4,22 @@
|
||||
|
||||
{% block title %}{{ pagename }}{% endblock %}
|
||||
|
||||
{% block heading %}Управление{% endblock %}
|
||||
{% block heading %}Управление правами{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link rel="stylesheet" href="{% static 'main/css/work.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'main/css/work.css' %}" xmlns="http://www.w3.org/1999/html">
|
||||
<link rel="stylesheet" href="{% static 'modules/notifications/dist/notifications.css' %}">
|
||||
{% endblock %}
|
||||
{% block extra_scripts %}
|
||||
<script src="{% static 'modules/notifications/dist/notifications.js' %}"></script>
|
||||
<script src="{% static 'main/js/notifications.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container-md">
|
||||
|
||||
<div class="new-section">
|
||||
<p class="row page-description">Основаная информация о странице</p>
|
||||
<p class="row page-description">Свободных Мест: {{ licences_remaining }}</p>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center new-section">
|
||||
@@ -22,25 +27,16 @@
|
||||
<h6 class="table-title">Список сотрудников с правами инженера</h6>
|
||||
<table class="light-table">
|
||||
<thead>
|
||||
<th>ID</th>
|
||||
<th>email</th>
|
||||
<th>Expiration Date</th>
|
||||
<th>Name(link to profile)</th>
|
||||
<th>Email</th>
|
||||
<th>Name</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>big_boss123@example.ru</td>
|
||||
<td>19:30 18.02.21</td>
|
||||
<td><a href="#">Иван Иванов</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>gachi_cool456@example.ru</td>
|
||||
<td>21:00 18.02.21</td>
|
||||
<td><a href="#">Пётр Петров</a></td>
|
||||
</tr>
|
||||
{% for engineer in engineers %}
|
||||
<tr>
|
||||
<td>{{ engineer.email }}</td>
|
||||
<td>{{ engineer.name }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -52,23 +48,33 @@
|
||||
<div class="info-target">инженеров: </div>
|
||||
<div class="info-quantity">
|
||||
<div class="status-circle-small light-green"></div>
|
||||
<span class="info-quantity-value">13</span>
|
||||
<span class="info-quantity-value">{{ engineers|length }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<div class="info-target">легких агентов:</div>
|
||||
<div class="info-quantity">
|
||||
<div class="status-circle-small light-yellow"></div>
|
||||
<span class="info-quantity-value">22</span>
|
||||
<span class="info-quantity-value">{{ agents|length }}</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-5">
|
||||
<button class="request-acess-button default-button">Получить права инженера</button>
|
||||
<button class="hand-over-acess-button default-button">Сдать права инженера</button>
|
||||
<a href="/work/become_engineer" class="request-acess-button default-button">Получить права инженера</a>
|
||||
<a href="/work/hand_over" class="hand-over-acess-button default-button">Сдать права инженера</a>
|
||||
</div>
|
||||
<div class="col-10">
|
||||
<form method="GET" action="/work/get_tickets">
|
||||
<input class="form-control mb-3" type="number" min="1" value="1" name="count_tickets">
|
||||
<button type="submit" class="default-button">Взять тикеты в работу</button>
|
||||
</form>
|
||||
</div>
|
||||
{% for message in messages %}
|
||||
<script>create_notification('{{message}}','','{{message.tags}}',2000)</script>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user