mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-12 14:00:17 +02:00
Added countdown to fleet operations
This commit is contained in:
parent
57e1282280
commit
4a024f5304
@ -17,6 +17,12 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</h1>
|
</h1>
|
||||||
|
<div class="col-lg-12 text-center">
|
||||||
|
<div class="label label-info text-left">
|
||||||
|
<b>Current Eve Time: </b>
|
||||||
|
</div><div class="label label-info text-left" id="current-time"></div>
|
||||||
|
<br/>
|
||||||
|
</div>
|
||||||
<table class="table table-responsive table-bordered">
|
<table class="table table-responsive table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-center">Operation Name</th>
|
<th class="text-center">Operation Name</th>
|
||||||
@ -24,27 +30,29 @@
|
|||||||
<th class="text-center">Form Up System</th>
|
<th class="text-center">Form Up System</th>
|
||||||
<th class="text-center">Form Up Location</th>
|
<th class="text-center">Form Up Location</th>
|
||||||
<th class="text-center">Start Time</th>
|
<th class="text-center">Start Time</th>
|
||||||
<th class="text-center">Duration</th>
|
<th class="text-center">Local Time</th>
|
||||||
|
<th class="text-center">Duration</th>
|
||||||
<th class="text-center">FC</th>
|
<th class="text-center">FC</th>
|
||||||
<th class="text-center">Details</th>
|
<th class="text-center">Details</th>
|
||||||
<th class="text-center">Post Time</th>
|
<th class="text-center">Post Time</th>
|
||||||
{% if perms.auth.optimer_management %}
|
{% if perms.auth.optimer_management %}
|
||||||
<th class="text-center">Creator</th>
|
<th class="text-center">Creator</th>
|
||||||
<th class="text-center">Action</th>
|
<th class="text-center">Action</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{% for ops in optimer %}
|
{% for ops in optimer %}
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:150px" class="text-center">{{ ops.operation_name }}</td>
|
<td style="width:150px" class="text-center">{{ ops.operation_name }}</td>
|
||||||
<td style="width:150px" class="text-center">{{ ops.doctrine }}</td>
|
<td style="width:150px" class="text-center">{{ ops.doctrine }}</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="http://evemaps.dotlan.net/system/{{ ops.system }}">{{ ops.system }}</a>
|
<a href="http://evemaps.dotlan.net/system/{{ ops.system }}">{{ ops.system }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td style="width:150px" class="text-center">{{ ops.location }}</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 style="width:150px" class="text-center" nowrap>{{ ops.start | date:"Y-m-d H:i" }}</td>
|
||||||
<td style="width:150px" class="text-center">{{ ops.duration }}</td>
|
<td class="text-center" nowrap><div id="countdown{{ ops.id }}"></div></td>
|
||||||
<td style="width:150px" class="text-center">{{ ops.fc }}</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.details }}</td>
|
||||||
<td style="width:150px" class="text-center">{{ ops.post_time}}</td>
|
<td style="width:150px" class="text-center">{{ ops.post_time}}</td>
|
||||||
{% if perms.auth.optimer_management %}
|
{% if perms.auth.optimer_management %}
|
||||||
@ -70,7 +78,24 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script src="/static/js/dateformat.js"></script>
|
||||||
|
<script src="/static/js/countdown.js"></script>
|
||||||
|
<script>
|
||||||
|
var clockClosest = document.getElementById("countdownclosest"), targetDate = new Date(Date.UTC({{ ops.start | date:"Y, m-1, d, H, i" }}));{% 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 %}
|
||||||
|
|
||||||
|
setInterval(function(){clockClosest.innerHTML = targetDate.format('D @ h:ia'); if (targetDate > Date.now()){ clockClosest.innerHTML = clockClosest.innerHTML + "<BR>" + countdown(targetDate).toString();}}, 1000);
|
||||||
|
{% for ops in optimer %}setInterval(function(){clock{{ ops.id }}.innerHTML = targetDate{{ ops.id }}.format('D @ h:ia'); 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 clock = new Date();
|
||||||
|
document.getElementById("current-time").innerHTML = "<b>" + clock.toUTCString() + "</b>";
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<th class="text-center">System</th>
|
<th class="text-center">System</th>
|
||||||
<th class="text-center">Structure</th>
|
<th class="text-center">Structure</th>
|
||||||
<th class="text-center">Eve Time</th>
|
<th class="text-center">Eve Time</th>
|
||||||
<th class="text-center">Local Time</th>
|
<th class="text-center">Local Time</th>
|
||||||
<th class="text-center">Creator</th>
|
<th class="text-center">Creator</th>
|
||||||
{% if perms.auth.timer_management %}
|
{% if perms.auth.timer_management %}
|
||||||
<th class="text-center">Action</th>
|
<th class="text-center">Action</th>
|
||||||
@ -106,8 +106,8 @@
|
|||||||
{% endifequal %}
|
{% endifequal %}
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center" nowrap>{{ closest_timer.eve_time | date:"Y-m-d H:i" }}</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 id="countdownclosest" class="text-center" nowrap></td>
|
||||||
<td class="text-center">{{ closest_timer.eve_character.character_name }}</td>
|
<td class="text-center">{{ closest_timer.eve_character.character_name }}</td>
|
||||||
{% if perms.auth.timer_management %}
|
{% if perms.auth.timer_management %}
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
|
|
||||||
@ -209,7 +209,7 @@
|
|||||||
{% endifequal %}
|
{% endifequal %}
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center" nowrap>{{ timer.eve_time | date:"Y-m-d H:i" }}</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" nowrap><div id="countdownCorp{{ timer.id }}"></div></td>
|
||||||
<td class="text-center">{{ timer.eve_character.character_name }}</td>
|
<td class="text-center">{{ timer.eve_character.character_name }}</td>
|
||||||
{% if perms.auth.timer_management %}
|
{% if perms.auth.timer_management %}
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
@ -217,9 +217,10 @@
|
|||||||
<button type="button" class="btn btn-danger"><span
|
<button type="button" class="btn btn-danger"><span
|
||||||
class="glyphicon glyphicon-remove"></span></button>
|
class="glyphicon glyphicon-remove"></span></button>
|
||||||
</a>
|
</a>
|
||||||
<a href="/edit_timer/{{ timer.id }}">
|
<a href="/edit_timer/{{ timer.id }}">
|
||||||
<button type="button" class="btn btn-info"><span
|
<button type="button" class="btn btn-info"><span
|
||||||
class="glyphicon glyphicon-pencil"></span></button>
|
class="glyphicon glyphicon-pencil"></span></button>
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
@ -339,7 +340,6 @@ var clock{{ timer.id }} = document.getElementById("countdown{{ timer.id }}"), ta
|
|||||||
|
|
||||||
setInterval(function(){clockClosest.innerHTML = targetDate.format('D @ h:ia'); if (targetDate > Date.now()){ clockClosest.innerHTML = clockClosest.innerHTML + "<BR>" + countdown(targetDate).toString();}}, 1000);
|
setInterval(function(){clockClosest.innerHTML = targetDate.format('D @ h:ia'); 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 }}.format('D @ h:ia'); if (targetDate{{ timer.id }} > Date.now()){ clock{{ timer.id }}.innerHTML = clock{{ timer.id }}.innerHTML + "<BR>" + countdown(targetDate{{ timer.id }}).toString();}}, 1000);{% endfor %}
|
{% for timer in timers %}setInterval(function(){clock{{ timer.id }}.innerHTML = targetDate{{ timer.id }}.format('D @ h:ia'); if (targetDate{{ timer.id }} > Date.now()){ clock{{ timer.id }}.innerHTML = clock{{ timer.id }}.innerHTML + "<BR>" + countdown(targetDate{{ timer.id }}).toString();}}, 1000);{% endfor %}
|
||||||
{% for timer in corp_timers %}setInterval(function(){clock{{ timer.id }}.innerHTML = targetDate{{ timer.id }}.format('D @ h:ia'); 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);
|
setInterval(function(){updateClock()}, 1000);
|
||||||
|
|
||||||
@ -348,5 +348,20 @@ function updateClock() {
|
|||||||
document.getElementById("current-time").innerHTML = "<b>" + clock.toUTCString() + "</b>";
|
document.getElementById("current-time").innerHTML = "<b>" + clock.toUTCString() + "</b>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
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.format('D @ h:ia'); 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 }}.format('D @ h:ia'); 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 clockCorp = new Date();
|
||||||
|
document.getElementById("current-time").innerHTML = "<b>" + clockCorp.toUTCString() + "</b>";
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user