2016-01-04 20:14:09 +00:00
{% extends 'global/master.twig' %}
2015-09-05 16:11:04 +00:00
2016-01-20 23:06:21 +00:00
{% set sorts = [ 'boxes' , 'rectangles' , 'list' ] %}
{% set sort = get .sort in sorts ? get .sort : sorts [ 0 ] %}
{% set notfound = memberlist .active == 0 and get .rank is defined %}
2015-09-07 20:53:47 +00:00
{% set rankTitle %}
2016-01-20 23:06:21 +00:00
{% if notfound %} Not found {% else %} {% if not memberlist .active %} All members {% else %} {{ memberlist .ranks [ memberlist .active ] .name ( true ) }} {% endif %} {% endif %}
2015-09-07 20:53:47 +00:00
{% endset %}
{% set rankDescription %}
2016-01-20 23:06:21 +00:00
{% if notfound %} The requested rank could not be found! {% else %} {% if not memberlist .active %} The entire user list. {% else %} {{ memberlist .ranks [ memberlist .active ] .description }} {% endif %} {% endif %}
2015-09-07 20:53:47 +00:00
{% endset %}
2016-01-20 23:06:21 +00:00
{% set users = memberlist .users | batch ( memberlist .membersPerPage ) %}
2015-11-15 21:43:39 +00:00
{% set currPage = get .page | default ( 1 ) - 1 %}
{% set paginationPages = users %}
2016-01-20 23:06:21 +00:00
{% set paginationUrl %} {% if sort and memberlist .active %} {{ urls .format ( 'MEMBERLIST_ALL' , [ sort , memberlist .active ] ) }} {% elseif sort %} {{ urls .format ( 'MEMBERLIST_SORT' , [ sort ] ) }} {% elseif memberlist .active %} {{ urls .format ( 'MEMBERLIST_RANK' , [ memberlist .active ] ) }} {% else %} {{ urls .format ( 'MEMBERLIST_INDEX' ) }} {% endif %} {% endset %}
2015-11-15 21:43:39 +00:00
2015-09-07 20:53:47 +00:00
{% block title %} {{ rankTitle }} {% endblock %}
2015-09-05 16:11:04 +00:00
{% block content %}
2015-09-07 20:53:47 +00:00
<div class="headerNotify" style="margin-bottom: 1px;">
2016-01-20 23:06:21 +00:00
<h1 style=" {% if memberlist .active %} text-shadow: 0 0 5px {{ memberlist .ranks [ memberlist .active ] .colour }} ; color: {{ memberlist .ranks [ memberlist .active ] .colour }} ; {% else %} text-shadow: 0 0 5px #555; {% endif %} "> {{ rankTitle }} </h1>
2015-09-07 20:53:47 +00:00
<h3> {{ rankDescription }} </h3>
2015-08-21 22:07:45 +00:00
</div>
<div class="membersPage" style="min-height: 500px;">
2015-10-18 19:06:30 +00:00
<div class="dropDown" style="margin: 0 auto; font-size: 1.5em; line-height: 1.5em; height: 30px;">
2015-04-27 21:07:48 +00:00
<div class="dropDownInner" style="float: left; color: #FFF;">
2015-09-05 16:11:04 +00:00
<a class="dropDownDesc">Rank:</a>
2016-01-20 23:06:21 +00:00
<a href=" {% if sort %} {{ urls .format ( 'MEMBERLIST_SORT' , [ sort ] ) }} {% else %} {{ urls .format ( 'MEMBERLIST_INDEX' ) }} {% endif %} " {% if not memberlist .active %} class="dropDownSelected" {% endif %} >All members</a>
{% for rank in memberlist .ranks %}
{% if not rank .hidden or ( rank .hidden and memberlist .active == rank .id ) %}
<a href=" {% if sort %} {{ urls .format ( 'MEMBERLIST_ALL' , [ sort , rank .id ] ) }} {% else %} {{ urls .format ( 'MEMBERLIST_RANK' , [ rank .id ] ) }} {% endif %} " style="color: {{ rank .colour }} ;" {% if memberlist .active == rank .id %} class="dropDownSelected" {% endif %} > {{ rank .name ( true ) }} </a>
2015-08-21 22:07:45 +00:00
{% endif %}
2015-04-27 21:07:48 +00:00
{% endfor %}
2015-09-05 16:11:04 +00:00
</div>
<div class="dropDownInner" style="float: left;">
<a class="dropDownDesc">View:</a>
2016-01-20 23:06:21 +00:00
{% for s in sorts %}
<a href=" {% if memberlist .active %} {{ urls .format ( 'MEMBERLIST_ALL' , [ s , memberlist .active ] ) }} {% else %} {{ urls .format ( 'MEMBERLIST_SORT' , [ s ] ) }} {% endif %} " {% if s == sort %} class="dropDownSelected" {% endif %} > {{ s | capitalize }} </a>
2015-04-27 21:07:48 +00:00
{% endfor %}
2015-09-05 16:11:04 +00:00
</div>
2015-04-27 21:07:48 +00:00
</div>
2015-11-15 21:43:39 +00:00
{% if not users | length %}
2015-09-07 20:53:47 +00:00
<h1 class="stylised" style="margin: 2em 0;">This rank has no members!</h1>
2016-01-20 23:06:21 +00:00
{% elseif not notfound %}
<div class="membersPageList {{ sort }} ">
{% if sort == sorts [ 2 ] %}
2015-09-07 20:53:47 +00:00
<table>
<thead>
<tr>
<th>No.</th>
<th>Username</th>
<th>Registered</th>
<th>Last online</th>
<th>User title</th>
<th>Country</th>
</tr>
</thead>
<tfoot>
<tr>
<th>No.</th>
<th>Username</th>
<th>Registered</th>
<th>Last online</th>
<th>User title</th>
<th>Country</th>
</tr>
</tfoot>
2015-11-15 21:43:39 +00:00
{% for count , user in users [ currPage ] %}
2015-09-07 20:53:47 +00:00
<tbody>
<tr>
<td>
2016-01-20 23:06:21 +00:00
# {{ memberlist .active ? count + 1 : count }}
2015-09-07 20:53:47 +00:00
</td>
<td>
2015-11-07 22:58:02 +00:00
<a href=" {{ urls .format ( 'USER_PROFILE' , [ user .id ] ) }} " class="default" style="font-weight: bold; color: {{ user .colour }} ; text-shadow: 0 0 5px {{ user .colour }} ;"> {{ user .username }} </a>
2015-09-07 20:53:47 +00:00
</td>
2016-02-05 22:03:08 +00:00
<td>
<time> {{ user .registered | date ( sakura .dateFormat ) }} </time>
2015-09-07 20:53:47 +00:00
</td>
2016-02-05 22:03:08 +00:00
<td>
{% if user .lastOnline == 0 %} <i>Never logged in.</i> {% else %} <time> {{ user .lastOnline | date ( sakura .dateFormat ) }} </time> {% endif %}
2015-09-07 20:53:47 +00:00
</td>
<td>
2016-01-20 23:06:21 +00:00
{{ user .title }}
2015-09-07 20:53:47 +00:00
</td>
<td>
2016-01-20 23:06:21 +00:00
<img src=" {{ sakura .contentPath }} /images/flags/ {{ user .country | lower }} .png" alt=" {% if user .country | lower == 'xx' %} ? {% else %} {{ user .country ( true ) }} {% endif %} " title=" {% if user .country | lower == 'xx' %} Unknown {% else %} {{ user .country ( true ) }} {% endif %} " />
2015-09-07 20:53:47 +00:00
</td>
</tr>
</tbody>
{% endfor %}
</table>
{% else %}
2015-11-15 21:43:39 +00:00
{% for user in users [ currPage ] %}
2015-11-07 22:58:02 +00:00
<a href=" {{ urls .format ( 'USER_PROFILE' , [ user .id ] ) }} "> { # These comment tags are here to prevent the link extending too far
#}<div class="userBox" id="u {{ user .id }} "> { #
#}<img src=" {{ sakura .contentPath }} /pixel.png" alt=" {{ user .username }} " style="background: url(' {{ urls .format ( 'IMAGE_AVATAR' , [ user .id ] ) }} ') no-repeat center / contain;" /> { #
2015-10-14 19:35:16 +00:00
#}<span class="userBoxUserName" style="color: {{ user .colour }} ;"> { #
2015-11-07 22:58:02 +00:00
#} {{ user .username }} { #
2015-09-07 20:53:47 +00:00
#}</span> { #
#}</div> { #
#}</a>
{% endfor %}
{% endif %}
</div>
2016-01-20 23:06:21 +00:00
{% if users | length > 1 %}
{% include 'elements/pagination.twig' %}
{% endif %}
2015-04-27 21:07:48 +00:00
{% endif %}
</div>
2015-09-05 16:11:04 +00:00
{% endblock %}