mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-21 02:08:59 +02:00
* Added German Translations Translated using https://docs.djangoproject.com/en/1.9/topics/i18n/translation/ Added language drop down menu's for base.html, registration & login pages Known issues: * Translated items in whtracker>create signature remain translated when posted * No date/time localisation for Fleet/Structure timers * Added time locale Added date/time locale to *Structure Timers *Fleet Timers *Fleet timer form datetimepicker.js Fixed a bug where the bootstrap label didn't show up when making a structure timer using the translated form Missed some base.html translations * Small translation error Some obscure SRP strings went unnoticed for context review * FAT & Fleet-up German Translations + a fix in settings.py.example The only small thing not done is German Date/Time locale for Fleet-up * Compiled de/django.po
395 lines
19 KiB
HTML
Executable File
395 lines
19 KiB
HTML
Executable File
{% extends "public/base.html" %}
|
|
{% load staticfiles %}
|
|
{% load i18n %}
|
|
{% get_current_language as LANGUAGE_CODE %}
|
|
|
|
{% block title %}Alliance Auth{% endblock %}
|
|
|
|
{% block page_title %}{% trans "Structure Timer Management" %}{% endblock page_title %}
|
|
{% block extra_css %}{% endblock extra_css %}
|
|
|
|
{% block content %}
|
|
<div class="col-lg-12">
|
|
<h1 class="page-header text-center">{% trans "Structure Timers" %}
|
|
<div class="text-right">
|
|
<a href="{% url 'auth_add_timer_view' %}">
|
|
{% if perms.auth.timer_management %}
|
|
<button type="button" class="btn btn-success">{% trans "Create Structure Timer" %}</button>
|
|
{% endif %}
|
|
</a>
|
|
</div>
|
|
</h1>
|
|
<div class="col-lg-12 text-center">
|
|
<div class="label label-info text-left">
|
|
<b>{% trans "Current Eve Time:" %} </b>
|
|
</div><div class="label label-info text-left" id="current-time"></div>
|
|
</div>
|
|
<h4><b>{% trans "Next Timer" %}</b></h4>
|
|
<table class="table table-responsive table-bordered">
|
|
<tr>
|
|
<th style="width:150px" class="text-center">{% trans "Details" %}</th>
|
|
<th class="text-center">{% trans "Objective" %}</th>
|
|
<th class="text-center">{% trans "System" %}</th>
|
|
<th class="text-center">{% trans "Structure" %}</th>
|
|
<th class="text-center">{% trans "Eve Time" %}</th>
|
|
<th class="text-center">{% trans "Local Time" %}</th>
|
|
<th class="text-center">{% trans "Creator" %}</th>
|
|
{% if perms.auth.timer_management %}
|
|
<th class="text-center">{% trans "Action" %}</th>
|
|
{% endif %}
|
|
</tr>
|
|
{% if closest_timer %}
|
|
{% ifequal closest_timer.important True %}
|
|
<tr class="danger">
|
|
{% else %}
|
|
<tr class="info">
|
|
{% endifequal %}
|
|
<td style="width:150px" class="text-center">{{ closest_timer.details }}</td>
|
|
<td class="text-center">
|
|
{% ifequal closest_timer.objective "Hostile" %}
|
|
<div class="label label-danger">
|
|
{% trans "Hostile" %}
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal closest_timer.objective "Friendly" %}
|
|
<div class="label label-primary">
|
|
{% trans "Friendly" %}
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal closest_timer.objective "Neutral" %}
|
|
<div class="label label-default">
|
|
{% trans "Neutral" %}
|
|
</div>
|
|
{% endifequal %}
|
|
</td>
|
|
<td class="text-center"><a
|
|
href="http://evemaps.dotlan.net/system/{{ closest_timer.system }}">{{ closest_timer.system }} {{ closest_timer.planet_moon }} </a>
|
|
</td>
|
|
<td class="text-center">
|
|
{% ifequal closest_timer.structure "I-HUB" %}
|
|
<div class="label label-warning">
|
|
I-HUB
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal closest_timer.structure "POCO" %}
|
|
<div class="label label-success">
|
|
POCO
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal closest_timer.structure "POS[S]" %}
|
|
<div class="label label-info">
|
|
POS [S]
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal closest_timer.structure "POS[M]" %}
|
|
<div class="label label-info">
|
|
POS [M]
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal closest_timer.structure "POS[L]" %}
|
|
<div class="label label-info">
|
|
POS [L]
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal closest_timer.structure "Station" %}
|
|
<div class="label label-danger">
|
|
Station
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal closest_timer.structure "TCU" %}
|
|
<div class="label label-danger">
|
|
TCU
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal closest_timer.structure "Other" %}
|
|
<div class="label label-default">
|
|
Other
|
|
</div>
|
|
{% endifequal %}
|
|
</td>
|
|
<td class="text-center" nowrap>{{ closest_timer.eve_time | date:"Y-m-d H:i" }}</td>
|
|
<td id="countdownclosest" class="text-center" nowrap></td>
|
|
<td class="text-center">{{ closest_timer.eve_character.character_name }}</td>
|
|
{% if perms.auth.timer_management %}
|
|
<td class="text-center">
|
|
<a href="/remove_timer/{{ closest_timer.id }}">
|
|
<button type="button" class="btn btn-danger"><span
|
|
class="glyphicon glyphicon-remove"></span></button>
|
|
</a>
|
|
<a href="/edit_timer/{{ closest_timer.id }}">
|
|
<button type="button" class="btn btn-info"><span
|
|
class="glyphicon glyphicon-pencil"></span></button>
|
|
</a>
|
|
</td>
|
|
{% endif %}
|
|
{% endif %}
|
|
</tr>
|
|
</table>
|
|
{% if corp_timers %}
|
|
<h4><b>{% trans "Corp Timers" %}</b></h4>
|
|
<table class="table table-bordered">
|
|
<tr>
|
|
<th style="width:150px" class="text-center">{% trans "Details" %}</th>
|
|
<th class="text-center">{% trans "Objective" %}</th>
|
|
<th class="text-center">{% trans "System" %}</th>
|
|
<th class="text-center">{% trans "Structure" %}</th>
|
|
<th class="text-center">{% trans "Eve Time" %}</th>
|
|
<th class="text-center">{% trans "Local Time" %}</th>
|
|
<th class="text-center">{% trans "Creator" %}</th>
|
|
{% if perms.auth.timer_management %}
|
|
<th class="text-center">{% trans "Action" %}</th>
|
|
{% endif %}
|
|
</tr>
|
|
{% for timer in corp_timers %}
|
|
{% ifequal timer.important True %}
|
|
<tr class="danger">
|
|
{% else %}
|
|
<tr class="info">
|
|
{% endifequal %}
|
|
<td style="width:150px" class="text-center">{{ timer.details }}</td>
|
|
<td class="text-center">
|
|
{% ifequal timer.objective "Hostile" %}
|
|
<div class="label label-danger">
|
|
{% trans "Hostile" %}
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.objective "Friendly" %}
|
|
<div class="label label-primary">
|
|
{% trans "Friendly" %}
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.objective "Neutral" %}
|
|
<div class="label label-default">
|
|
{% trans "Neutral" %}
|
|
</div>
|
|
{% endifequal %}
|
|
</td>
|
|
<td class="text-center"><a
|
|
href="http://evemaps.dotlan.net/system/{{ timer.system }}">{{ timer.system }} {{ timer.planet_moon }} </a>
|
|
</td>
|
|
<td class="text-center">
|
|
{% ifequal timer.structure "I-HUB" %}
|
|
<div class="label label-warning">
|
|
I-HUB
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.structure "POCO" %}
|
|
<div class="label label-success">
|
|
POCO
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.structure "POS[S]" %}
|
|
<div class="label label-info">
|
|
POS [S]
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.structure "POS[M]" %}
|
|
<div class="label label-info">
|
|
POS [M]
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.structure "POS[L]" %}
|
|
<div class="label label-info">
|
|
POS [L]
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.structure "Station" %}
|
|
<div class="label label-danger">
|
|
Station
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.structure "TCU" %}
|
|
<div class="label label-danger">
|
|
TCU
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.structure "Other" %}
|
|
<div class="label label-default">
|
|
Other
|
|
</div>
|
|
{% endifequal %}
|
|
</td>
|
|
<td class="text-center" nowrap>{{ timer.eve_time | date:"Y-m-d H:i" }}</td>
|
|
<td class="text-center" nowrap><div id="countdownCorp{{ timer.id }}"></div></td>
|
|
<td class="text-center">{{ timer.eve_character.character_name }}</td>
|
|
{% if perms.auth.timer_management %}
|
|
<td class="text-center">
|
|
<a href="/remove_timer/{{ timer.id }}">
|
|
<button type="button" class="btn btn-danger"><span
|
|
class="glyphicon glyphicon-remove"></span></button>
|
|
</a>
|
|
<a href="/edit_timer/{{ timer.id }}">
|
|
<button type="button" class="btn btn-info"><span
|
|
class="glyphicon glyphicon-pencil"></span></button>
|
|
</a>
|
|
</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
<h4><b>{% trans "Future Timers" %}</b></h4>
|
|
<table class="table table-bordered">
|
|
<tr>
|
|
<th style="width:150px" class="text-center">{% trans "Details" %}</th>
|
|
<th class="text-center">{% trans "Objective" %}</th>
|
|
<th class="text-center">{% trans "System" %}</th>
|
|
<th class="text-center">{% trans "Structure" %}</th>
|
|
<th class="text-center">{% trans "Eve Time" %}</th>
|
|
<th class="text-center">{% trans "Local Time" %}</th>
|
|
<th class="text-center">{% trans "Creator" %}</th>
|
|
{% if perms.auth.timer_management %}
|
|
<th class="text-center">{% trans "Action" %}</th>
|
|
{% endif %}
|
|
</tr>
|
|
{% for timer in timers %}
|
|
{% ifnotequal timer closest_timer %}
|
|
{% ifequal timer.important True %}
|
|
<tr class="danger">
|
|
{% else %}
|
|
<tr class="info">
|
|
{% endifequal %}
|
|
<td style="width:150px" class="text-center">{{ timer.details }}</td>
|
|
<td class="text-center">
|
|
{% ifequal timer.objective "Hostile" %}
|
|
<div class="label label-danger">
|
|
{% trans "Hostile" %}
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.objective "Friendly" %}
|
|
<div class="label label-primary">
|
|
{% trans "Friendly" %}
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.objective "Neutral" %}
|
|
<div class="label label-default">
|
|
{% trans "Neutral" %}
|
|
</div>
|
|
{% endifequal %}
|
|
</td>
|
|
<td class="text-center"><a
|
|
href="http://evemaps.dotlan.net/system/{{ timer.system }}">{{ timer.system }} {{ timer.planet_moon }} </a>
|
|
</td>
|
|
<td class="text-center">
|
|
{% ifequal timer.structure "I-HUB" %}
|
|
<div class="label label-warning">
|
|
I-HUB
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.structure "POCO" %}
|
|
<div class="label label-success">
|
|
POCO
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.structure "POS[S]" %}
|
|
<div class="label label-info">
|
|
POS [S]
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.structure "POS[M]" %}
|
|
<div class="label label-info">
|
|
POS [M]
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.structure "POS[L]" %}
|
|
<div class="label label-info">
|
|
POS [L]
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.structure "Station" %}
|
|
<div class="label label-danger">
|
|
Station
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.structure "TCU" %}
|
|
<div class="label label-danger">
|
|
TCU
|
|
</div>
|
|
{% endifequal %}
|
|
{% ifequal timer.structure "Other" %}
|
|
<div class="label label-default">
|
|
Other
|
|
</div>
|
|
{% endifequal %}
|
|
</td>
|
|
<td class="text-center" nowrap>{{ timer.eve_time | date:"Y-m-d H:i" }}</td>
|
|
<td class="text-center" nowrap><div id="countdown{{ timer.id }}"></div></td>
|
|
<td class="text-center">{{ timer.eve_character.character_name }}</td>
|
|
{% if perms.auth.timer_management %}
|
|
<td class="text-center">
|
|
<a href="/remove_timer/{{ timer.id }}">
|
|
<button type="button" class="btn btn-danger"><span
|
|
class="glyphicon glyphicon-remove"></span></button>
|
|
</a>
|
|
<a href="/edit_timer/{{ timer.id }}">
|
|
<button type="button" class="btn btn-info"><span
|
|
class="glyphicon glyphicon-pencil"></span></button>
|
|
</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endifnotequal %}
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<script src="/static/js/dateformat.js"></script>
|
|
<script src="/static/js/countdown.js"></script>
|
|
<script>
|
|
var locale = "{{ LANGUAGE_CODE }}";
|
|
var options = { weekday: 'short' };
|
|
var options2 = { hour: 'numeric', minute: 'numeric' };
|
|
|
|
var clockClosest = document.getElementById("countdownclosest"), targetDate = new Date(Date.UTC({{ closest_timer.eve_time | date:"Y, m-1, d, H, i" }}));{% for timer in timers %}
|
|
var clock{{ timer.id }} = document.getElementById("countdown{{ timer.id }}"), targetDate{{ timer.id }} = new Date(Date.UTC({{ timer.eve_time | date:"Y, m-1, d, H, i" }}));{% endfor %}
|
|
|
|
setInterval(function(){
|
|
clockClosest.innerHTML = ((targetDate.toLocaleString(locale, options)) + " @ " + (targetDate.toLocaleString(locale, options2)));
|
|
if (targetDate > Date.now()){
|
|
clockClosest.innerHTML = clockClosest.innerHTML + "<BR>" + countdown(targetDate).toString();}}, 1000);
|
|
|
|
{% for timer in timers %}setInterval(
|
|
function(){
|
|
clock{{ timer.id }}.innerHTML = ((targetDate{{ timer.id }}.toLocaleString(locale, options)) + " @ " + (targetDate{{ timer.id }}.toLocaleString(locale, options2)));
|
|
if (targetDate{{ timer.id }} > Date.now()){
|
|
clock{{ timer.id }}.innerHTML = clock{{ timer.id }}.innerHTML + "<BR>" + countdown(targetDate{{ timer.id }}).toString();}}, 1000);{% endfor %}
|
|
|
|
setInterval(function(){updateClock()}, 1000);
|
|
|
|
function updateClock() {
|
|
var options = { timeZone: 'UTC', weekday: 'short', day: 'numeric', month: 'short', year: 'numeric', hour: "numeric", minute: "numeric", second: "numeric" };
|
|
var clock = new Date()
|
|
document.getElementById("current-time").innerHTML = "<b>" + clock.toLocaleString(locale, options) + "</b>";
|
|
}
|
|
|
|
</script>
|
|
<script>
|
|
var locale = "{{ LANGUAGE_CODE }}";
|
|
var options = { weekday: 'short' };
|
|
var options2 = { hour: 'numeric', minute: 'numeric' };
|
|
|
|
var clockClosestCorp = document.getElementById("countdownclosestCorp"), targetDate = new Date(Date.UTC({{ closest_timer.eve_time | date:"Y, m-1, d, H, i" }}));{% for timer in corp_timers %}
|
|
var clockCorp{{ timer.id }} = document.getElementById("countdownCorp{{ timer.id }}"), targetDate{{ timer.id }} = new Date(Date.UTC({{ timer.eve_time | date:"Y, m-1, d, H, i" }}));{% endfor %}
|
|
|
|
setInterval(
|
|
function(){
|
|
clockClosestCorp.innerHTML = ((targetDate.toLocaleString(locale, options)) + " @ " + (targetDate.toLocaleString(locale, options2)));
|
|
if (targetDate > Date.now()){
|
|
clockClosestCorp.innerHTML = clockClosestCorp.innerHTML + "<BR>" + countdown(targetDate).toString();}}, 1000);
|
|
|
|
{% for timer in corp_timers %}setInterval(function(){
|
|
clockCorp{{ timer.id }}.innerHTML = ((targetDate{{ timer.id }}.toLocaleString(locale, options)) + " @ " + (targetDate{{ timer.id }}.toLocaleString(locale, options2)));
|
|
|
|
if (targetDate{{ timer.id }} > Date.now()){ clockCorp{{ timer.id }}.innerHTML = clockCorp{{ timer.id }}.innerHTML + "<BR>" + countdown(targetDate{{ timer.id }}).toString();}}, 1000);{% endfor %}
|
|
|
|
setInterval(function(){updateClock()}, 1000);
|
|
|
|
function updateClock() {
|
|
var options = { timeZone: 'UTC', weekday: 'short', day: 'numeric', month: 'short', year: 'numeric', hour: "numeric", minute: "numeric", second: "numeric" };
|
|
var clock = new Date()
|
|
document.getElementById("current-time").innerHTML = "<b>" + clock.toLocaleString(locale, options) + "</b>";
|
|
}
|
|
|
|
</script>
|
|
{% endblock content %}
|