mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-20 09:42:29 +02:00
# One Thousandth Commit 🎉 🎈 🎆 🍾 * Allow requiring API ownership validation by SSO. Closes #163 * Add Discourse group name length restrictions. * Redirect after api addition/deletion of main character * Correct admin searching for removed discourse_username field in AuthServicesInfo * Correct admin function to sync user Discourse groups * Beautify tables by removing borders and hiding when empty. *Add buttons on dead-end pages to return to originating view.
102 lines
5.0 KiB
HTML
102 lines
5.0 KiB
HTML
{% extends "public/base.html" %}
|
|
{% load staticfiles %}
|
|
{% load i18n %}
|
|
{% get_current_language as LANGUAGE_CODE %}
|
|
|
|
{% block title %}Alliance Auth{% endblock %}
|
|
|
|
{% block page_title %}{% trans "Fleet Operation Management" %}{% endblock page_title %}
|
|
{% block extra_css %}{% endblock extra_css %}
|
|
|
|
{% block content %}
|
|
<div class="col-lg-12">
|
|
<h1 class="page-header text-center">{% trans "Fleet Operation Timers" %}
|
|
<div class="text-right">
|
|
{% if perms.auth.optimer_management %}
|
|
<a href="{% url 'auth_add_optimer_view' %}" class="btn btn-success">{% trans "Create Operation" %}</a>
|
|
{% endif %}
|
|
</div>
|
|
</h1>
|
|
<div class="col-lg-12 text-center row">
|
|
<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>
|
|
<br />
|
|
</div>
|
|
{% if optimer %}
|
|
<table class="table table-responsive">
|
|
<tr>
|
|
<th class="text-center">{% trans "Operation Name" %}</th>
|
|
<th class="text-center">{% trans "Doctrine" %}</th>
|
|
<th class="text-center">{% trans "Form Up System" %}</th>
|
|
<th class="text-center">{% trans "Form Up Location" %}</th>
|
|
<th class="text-center">{% trans "Start Time" %}</th>
|
|
<th class="text-center">{% trans "Local Time" %}</th>
|
|
<th class="text-center">{% trans "Duration" %}</th>
|
|
<th class="text-center">{% trans "FC" %}</th>
|
|
<th class="text-center">{% trans "Details" %}</th>
|
|
<th class="text-center">{% trans "Post Time" %}</th>
|
|
{% if perms.auth.optimer_management %}
|
|
<th class="text-center">{% trans "Creator" %}</th>
|
|
<th class="text-center">{% trans "Action" %}</th>
|
|
{% endif %}
|
|
</tr>
|
|
|
|
{% for ops in optimer %}
|
|
<tr>
|
|
<td style="width:150px" class="text-center">{{ ops.operation_name }}</td>
|
|
<td style="width:150px" class="text-center">{{ ops.doctrine }}</td>
|
|
<td class="text-center">
|
|
<a href="http://evemaps.dotlan.net/system/{{ ops.system }}">{{ ops.system }}</a>
|
|
</td>
|
|
<td style="width:150px" class="text-center">{{ ops.location }}</td>
|
|
<td style="width:150px" class="text-center" nowrap>{{ ops.start | date:"Y-m-d H:i" }}</td>
|
|
<td class="text-center" nowrap><div id="countdown{{ ops.id }}"></div></td>
|
|
<td style="width:150px" class="text-center">{{ ops.duration }}</td>
|
|
<td style="width:150px" class="text-center">{{ ops.fc }}</td>
|
|
<td style="width:150px" class="text-center">{{ ops.details }}</td>
|
|
<td style="width:150px" class="text-center">{{ ops.post_time}}</td>
|
|
{% if perms.auth.optimer_management %}
|
|
<td style="width:150px" class="text-center">{{ ops.eve_character }}</td>
|
|
<td class="text-center">
|
|
<a href="{% url 'auth_remove_optimer' ops.id %}" class="btn btn-danger">
|
|
<span class="glyphicon glyphicon-remove"></span>
|
|
</a>
|
|
<a href="{% url 'auth_edit_optimer' ops.id %}" class="btn btn-info">
|
|
<span class="glyphicon glyphicon-pencil"></span>
|
|
</a>
|
|
</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tr>
|
|
</table>
|
|
{% else %}
|
|
<br /><div class="alert alert-warning text-center">No fleet operations found.</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<script src="/static/js/dateformat.js"></script>
|
|
<script src="/static/js/countdown.js"></script>
|
|
<script>
|
|
var locale = "{{ LANGUAGE_CODE }}";
|
|
{% for ops in optimer %}var clock{{ ops.id }} = document.getElementById("countdown{{ ops.id }}"), targetDate{{ ops.id }} = new Date(Date.UTC({{ ops.start | date:"Y, m-1, d, H, i" }}));{% endfor %}
|
|
{% for ops in optimer %}setInterval(function(){
|
|
var options = { weekday: 'short' };
|
|
var options2 = { hour: 'numeric', minute: 'numeric' };
|
|
var time = ((targetDate{{ ops.id }}.toLocaleString(locale, options)) + " @ " + (targetDate{{ ops.id }}.toLocaleString(locale, options2)));
|
|
clock{{ ops.id }}.innerHTML = time;
|
|
if (targetDate{{ ops.id }} > Date.now())
|
|
{ clock{{ ops.id }}.innerHTML = clock{{ ops.id }}.innerHTML + "<BR>" + countdown(targetDate{{ ops.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 %}
|