forked from pwgen2155/dawdle
54 lines
2.2 KiB
HTML
54 lines
2.2 KiB
HTML
{% extends "dawdle/base.html" %}
|
|
{% load static %}
|
|
{% load duration %}
|
|
{% load alignment %}
|
|
{% load split %}
|
|
{% load lvlsum %}
|
|
{% block content %}
|
|
<div class="contentbox">
|
|
<h1>Players</h1>
|
|
|
|
<table id="playerlist">
|
|
<thead>
|
|
<tr><td>Rank</td><td style="width:30rem">Name</td><td>Time to next level</td><td>IRC User</td><td>Level Total</td></tr>
|
|
</thead><tbody>
|
|
{% for p in object_list %}
|
|
<tr class="{%if p.online %}online{% else %}offline{% endif %}">
|
|
<td style="text-align:right">#{{forloop.counter}}</td>
|
|
<td><img style="height: 0.7em; width: 0.7em"
|
|
src="{% if p.online %}
|
|
{% static 'dawdle/Blue_sphere.svg' %}
|
|
{% else %}
|
|
{% static 'dawdle/Gray_sphere.svg' %}
|
|
{% endif %}"
|
|
alt="{% if p.online %}
|
|
On
|
|
{% else %}
|
|
Off
|
|
{% endif %}">
|
|
<a href="{% url 'dawdle:player-detail' p.name %}">{{p.name}},
|
|
the <span class="{{p.alignment|alignment}}-align">{{p.alignment|alignment}}</span>
|
|
level {{p.level}} {{p.cclass}}</a>
|
|
</td>
|
|
<td style="text-align: right"2>{{p.nextlvl|duration}}</td>
|
|
<td><i>{{ p.userhost|split:"!"|first}}</i></td>
|
|
<td style="text-align: right"2>{{p.item_set | lvlsum}}</td>
|
|
{#{% for i in p.item_set.aggregate(Sum('level'))['level__sum'] %}#}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody></table>
|
|
|
|
<div id="pmap-container">
|
|
<img id="pmap" src="{% url 'dawdle:map' %}" alt="Player Map" usemap="#playermap">
|
|
</div>
|
|
<map name="playermap">
|
|
{% for p in object_list %}
|
|
<area shape="circle"
|
|
coords="{{p.posx}},{{p.posy}},3"
|
|
alt="{{p.name}}"
|
|
href="{% url 'dawdle:player-detail' p.name %}">
|
|
{% endfor %}
|
|
</map>
|
|
</div>
|
|
{% endblock %}
|