Fix optimer, timerboard and corpstats

This commit is contained in:
ErikKalkoken 2020-02-15 23:26:22 +01:00
parent 55a5070691
commit 8771477884
3 changed files with 538 additions and 517 deletions

View File

@ -7,11 +7,12 @@
<div class="col-lg-12 text-center"> <div class="col-lg-12 text-center">
<table class="table"> <table class="table">
<tr> <tr>
<td class="text-center col-lg-6 <td class="text-center col-lg-6{% if corpstats.corp.alliance %}{% else %}col-lg-offset-3{% endif %}">
{% if corpstats.corp.alliance %}{% else %}col-lg-offset-3{% endif %}"><img <img class="ra-avatar" src="{{ corpstats.corp.logo_url_64 }}">
class="ra-avatar" src="{{ corpstats.corp.logo_url_128 }}"></td> </td>
{% if corpstats.corp.alliance %} {% if corpstats.corp.alliance %}
<td class="text-center col-lg-6"><img class="ra-avatar" src="{{ corpstats.corp.alliance.logo_url_128 }}"> <td class="text-center col-lg-6">
<img class="ra-avatar" src="{{ corpstats.corp.alliance.logo_url_64 }}">
</td> </td>
{% endif %} {% endif %}
</tr> </tr>
@ -33,8 +34,8 @@
<li><a href="#members" data-toggle="pill">{% trans 'Members' %} ({{ corpstats.member_count }})</a></li> <li><a href="#members" data-toggle="pill">{% trans 'Members' %} ({{ corpstats.member_count }})</a></li>
<li><a href="#unregistered" data-toggle="pill">{% trans 'Unregistered' %} ({{ unregistered.count }})</a></li> <li><a href="#unregistered" data-toggle="pill">{% trans 'Unregistered' %} ({{ unregistered.count }})</a></li>
</ul> </ul>
<div class="pull-right"> <div class="pull-right hidden-xs">
{% trans "Last update:" %} {{ corpstats.last_update|naturaltime }} {% trans "Last update:" %} {{ corpstats.last_update|naturaltime }}&nbsp;
<a class="btn btn-success" type="button" href="{% url 'corputils:update' corpstats.corp.corporation_id %}" title="Update Now"> <a class="btn btn-success" type="button" href="{% url 'corputils:update' corpstats.corp.corporation_id %}" title="Update Now">
<span class="glyphicon glyphicon-refresh"></span> <span class="glyphicon glyphicon-refresh"></span>
</a> </a>

View File

@ -2,6 +2,7 @@
{% load evelinks %} {% load evelinks %}
{% block content %} {% block content %}
<div class="table-responsive">
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
@ -42,4 +43,5 @@
</tbody> </tbody>
{% endfor %} {% endfor %}
</table> </table>
</div>
{% endblock content %} {% endblock content %}

View File

@ -12,7 +12,9 @@
<h1 class="page-header text-center">{% trans "Structure Timers" %} <h1 class="page-header text-center">{% trans "Structure Timers" %}
<div class="text-right"> <div class="text-right">
{% if perms.auth.timer_management %} {% if perms.auth.timer_management %}
<a href="{% url 'timerboard:add' %}" class="btn btn-success">{% trans "Create Structure Timer" %}</a> <a href="{% url 'timerboard:add' %}" class="btn btn-success">
{% trans "Create Structure Timer" %}
</a>
{% endif %} {% endif %}
</div> </div>
</h1> </h1>
@ -24,6 +26,7 @@
</div> </div>
{% if corp_timers %} {% if corp_timers %}
<h4><b>{% trans "Corp Timers" %}</b></h4> <h4><b>{% trans "Corp Timers" %}</b></h4>
<div class="table-responsive">
<table class="table"> <table class="table">
<tr> <tr>
<th style="width:150px" class="text-center">{% trans "Details" %}</th> <th style="width:150px" class="text-center">{% trans "Details" %}</th>
@ -61,8 +64,9 @@
</div> </div>
{% endif %} {% endif %}
</td> </td>
<td class="text-center"><a <td class="text-center"><a href="{{ timer.system|dotlan_solar_system_url }}">
href="{{ timer.system|dotlan_solar_system_url }}">{{ timer.system }} {{ timer.planet_moon }} </a> {{ timer.system }} {{ timer.planet_moon }}
</a>
</td> </td>
<td class="text-center"> <td class="text-center">
{% if timer.structure == "POCO" %} {% if timer.structure == "POCO" %}
@ -180,9 +184,11 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
</div>
{% endif %} {% endif %}
<h4><b>{% trans "Next Timers" %}</b></h4> <h4><b>{% trans "Next Timers" %}</b></h4>
{% if future_timers %} {% if future_timers %}
<div class="table-responsive">
<table class="table"> <table class="table">
<tr> <tr>
<th style="width:150px" class="text-center">{% trans "Details" %}</th> <th style="width:150px" class="text-center">{% trans "Details" %}</th>
@ -221,7 +227,9 @@
{% endif %} {% endif %}
</td> </td>
<td class="text-center"> <td class="text-center">
<a href="{{ timer.system|dotlan_solar_system_url }}">{{ timer.system }} {{ timer.planet_moon }}</a> <a href="{{ timer.system|dotlan_solar_system_url }}">
{{ timer.system }} {{ timer.planet_moon }}
</a>
</td> </td>
<td class="text-center"> <td class="text-center">
{% if timer.structure == "POCO" %} {% if timer.structure == "POCO" %}
@ -339,11 +347,16 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
</div>
{% else %} {% else %}
<div class="alert alert-warning text-center">{% trans "No upcoming timers." %}</div> <div class="alert alert-warning text-center">
{% trans "No upcoming timers." %}
</div>
{% endif %} {% endif %}
<h4><b>{% trans "Past Timers" %}</b></h4> <h4><b>{% trans "Past Timers" %}</b></h4>
{% if past_timers %} {% if past_timers %}
<div class="table-responsive">
<table class="table"> <table class="table">
<tr> <tr>
<th style="width:150px" class="text-center">{% trans "Details" %}</th> <th style="width:150px" class="text-center">{% trans "Details" %}</th>
@ -382,7 +395,9 @@
{% endif %} {% endif %}
</td> </td>
<td class="text-center"> <td class="text-center">
<a href="{{ timer.system|dotlan_solar_system_url }}">{{ timer.system }} {{ timer.planet_moon }}</a> <a href="{{ timer.system|dotlan_solar_system_url }}">
{{ timer.system }} {{ timer.planet_moon }}
</a>
</td> </td>
<td class="text-center"> <td class="text-center">
{% if timer.structure == "POCO" %} {% if timer.structure == "POCO" %}
@ -500,8 +515,11 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
</div>
{% else %} {% else %}
<div class="alert alert-warning text-center">{% trans "No past timers." %}</div> <div class="alert alert-warning text-center">
{% trans "No past timers." %}
</div>
{% endif %} {% endif %}
</div> </div>