2021-05-26 15:34:28 +03:00

61 lines
1.8 KiB
HTML

{% extends 'base/base.html' %}
{% load static %}
{% block title %}{{ pagename }}{% endblock %}
{% block heading %}<h1>Профиль</h1>{% endblock %}
{% block extra_css %}
<style>
.img {
width:auto;
height:auto;
max-width:100px!important;
max-height:100px!important;
}
</style>
{% endblock %}
{% block content %}
<br>
<div class="row px-4 py-4">
<div class="col-auto px-4 py-4">
<div class="container">
<img
src="{% if profile.image %}{{ profile.image }}{% else %}{% static 'no_avatar.png' %}{% endif %}"
class="img img-thumbnail"
alt="Нет изображения"
>
</div>
<div class="px-3 py-5">
<a href="{%url 'password_change' %}" class="btn btn-light px-1 py-1">Сменить пароль</a>
</div>
</div>
<div class="col">
<h4><span class="badge bg-secondary text-light">Имя пользователя</span></h4> <h5><strong>{{ profile.name }}</strong></h5>
<br>
<h4><span class="badge bg-secondary text-light">Электронная почта</span></h4> <h5><strong>{{ profile.user.email }}</strong></h5>
<br>
<h4><span class="badge bg-secondary text-light">Текущая роль</span> </h4>
{% if profile.custom_role_id == ZENDESK_ROLES.engineer %}
<h5><strong>engineer</strong></h5>
{% elif profile.custom_role_id == ZENDESK_ROLES.light_agent %}
<h5><strong>light_agent</strong></h5>
{% else %}
<h5><strong><small class="text-muted">Без роли</small></strong></h5>
{% endif %}
</div>
</div>
<br>
<div align="center" >
<form action="">
<a href="{% url 'work' profile.user.id %}" class="btn btn-primary btn-lg px-3 py-3">Запросить права доступа</a>
</form>
</div>
{% endblock %}