Доработки клиентского интерфейса + мелкие правки
This commit is contained in:
1 parent
c43bcff23f
commit
55078ddb36
21 files changed
+2172
-521
No files matched your search
+68
-26
@@ -1,32 +1,74 @@
|
||||
{% extends 'layout.twig' %}
|
||||
{% import '_icons.twig' as icons %}
|
||||
{% block title %}Диалоги{% endblock %}
|
||||
{% block main %}
|
||||
<h1>Диалоги</h1>
|
||||
{% if isAuthorized %}
|
||||
<div class="page-head">
|
||||
<div class="page-head-icon">{{ icons.chat() }}</div>
|
||||
<div>
|
||||
<h1>Диалоги</h1>
|
||||
<p class="page-subtitle">Личные сообщения с другими пользователями</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>ID</td>
|
||||
<td>Прочитано</td>
|
||||
<td>Непрочитанных</td>
|
||||
<td>С кем диалог</td>
|
||||
<td>Действия</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for dialog in dialogs %}
|
||||
<tr>
|
||||
<td>{{ dialog.id }}</td>
|
||||
<td>{{ dialog.viewed }}</td>
|
||||
<td>{{ dialog.unviewedCount }}</td>
|
||||
<td>{{ dialog.companionData.nameForDisplay }}</td>
|
||||
<td><a href="/dialog/{{ dialog.id }}">Открыть диалог</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% if isAuthorized %}
|
||||
<div class="section">
|
||||
<div class="section-title">
|
||||
<h2>{{ icons.chat() }} Мои диалоги</h2>
|
||||
{% if dialogs is not empty %}<span class="pill">{{ dialogs|length }} шт.</span>{% endif %}
|
||||
</div>
|
||||
|
||||
{% if dialogs is empty %}
|
||||
<div class="empty-state">
|
||||
{{ icons.chat() }}
|
||||
<span>Диалогов пока нет</span>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="table-wrap">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Собеседник</th>
|
||||
<th style="width: 120px;">Статус</th>
|
||||
<th style="width: 110px;">Сообщений</th>
|
||||
<th style="width: 130px;">Непрочитанных</th>
|
||||
<th style="width: 150px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for dialog in dialogs %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="cell-user">
|
||||
<span class="user-avatar">{{ dialog.companionData.nameForDisplay|slice(0, 1)|upper }}</span>
|
||||
<div class="cell-user-meta">
|
||||
<span>{{ dialog.companionData.name }}</span>
|
||||
<span class="cell-user-sub">{{ dialog.companionData.login }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="status {% if dialog.companionOnline %}is-online{% endif %}">
|
||||
<span class="status-dot"></span>
|
||||
{{ dialog.companionOnline ? 'Онлайн' : 'Не в сети' }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ dialog.messagesCount }}</td>
|
||||
<td>
|
||||
{% if dialog.unviewedCount > 0 %}
|
||||
<span class="nav-badge">{{ dialog.unviewedCount }}</span>
|
||||
{% else %}
|
||||
—
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><a class="row-action" href="/dialog/{{ dialog.id }}">{{ icons.chat() }} Открыть</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-error">Вы не авторизованы</div>
|
||||
<div class="alert alert-error">{{ icons.warning() }}<span>Вы не авторизованы</span></div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user