notifications
This commit is contained in:
@@ -23,22 +23,22 @@
|
||||
<div class="col-9">
|
||||
<h3>
|
||||
{{ account.userinfo.surname }} {{ account.userinfo.name }}
|
||||
<span style="margin-left: 15px;" class="badge badge-{% if account.userinfo.activity_status == online_status %}success{% else %}secondary{% endif %}">{{ account.userinfo.activity_status }}</span>
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="action" value="friendship">
|
||||
{% if not owner %}
|
||||
{% if friendship_status == 0 %}
|
||||
<button type="submit" class="btn btn-primary" name="to_do" value="add">Добавить в друзья</button>
|
||||
{% else %}{% if friendship_status == 1 %}
|
||||
<button class="btn btn-success"><i class="fa fa-check"></i> Друзья</button> <button class="btn btn-danger" type="submit" name="to_do" value="delete"><i class="fa fa-times"></i> Удалить</button>
|
||||
{% else %}{% if friendship_status == 2 %}
|
||||
<button class="btn btn-info">Приглашение отправлено</button> <button class="btn btn-danger" type="submit" name="to_do" value="delete">Отменить</button>
|
||||
{% else %}
|
||||
<button class="btn btn-info" type="submit" name="to_do" value="yes">Принять</button> <button class="btn btn-danger" type="submit" name="to_do" value="no">Отклонить</button>
|
||||
{% endif %}{% endif %}{% endif %}
|
||||
{% endif %}
|
||||
</form>
|
||||
<span style="margin-left: 15px; margin-bottom: 20px;" class="badge badge-{% if account.userinfo.activity_status == online_status %}success{% else %}secondary{% endif %}">{{ account.userinfo.activity_status }}</span>
|
||||
{% if not owner %}
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="action" value="friendship">
|
||||
{% if friendship_status == 0 %}
|
||||
<button type="submit" class="btn btn-primary" name="to_do" value="add">Добавить в друзья</button>
|
||||
{% else %}{% if friendship_status == 1 %}
|
||||
<button class="btn btn-success"><i class="fa fa-check"></i> Друзья</button> <button class="btn btn-danger" type="submit" name="to_do" value="delete"><i class="fa fa-times"></i> Удалить</button>
|
||||
{% else %}{% if friendship_status == 2 %}
|
||||
<button class="btn btn-info">Приглашение отправлено</button> <button class="btn btn-danger" type="submit" name="to_do" value="delete">Отменить</button>
|
||||
{% else %}
|
||||
<button class="btn btn-info" type="submit" name="to_do" value="yes">Принять</button> <button class="btn btn-danger" type="submit" name="to_do" value="no">Отклонить</button>
|
||||
{% endif %}{% endif %}{% endif %}
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if user.is_superuser and owner %}
|
||||
<a style="margin-left: 15px;" href="/admin/" class="badge badge-secondary">Админ</a>
|
||||
{% endif %}
|
||||
@@ -125,9 +125,24 @@
|
||||
<input type="checkbox" name="notification_solution_result" {% if user.userinfo.notification_solution_result %}checked{% endif %}>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 200px;">
|
||||
Заявки в друзья
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="notification_friends" {% if user.userinfo.notification_friends %}checked{% endif %}>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<button type="submit" class="btn btn-light" style="margin-top: 15px;"><i class="fa fa-save"></i> Сохранить</button>
|
||||
|
||||
</form>
|
||||
<hr><hr>
|
||||
<h2 style="margin-bottom: 20px;">Друзья</h2>
|
||||
<h5>
|
||||
{% for friendship in user.userinfo.friends %}
|
||||
<i class="fa fa-user"></i> <a href="/account?username={% if friendship.to_user == user %}{{ friendship.from_user.username }}{% else %}{{ friendship.to_user.username }}{% endif %}">{% if friendship.to_user == user %}{{ friendship.from_user.username }}{% else %}{{ friendship.to_user.username }}{% endif %}</a><br>
|
||||
{% endfor %}
|
||||
</h5>
|
||||
{% endif %}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user