mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-15 23:40:17 +02:00
Formatting additional informations text in operations
This commit is contained in:
parent
8b6d32d0d1
commit
69248fd7bb
@ -1,256 +1,254 @@
|
|||||||
{% extends "allianceauth/base.html" %}
|
{% extends "allianceauth/base.html" %}
|
||||||
{% load bootstrap %}
|
{% load bootstrap %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block page_title %}FleetUp{% endblock page_title %}
|
{% block page_title %}FleetUp{% endblock page_title %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
{% include "fleetup/menu.html" %}
|
{% include "fleetup/menu.html" %}
|
||||||
<div>
|
<div>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li class="active"><a data-toggle="tab" href="#operations">{% trans "Operations" %}</a></li>
|
<li class="active"><a data-toggle="tab" href="#operations">{% trans "Operations" %}</a></li>
|
||||||
<li><a data-toggle="tab" href="#timers">{% trans "Timers" %}</a></li>
|
<li><a data-toggle="tab" href="#timers">{% trans "Timers" %}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tab-content row">
|
<div class="tab-content row">
|
||||||
<div id="operations" class="tab-pane fade in active">
|
<div id="operations" class="tab-pane fade in active">
|
||||||
<div class="col-lg-8">
|
<div class="col-lg-8">
|
||||||
{% if operations_list %}
|
{% if operations_list %}
|
||||||
{% for subject, start in operations_list %}
|
{% for subject, start in operations_list %}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title"><b>{{ start.subject }}</b></h3>
|
<h3 class="panel-title"><b>{{ start.subject }}</b></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<table class="table table-condensed">
|
<table class="table table-condensed">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-md-6">{% trans "Start" %}</th>
|
<th class="col-md-6">{% trans "Start" %}</th>
|
||||||
<th class="col-md-6">{% trans "End" %}</th>
|
<th class="col-md-6">{% trans "End" %}</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="col-md-6">{{ start.start|date:"l d M H:i" }} <span class="label label-success">{% trans "Eve Time" %}</span></td>
|
<td class="col-md-6">{{ start.start|date:"l d M H:i" }} <span class="label label-success">{% trans "Eve Time" %}</span></td>
|
||||||
|
|
||||||
<td class="col-md-6">{{ start.end|date:"l d M H:i" }} <span class="label label-success">{% trans "Eve Time" %}</span></td>
|
<td class="col-md-6">{{ start.end|date:"l d M H:i" }} <span class="label label-success">{% trans "Eve Time" %}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="col-md-6">
|
<td class="col-md-6">
|
||||||
<span id="localtime{{ start.operation_id }}"></span> <span class='label label-success'>Local time</span><br>
|
<span id="localtime{{ start.operation_id }}"></span> <span class='label label-success'>Local time</span><br>
|
||||||
<div id="countdown{{ start.operation_id }}"></div>
|
<div id="countdown{{ start.operation_id }}"></div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="col-md-6"></td>
|
<td class="col-md-6"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<p>{{ start.details }}</p>
|
{{ start.details|linebreaks }}
|
||||||
|
|
||||||
<div class="col-lg-12">
|
<table class="table table-condensed table-striped">
|
||||||
<table class="table table-condensed table-striped">
|
<tr>
|
||||||
<tr>
|
<th class="col-md-4">{% trans "Location" %}</th>
|
||||||
<th class="col-md-4">{% trans "Location" %}</th>
|
<th class="col-md-4">{% trans "Doctrine" %}</th>
|
||||||
<th class="col-md-4">{% trans "Doctrine" %}</th>
|
<th class="col-md-2">{% trans "Organizer" %}</th>
|
||||||
<th class="col-md-2">{% trans "Organizer" %}</th>
|
<th class="col-md-2">{% trans "URL" %}</th>
|
||||||
<th class="col-md-2">{% trans "URL" %}</th>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td>
|
||||||
<td>
|
{{ start.location }} - {{ start.location_info }} <a href="http://evemaps.dotlan.net/system/{{ start.location }}" target="_blank" class="label label-success">Dotlan</a>
|
||||||
{{ start.location }} - {{ start.location_info }} <a href="http://evemaps.dotlan.net/system/{{ start.location }}" target="_blank" class="label label-success">Dotlan</a>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
{% if start.doctrine %}
|
||||||
{% if start.doctrine %}
|
{% for doctrine in start.doctrine %}
|
||||||
{% for doctrine in start.doctrine %}
|
|
||||||
|
<a href="{% url 'fleetup:doctrine' doctrine.Id %}" class="label label-success">{{ doctrine.Name }}</a>
|
||||||
<a href="{% url 'fleetup:doctrine' doctrine.Id %}" class="label label-success">{{ doctrine.Name }}</a>
|
|
||||||
|
{% endfor %}
|
||||||
{% endfor %}
|
|
||||||
|
{% else %}
|
||||||
{% else %}
|
<span class="label label-danger">{% trans "TBA" %}</span>
|
||||||
<span class="label label-danger">{% trans "TBA" %}</span>
|
{% endif %}
|
||||||
{% endif %}
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
{{ start.organizer }}
|
||||||
{{ start.organizer }}
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
{% ifequal start.url "" %}
|
||||||
{% ifequal start.url "" %}
|
<div class="label label-danger">{% trans "No link" %}</div>
|
||||||
<div class="label label-danger">{% trans "No link" %}</div>
|
{% else %}
|
||||||
{% else %}
|
<a href="{{ start.url }}" target="_blank" class="label label-success">{% trans "External link" %}</a>
|
||||||
<a href="{{ start.url }}" target="_blank" class="label label-success">{% trans "External link" %}</a>
|
{% endifequal %}
|
||||||
{% endifequal %}
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
</table>
|
||||||
</table>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endfor %}
|
||||||
</div>
|
{% else %}
|
||||||
{% endfor %}
|
<h3>{% trans "There seems to be no Operations in the near future." %}</h3>
|
||||||
{% else %}
|
{% endif %}
|
||||||
<h3>{% trans "There seems to be no Operations in the near future." %}</h3>
|
</div>
|
||||||
{% endif %}
|
<div class="col-lg-4">
|
||||||
</div>
|
<div class="panel panel-default">
|
||||||
<div class="col-lg-4">
|
<div class="panel-heading">
|
||||||
<div class="panel panel-default">
|
<h2 class="panel-title">{% trans "Current Eve Time:" %}</h2>
|
||||||
<div class="panel-heading">
|
</div>
|
||||||
<h2 class="panel-title">{% trans "Current Eve Time:" %}</h2>
|
<div class="panel-body">
|
||||||
</div>
|
<div id="current-time"></div>
|
||||||
<div class="panel-body">
|
</div>
|
||||||
<div id="current-time"></div>
|
</div>
|
||||||
</div>
|
{% if timers_list %}
|
||||||
</div>
|
<div class="panel panel-default">
|
||||||
{% if timers_list %}
|
<div class="panel-heading">
|
||||||
<div class="panel panel-default">
|
<h2 class="panel-title">{% trans "Timers" %}</h2>
|
||||||
<div class="panel-heading">
|
</div>
|
||||||
<h2 class="panel-title">{% trans "Timers" %}</h2>
|
<div class="panel-body">
|
||||||
</div>
|
<table class="table table-condensed table-hover table-striped">
|
||||||
<div class="panel-body">
|
{% for notes, type in timers_list %}
|
||||||
<table class="table table-condensed table-hover table-striped">
|
<tr>
|
||||||
{% for notes, type in timers_list %}
|
<td>
|
||||||
<tr>
|
{{ type.solarsystem }}
|
||||||
<td>
|
</td>
|
||||||
{{ type.solarsystem }}
|
<td>
|
||||||
</td>
|
{{ type.expires|date:"l d M H:i" }}
|
||||||
<td>
|
</td>
|
||||||
{{ type.expires|date:"l d M H:i" }}
|
</tr>
|
||||||
</td>
|
{% endfor %}
|
||||||
</tr>
|
</table>
|
||||||
{% endfor %}
|
</div>
|
||||||
</table>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
</div>
|
||||||
</div>
|
<div id="timers" class="tab-pane fade in">
|
||||||
</div>
|
<div class="col-lg-12">
|
||||||
<div id="timers" class="tab-pane fade in">
|
{% if timers_list %}
|
||||||
<div class="col-lg-12">
|
<div class="panel panel-default">
|
||||||
{% if timers_list %}
|
<div class="panel-heading">
|
||||||
<div class="panel panel-default">
|
<h2 class="panel-title">{% trans "Timers" %}</h2>
|
||||||
<div class="panel-heading">
|
</div>
|
||||||
<h2 class="panel-title">{% trans "Timers" %}</h2>
|
<div class="panel-body">
|
||||||
</div>
|
<div class="col-lg-12">
|
||||||
<div class="panel-body">
|
<table class="table table-condensed table-hover table-striped">
|
||||||
<div class="col-lg-12">
|
<tr>
|
||||||
<table class="table table-condensed table-hover table-striped">
|
<th class="col-lg-1">{% trans "Type" %}</th>
|
||||||
<tr>
|
<th class="col-lg-1">{% trans "Structure" %}</th>
|
||||||
<th class="col-lg-1">{% trans "Type" %}</th>
|
<th class="col-lg-2">{% trans "Location" %}</th>
|
||||||
<th class="col-lg-1">{% trans "Structure" %}</th>
|
<th class="col-lg-2">{% trans "Expires(EVE-time)" %}</th>
|
||||||
<th class="col-lg-2">{% trans "Location" %}</th>
|
<th class="col-lg-1">{% trans "Owner" %}</th>
|
||||||
<th class="col-lg-2">{% trans "Expires(EVE-time)" %}</th>
|
<th class="col-lg-2">{% trans "Note" %}</th>
|
||||||
<th class="col-lg-1">{% trans "Owner" %}</th>
|
</tr>
|
||||||
<th class="col-lg-2">{% trans "Note" %}</th>
|
{% for notes, type in timers_list %}
|
||||||
</tr>
|
<tr>
|
||||||
{% for notes, type in timers_list %}
|
<td>
|
||||||
<tr>
|
{% ifequal type.type "Final" %}
|
||||||
<td>
|
<span class="label label-danger">
|
||||||
{% ifequal type.type "Final" %}
|
{{ type.type }}</span>{% else %}{{ type.type }}{% endifequal %}
|
||||||
<span class="label label-danger">
|
</td>
|
||||||
{{ type.type }}</span>{% else %}{{ type.type }}{% endifequal %}
|
<td>
|
||||||
</td>
|
{{ type.timer_type }}
|
||||||
<td>
|
</td>
|
||||||
{{ type.timer_type }}
|
<td>
|
||||||
</td>
|
{{ type.solarsystem }} - Planet:{{ type.planet }} Moon:{{ type.moon }}
|
||||||
<td>
|
</td>
|
||||||
{{ type.solarsystem }} - Planet:{{ type.planet }} Moon:{{ type.moon }}
|
<td>
|
||||||
</td>
|
{{ type.expires|date:"l d M H:i" }}
|
||||||
<td>
|
</td>
|
||||||
{{ type.expires|date:"l d M H:i" }}
|
<td>
|
||||||
</td>
|
{{ type.owner }}
|
||||||
<td>
|
</td>
|
||||||
{{ type.owner }}
|
<td>
|
||||||
</td>
|
{{ type.notes }}
|
||||||
<td>
|
</td>
|
||||||
{{ type.notes }}
|
</tr>
|
||||||
</td>
|
{% endfor %}
|
||||||
</tr>
|
</table>
|
||||||
{% endfor %}
|
</div>
|
||||||
</table>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% else %}
|
||||||
</div>
|
<h3>{% trans "There seems to be no Timers in the near future." %}</h3>
|
||||||
{% else %}
|
{% endif %}
|
||||||
<h3>{% trans "There seems to be no Timers in the near future." %}</h3>
|
</div>
|
||||||
{% endif %}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
{% include 'bundles/moment-js.html' with locale=True %}
|
||||||
</div>
|
<script src="{% static 'js/timers.js' %}"></script>
|
||||||
{% include 'bundles/moment-js.html' with locale=True %}
|
<script type="text/javascript">
|
||||||
<script src="{% static 'js/timers.js' %}"></script>
|
// Data
|
||||||
<script type="text/javascript">
|
var timers = [
|
||||||
// Data
|
{% for start, op in operations_list %}
|
||||||
var timers = [
|
{
|
||||||
{% for start, op in operations_list %}
|
'id': {{ op.operation_id }},
|
||||||
{
|
'start': moment("{{ op.start | date:"c" }}"),
|
||||||
'id': {{ op.operation_id }},
|
'end': moment("{{ op.end | date:"c" }}"),
|
||||||
'start': moment("{{ op.start | date:"c" }}"),
|
'expired': false
|
||||||
'end': moment("{{ op.end | date:"c" }}"),
|
},
|
||||||
'expired': false
|
{% endfor %}
|
||||||
},
|
]
|
||||||
{% endfor %}
|
</script>
|
||||||
]
|
<script type="text/javascript">
|
||||||
</script>
|
|
||||||
<script type="text/javascript">
|
timedUpdate();
|
||||||
|
setAllLocalTimes();
|
||||||
timedUpdate();
|
|
||||||
setAllLocalTimes();
|
// Start timed updates
|
||||||
|
setInterval(timedUpdate, 1000);
|
||||||
// Start timed updates
|
|
||||||
setInterval(timedUpdate, 1000);
|
function timedUpdate() {
|
||||||
|
updateClock();
|
||||||
function timedUpdate() {
|
updateAllTimers();
|
||||||
updateClock();
|
}
|
||||||
updateAllTimers();
|
|
||||||
}
|
function updateAllTimers () {
|
||||||
|
var l = timers.length;
|
||||||
function updateAllTimers () {
|
for (var i=0; i < l; ++i) {
|
||||||
var l = timers.length;
|
if (timers[i].expired) continue;
|
||||||
for (var i=0; i < l; ++i) {
|
updateTimer(timers[i]);
|
||||||
if (timers[i].expired) continue;
|
}
|
||||||
updateTimer(timers[i]);
|
}
|
||||||
}
|
|
||||||
}
|
/**
|
||||||
|
* Update a timer
|
||||||
/**
|
* @param timer Timer information
|
||||||
* Update a timer
|
* @param timer.start Date of the timer
|
||||||
* @param timer Timer information
|
* @param timer.id Id number of the timer
|
||||||
* @param timer.start Date of the timer
|
* @param timer.expired
|
||||||
* @param timer.id Id number of the timer
|
*/
|
||||||
* @param timer.expired
|
function updateTimer(timer) {
|
||||||
*/
|
if (timer.start.isAfter(Date.now())) {
|
||||||
function updateTimer(timer) {
|
var duration = moment.duration(timer.start - moment(), 'milliseconds');
|
||||||
if (timer.start.isAfter(Date.now())) {
|
document.getElementById("countdown" + timer.id).innerHTML = getDurationString(duration);
|
||||||
var duration = moment.duration(timer.start - moment(), 'milliseconds');
|
} else {
|
||||||
document.getElementById("countdown" + timer.id).innerHTML = getDurationString(duration);
|
timer.expired = true;
|
||||||
} else {
|
document.getElementById("countdown" + timer.id).innerHTML = "";
|
||||||
timer.expired = true;
|
}
|
||||||
document.getElementById("countdown" + timer.id).innerHTML = "";
|
}
|
||||||
}
|
|
||||||
}
|
/**
|
||||||
|
* Set all local time fields
|
||||||
/**
|
*/
|
||||||
* Set all local time fields
|
function setAllLocalTimes() {
|
||||||
*/
|
var l = timers.length;
|
||||||
function setAllLocalTimes() {
|
for (var i=0; i < l; ++i) {
|
||||||
var l = timers.length;
|
setLocalTime(timers[i]);
|
||||||
for (var i=0; i < l; ++i) {
|
}
|
||||||
setLocalTime(timers[i]);
|
}
|
||||||
}
|
|
||||||
}
|
/**
|
||||||
|
* Set the local time info for the timer
|
||||||
/**
|
* @param timer Timer information
|
||||||
* Set the local time info for the timer
|
* @param timer.start Date of the timer
|
||||||
* @param timer Timer information
|
* @param timer.id Id number of the timer
|
||||||
* @param timer.start Date of the timer
|
*/
|
||||||
* @param timer.id Id number of the timer
|
function setLocalTime(timer) {
|
||||||
*/
|
document.getElementById("localtime" + timer.id).innerHTML = timer.start.format("ddd @ LT");
|
||||||
function setLocalTime(timer) {
|
}
|
||||||
document.getElementById("localtime" + timer.id).innerHTML = timer.start.format("ddd @ LT");
|
|
||||||
}
|
function updateClock() {
|
||||||
|
document.getElementById("current-time").innerHTML = "<b>" + moment.utc().format('ddd, ll HH:mm:ss z') + "</b>";
|
||||||
function updateClock() {
|
}
|
||||||
document.getElementById("current-time").innerHTML = "<b>" + moment.utc().format('ddd, ll HH:mm:ss z') + "</b>";
|
</script>
|
||||||
}
|
{% endblock content %}
|
||||||
</script>
|
|
||||||
{% endblock content %}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user