This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/resources/views/yuuno/settings/friends/requests.twig

38 lines
1.7 KiB
Twig
Raw Normal View History

2016-08-02 20:35:12 +00:00
{% extends 'settings/friends/master.twig' %}
2016-12-21 20:00:26 +00:00
{% from 'macros.twig' import pagination %}
{% set friends = user.friends(-1)|batch(12) %}
{% set mode = 'Requests' %}
{% block description %}
<p>Handle friend requests.</p>
{% endblock %}
{% block settingsContent %}
{% if friends|length %}
2016-11-12 01:52:51 +00:00
<div style="text-align: center">
{% for friend in friends[get.page|default(1) - 1] %}
2016-11-12 01:52:51 +00:00
<div class="friend-box" id="friend-{{ friend.id }}">
<a class="friend-box__container" href="{{ route('user.profile', friend.id) }}">
<div class="friend-box__avatar avatar avatar--border" style="background-image: url('{{ route('user.avatar', friend.id) }}')"></div>
<div class="friend-box__name" style="color: {{ friend.colour }};">{{ friend.username }}</div>
</a>
2016-11-12 01:52:51 +00:00
<div class="friend-box__actions">
<a class="friend-box__action friend-box__action--green fa fa-check" title="Add friend" href="javascript:void(0);" onclick="Sakura.Friend.Add({{ friend.id }});"></a>
<a class="friend-box__action friend-box__action--red fa fa-remove" title="Remove friend" href="javascript:void(0);" onclick="Sakura.Friend.Remove({{ friend.id }});"></a>
</div>
</div>
{% endfor %}
<div class="clear"></div>
</div>
{% if friends|length > 1 %}
<div>
2016-12-21 20:00:26 +00:00
{{ pagination(route('settings.friends.requests'), friends, get.page|default(1)) }}
</div>
{% endif %}
{% else %}
2016-11-08 19:56:37 +00:00
<h1 style="margin: 2em auto; text-align: center;">You don't have any pending requests!</h1>
{% endif %}
{% endblock %}