Files
yaric359/templates/pages/enterprises/details.html
2019-01-08 16:09:15 +05:00

266 lines
7.3 KiB
HTML

{% extends 'base.html' %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-4">Код</div>
<div class="col-8">{{ ent.contact_info.code }}</div>
</div>
<div class="row">
<div class="col-4">Имя</div>
<div class="col-8">{{ ent.contact_info.code }}</div>
</div>
<div class="row">
<div class="col-4">Краткое имя</div>
<div class="col-8">{{ ent.contact_info.short_name }}</div>
</div>
<div class="row">
<div class="col-4">Email</div>
<div class="col-8">{{ ent.contact_info.email }}</div>
</div>
<div class="row">
<h6>Отделы</h6>
<table class="table">
<thead>
<tr>
<th scope="col">
Id
</th>
<th scope="col">
Код
</th>
<th scope="col">
Имя
</th>
<th scope="col">
Краткое имя
</th>
<th scope="col">
Email
</th>
<th scope="col">
</th>
</tr>
</thead>
<tbody>
{% for item in ent.divisions %}
<tr>
<th scope="row">
{{ item.id }}
</th>
<td>
{{ item.contact_info.code }}
</td>
<td>
{{ item.contact_info.name }}
</td>
<td>
{{ item.contact_info.short_name }}
</td>
<td>
{{ item.contact_info.email }}
</td>
<td>
<a href="{{ url_for('division_details', div_id=item.id) }}">Детали</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="row">
<h6>Руководители</h6>
<table class="table">
<thead>
<tr>
<th scope="col">
Id
</th>
<th scope="col">
Фамилия
</th>
<th scope="col">
Имя
</th>
<th scope="col">
Отчество
</th>
<th scope="col">
Дата заступления
</th>
<th scope="col">
Дата снятия
</th>
<th scope="col">
</th>
</tr>
</thead>
<tbody>
{% for item in ent.contact_info.head %}
<tr>
<th scope="row">
{{ item.id }}
</th>
<td>
{{ item.last_name }}
</td>
<td>
{{ item.first_name }}
</td>
<td>
{{ item.second_name }}
</td>
<td>
{{ item.date_of_start }}
</td>
<td>
{% if not item.date_of_end %}
---
{% else %}
{{ item.date_of_end }}
{% endif %}
</td>
<td>
{% if not item.date_of_end %}
<b>Активен</b>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="row">
<h6>Телефоны</h6>
<table class="table">
<thead>
<tr>
<th scope="col">
Id
</th>
<th scope="col">
Номер
</th>
<th scope="col">
Дата заступления
</th>
<th scope="col">
Дата снятия
</th>
<th scope="col">
</th>
</tr>
</thead>
<tbody>
{% for item in ent.contact_info.phone_numbers %}
<tr>
<th scope="row">
{{ item.id }}
</th>
<td>
{{ item.number }}
</td>
<td>
{{ item.date_of_start }}
</td>
<td>
{% if not item.date_of_end %}
---
{% else %}
{{ item.date_of_end }}
{% endif %}
</td>
<td>
{% if not item.date_of_end %}
<b>Активен</b>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="row">
<h6>Местоположения</h6>
<table class="table">
<thead>
<tr>
<th scope="col">
Id
</th>
<th scope="col">
Страна
</th>
<th scope="col">
Город
</th>
<th scope="col">
Улица
</th>
<th scope="col">
Здание
</th>
<th scope="col">
Комната
</th>
<th scope="col">
Дата заступления
</th>
<th scope="col">
Дата снятия
</th>
<th scope="col">
</th>
</tr>
</thead>
<tbody>
{% for item in ent.contact_info.locations %}
<tr>
<th scope="row">
{{ item.id }}
</th>
<td>
{{ item.country }}
</td>
<td>
{{ item.city }}
</td>
<td>
{{ item.street }}
</td>
<td>
{{ item.house }}
</td>
<td>
{{ item.room }}
</td>
<td>
{{ item.date_of_start }}
</td>
<td>
{% if not item.date_of_end %}
---
{% else %}
{{ item.date_of_end }}
{% endif %}
</td>
<td>
{% if not item.date_of_end %}
<b>Активен</b>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}