Big commit
This commit is contained in:
parent
7ee70b3966
commit
31072687c8
19 changed files with 425 additions and 138 deletions
_sakura/templates/yuuno/settings
52
_sakura/templates/yuuno/settings/friendrequests.tpl
Normal file
52
_sakura/templates/yuuno/settings/friendrequests.tpl
Normal file
|
@ -0,0 +1,52 @@
|
|||
{% include 'global/header.tpl' %}
|
||||
<div class="content settings">
|
||||
<div class="content-right content-column">
|
||||
{% include 'elements/settingsNav.tpl' %}
|
||||
</div>
|
||||
<div class="content-left content-column">
|
||||
<div class="head">
|
||||
{{ page.title }}
|
||||
</div>
|
||||
<div class="settings-explanation">
|
||||
<div>Handle friend requests.</div>
|
||||
</div>
|
||||
{% if friends|length %}
|
||||
<div class="friends-list">
|
||||
{% for friend in friends[page.currentPage] %}
|
||||
<div class="friend-container" id="friend-{{ friend.user.id }}">
|
||||
<a class="friends-list-data clean" href="/u/{{ friend.user.id }}">
|
||||
<img src="/a/{{ friend.user.id }}" alt="{{ friend.user.username }}" class="friends-list-avatar default-avatar-setting" style="width: 150px; height: 150px;" />
|
||||
<div class="friends-list-name" style="color: {% if friend.user.name_colour %}{{ friend.user.name_colour }}{% else %}{{ friend.rank.colour }}{% endif %};">{{ friend.user.username }}</div>
|
||||
</a>
|
||||
<div class="friends-list-actions">
|
||||
<a class="add fa fa-check" title="Add friend" href="//{{ sakura.urls.main }}/friends?add={{ friend.user.id }}&session={{ php.sessionid }}&time={{ php.time }}&redirect=//{{ sakura.urls.main }}/settings/friendrequests&direct=true"></a>
|
||||
<a class="remove fa fa-remove" title="Remove friend" href="//{{ sakura.urls.main }}/friends?remove={{ friend.user.id }}&session={{ php.sessionid }}&time={{ php.time }}&redirect=//{{ sakura.urls.main }}/settings/friendrequests&direct=true"></a>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{% if friends|length > 1 %}
|
||||
<div>
|
||||
<div class="pagination" style="float: right;">
|
||||
{% if page.currentPage > 0 %}
|
||||
<a href="/settings/friends/p{{ page.currentPage }}"><span class="fa fa-step-backward"></span></a>
|
||||
{% endif %}
|
||||
{% for id,npage in friends %}
|
||||
<a href="/settings/friends/p{{ id + 1 }}"{% if id == page.currentPage %} class="current"{% endif %}>{{ id + 1 }}</a>
|
||||
{% endfor %}
|
||||
{% if page.currentPage + 1 < friends|length %}
|
||||
<a href="/settings/friends/p{{ page.currentPage + 2 }}"><span class="fa fa-step-forward"></span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<h1 class="stylised" style="margin: 2em auto; text-align: center;">You don't have any pending requests!</h1>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{% include 'global/footer.tpl' %}
|
|
@ -1,5 +1,5 @@
|
|||
{% include 'global/header.tpl' %}
|
||||
<div class="content settings messages">
|
||||
<div class="content settings">
|
||||
<div class="content-right content-column">
|
||||
{% include 'elements/settingsNav.tpl' %}
|
||||
</div>
|
||||
|
@ -10,7 +10,41 @@
|
|||
<div class="settings-explanation">
|
||||
<div>Manage your friends.</div>
|
||||
</div>
|
||||
|
||||
{% if friends|length %}
|
||||
<div class="friends-list">
|
||||
{% for friend in friends[page.currentPage] %}
|
||||
<div class="friend-container" id="friend-{{ friend.user.id }}">
|
||||
<a class="friends-list-data clean" href="/u/{{ friend.user.id }}">
|
||||
<img src="/a/{{ friend.user.id }}" alt="{{ friend.user.username }}" class="friends-list-avatar default-avatar-setting" style="width: 150px; height: 150px;" />
|
||||
<div class="friends-list-name" style="color: {% if friend.user.name_colour %}{{ friend.user.name_colour }}{% else %}{{ friend.rank.colour }}{% endif %};">{{ friend.user.username }}</div>
|
||||
</a>
|
||||
<div class="friends-list-actions">
|
||||
<a class="remove fill fa fa-remove" title="Remove friend" href="//{{ sakura.urls.main }}/friends?remove={{ friend.user.id }}&session={{ php.sessionid }}&time={{ php.time }}&redirect=//{{ sakura.urls.main }}/settings/friends&direct=true"></a>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{% if friends|length > 1 %}
|
||||
<div>
|
||||
<div class="pagination" style="float: right;">
|
||||
{% if page.currentPage > 0 %}
|
||||
<a href="/settings/friends/p{{ page.currentPage }}"><span class="fa fa-step-backward"></span></a>
|
||||
{% endif %}
|
||||
{% for id,npage in friends %}
|
||||
<a href="/settings/friends/p{{ id + 1 }}"{% if id == page.currentPage %} class="current"{% endif %}>{{ id + 1 }}</a>
|
||||
{% endfor %}
|
||||
{% if page.currentPage + 1 < friends|length %}
|
||||
<a href="/settings/friends/p{{ page.currentPage + 2 }}"><span class="fa fa-step-forward"></span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<h1 class="stylised" style="margin: 2em auto; text-align: center;">You don't have any friends yet!</h1>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
This is the history of notifications that have been sent to you.
|
||||
</div>
|
||||
<div class="notification-history">
|
||||
{% for notif in notifs %}
|
||||
<div id="notif-hist-{{ notif.id }}" class="{% if notif.notif_read %}read{% endif %}">
|
||||
{% for notif in notifs[page.currentPage] %}
|
||||
<a id="notif-hist-{{ notif.id }}" class="clean {% if notif.notif_read %}read{% endif %}"{% if notif.notif_link %} href="{{ notif.notif_link }}"{% endif %}>
|
||||
<div class="notif-hist-icon">
|
||||
{% if 'FONT:' in notif.notif_img %}
|
||||
<div class="font-icon fa {{ notif.notif_img|replace({'FONT:': ''}) }} fa-4x"></div>
|
||||
|
@ -21,25 +21,38 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
<div class="notif-hist-content">
|
||||
<div class="notif-hist-time">
|
||||
{{ notif.timestamp|date("r") }}
|
||||
</div>
|
||||
<div class="notif-hist-inside">
|
||||
<div class="notif-hist-title">
|
||||
{{ notif.notif_title }}
|
||||
</div>
|
||||
<div class="notif-hist-text">
|
||||
{{ notif.notif_text }}
|
||||
{% if notif.notif_link %}
|
||||
| <a href="{{ notif.notif_link }}" class="default">Go</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="notif-hist-time">
|
||||
{{ notif.timestamp|date(sakura.date_format) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if notifs|length > 1 %}
|
||||
<div>
|
||||
<div class="pagination" style="float: right;">
|
||||
{% if page.currentPage > 0 %}
|
||||
<a href="/settings/notifications/p{{ page.currentPage }}"><span class="fa fa-step-backward"></span></a>
|
||||
{% endif %}
|
||||
{% for id,npage in notifs %}
|
||||
<a href="/settings/notifications/p{{ id + 1 }}"{% if id == page.currentPage %} class="current"{% endif %}>{{ id + 1 }}</a>
|
||||
{% endfor %}
|
||||
{% if page.currentPage + 1 < notifs|length %}
|
||||
<a href="/settings/notifications/p{{ page.currentPage + 2 }}"><span class="fa fa-step-forward"></span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
|
Reference in a new issue