Changed op timers to Structure Timer and Bug Fixes for Fleet Operations Timer

This commit is contained in:
orbitroom 2016-01-20 22:24:07 -05:00
parent 6fb70b3160
commit 5ececa6bfd
4 changed files with 384 additions and 384 deletions

View File

@ -149,15 +149,15 @@
<li> <li>
<a {% ifequal request.path "/optimer" %} class="active" {% endifequal %} <a {% ifequal request.path "/optimer" %} class="active" {% endifequal %}
href="{% url 'auth_optimer_view' %}"><i href="{% url 'auth_optimer_view' %}"><i
class="fa fa-compass fa-fw grayiconecolor"></i> Fleet Operations</a> class="fa fa-exclamation fa-fw grayiconecolor"></i> Fleet Operations</a>
</li> </li>
{% if perms.auth.timer_view %} {% if perms.auth.timer_view %}
<li> <li>
<a {% ifequal request.path "/timer_management" %} class="active" {% endifequal %} <a {% ifequal request.path "/timer_management" %} class="active" {% endifequal %}
href="{% url 'auth_timer_view' %}"><i href="{% url 'auth_timer_view' %}"><i
class="fa fa-clock-o fa-fw grayiconecolor"></i> OP Timers</a> class="fa fa-clock-o fa-fw grayiconecolor"></i> Structure Timers</a>
</li> </li>
{% endif %} {% endif %}

View File

@ -1,38 +1,38 @@
{% extends "public/base.html" %} {% extends "public/base.html" %}
{% load bootstrap %} {% load bootstrap %}
{% load staticfiles %} {% load staticfiles %}
{% block title %}Alliance Auth - Timer Create{% endblock %} {% block title %}Alliance Auth - Structure Timer Create{% endblock %}
{% block page_title %}Timer Create{% endblock page_title %} {% block page_title %}Timer Create{% endblock page_title %}
{% block extra_css %} {% block extra_css %}
<link href="{% static 'css/jquery.datetimepicker.css' %}" rel="stylesheet" type="text/css">{% endblock extra_css %} <link href="{% static 'css/jquery.datetimepicker.css' %}" rel="stylesheet" type="text/css">{% endblock extra_css %}
{% block content %} {% block content %}
<div class="col-lg-12"> <div class="col-lg-12">
<h1 class="page-header text-center">Create Timer</h1> <h1 class="page-header text-center">Create Structure Timer</h1>
<div class="container-fluid"> <div class="container-fluid">
<div class="col-md-4 col-md-offset-4"> <div class="col-md-4 col-md-offset-4">
<div class="row"> <div class="row">
<form class="form-signin" role="form" action="" method="POST"> <form class="form-signin" role="form" action="" method="POST">
{% csrf_token %} {% csrf_token %}
{{ form|bootstrap }} {{ form|bootstrap }}
<br/> <br/>
<button class="btn btn-lg btn-primary btn-block" type="submit">Create Timer</button> <button class="btn btn-lg btn-primary btn-block" type="submit">Create Timer</button>
</form> </form>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{% endblock content %} {% endblock content %}
{% block extra_script %} {% block extra_script %}
$('#id_eve_time').datetimepicker({ $('#id_eve_time').datetimepicker({
maskInput: true, maskInput: true,
format: 'Y-m-d H:i',minDate:0 format: 'Y-m-d H:i',minDate:0
}); });
{% endblock extra_script %} {% endblock extra_script %}

View File

@ -49,7 +49,7 @@
{% if perms.auth.optimer_management %} {% if perms.auth.optimer_management %}
<td style="width:150px" class="text-center">{{ ops.eve_character }}</td> <td style="width:150px" class="text-center">{{ ops.eve_character }}</td>
<td class="text-center"> <td class="text-center">
<a href="/remove_optimer/{{ sigt.id }}"> <a href="/remove_optimer/{{ ops.id }}">
<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>

View File

@ -1,342 +1,342 @@
{% extends "public/base.html" %} {% extends "public/base.html" %}
{% load staticfiles %} {% load staticfiles %}
{% block title %}Alliance Auth{% endblock %} {% block title %}Alliance Auth{% endblock %}
{% block page_title %}Timer Management{% endblock page_title %} {% block page_title %}Structure Timer Management{% endblock page_title %}
{% block extra_css %}{% endblock extra_css %} {% block extra_css %}{% endblock extra_css %}
{% block content %} {% block content %}
<div class="col-lg-12"> <div class="col-lg-12">
<h1 class="page-header text-center">Operation Timers <h1 class="page-header text-center">Structure Timers
<div class="text-right"> <div class="text-right">
<a href="{% url 'auth_add_timer_view' %}"> <a href="{% url 'auth_add_timer_view' %}">
{% if perms.auth.timer_management %} {% if perms.auth.timer_management %}
<button type="button" class="btn btn-success">Create Timer</button> <button type="button" class="btn btn-success">Create Structure Timer</button>
{% endif %} {% endif %}
</a> </a>
</div> </div>
</h1> </h1>
<div class="col-lg-12 text-center"> <div class="col-lg-12 text-center">
<div class="label label-info text-left"> <div class="label label-info text-left">
<b>Current Eve Time: </b> <b>Current Eve Time: </b>
</div><div class="label label-info text-left" id="current-time"></div> </div><div class="label label-info text-left" id="current-time"></div>
</div> </div>
<h4><b>Next Timer</b></h4> <h4><b>Next Timer</b></h4>
<table class="table table-responsive table-bordered"> <table class="table table-responsive table-bordered">
<tr> <tr>
<th style="width:150px" class="text-center">Details</th> <th style="width:150px" class="text-center">Details</th>
<th class="text-center">Objective</th> <th class="text-center">Objective</th>
<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>
{% endif %} {% endif %}
</tr> </tr>
{% if closest_timer %} {% if closest_timer %}
{% ifequal closest_timer.important True %} {% ifequal closest_timer.important True %}
<tr class="danger"> <tr class="danger">
{% else %} {% else %}
<tr class="info"> <tr class="info">
{% endifequal %} {% endifequal %}
<td style="width:150px" class="text-center">{{ closest_timer.details }}</td> <td style="width:150px" class="text-center">{{ closest_timer.details }}</td>
<td class="text-center"> <td class="text-center">
{% ifequal closest_timer.objective "Hostile" %} {% ifequal closest_timer.objective "Hostile" %}
<div class="label label-danger"> <div class="label label-danger">
Hostile Hostile
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal closest_timer.objective "Friendly" %} {% ifequal closest_timer.objective "Friendly" %}
<div class="label label-primary"> <div class="label label-primary">
Friendly Friendly
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal closest_timer.objective "Neutral" %} {% ifequal closest_timer.objective "Neutral" %}
<div class="label label-default"> <div class="label label-default">
Neutral Neutral
</div> </div>
{% endifequal %} {% endifequal %}
</td> </td>
<td class="text-center"><a <td class="text-center"><a
href="http://evemaps.dotlan.net/system/{{ closest_timer.system }}">{{ closest_timer.system }} {{ closest_timer.planet_moon }} </a> href="http://evemaps.dotlan.net/system/{{ closest_timer.system }}">{{ closest_timer.system }} {{ closest_timer.planet_moon }} </a>
</td> </td>
<td class="text-center"> <td class="text-center">
{% ifequal closest_timer.structure "I-HUB" %} {% ifequal closest_timer.structure "I-HUB" %}
<div class="label label-warning"> <div class="label label-warning">
I-HUB I-HUB
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal closest_timer.structure "POCO" %} {% ifequal closest_timer.structure "POCO" %}
<div class="label label-success"> <div class="label label-success">
POCO POCO
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal closest_timer.structure "POS[S]" %} {% ifequal closest_timer.structure "POS[S]" %}
<div class="label label-info"> <div class="label label-info">
POS [S] POS [S]
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal closest_timer.structure "POS[M]" %} {% ifequal closest_timer.structure "POS[M]" %}
<div class="label label-info"> <div class="label label-info">
POS [M] POS [M]
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal closest_timer.structure "POS[L]" %} {% ifequal closest_timer.structure "POS[L]" %}
<div class="label label-info"> <div class="label label-info">
POS [L] POS [L]
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal closest_timer.structure "Station" %} {% ifequal closest_timer.structure "Station" %}
<div class="label label-danger"> <div class="label label-danger">
Station Station
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal closest_timer.structure "TCU" %} {% ifequal closest_timer.structure "TCU" %}
<div class="label label-danger"> <div class="label label-danger">
TCU TCU
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal closest_timer.structure "Other" %} {% ifequal closest_timer.structure "Other" %}
<div class="label label-default"> <div class="label label-default">
Other Other
</div> </div>
{% 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">
<a href="/remove_timer/{{ closest_timer.id }}"> <a href="/remove_timer/{{ closest_timer.id }}">
<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>
</td> </td>
{% endif %} {% endif %}
{% endif %} {% endif %}
</tr> </tr>
</table> </table>
{% if corp_timers %} {% if corp_timers %}
<h4><b>Corp Timers</b></h4> <h4><b>Corp Timers</b></h4>
<table class="table table-bordered"> <table class="table table-bordered">
<tr> <tr>
<th style="width:150px" class="text-center">Details</th> <th style="width:150px" class="text-center">Details</th>
<th class="text-center">Objective</th> <th class="text-center">Objective</th>
<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>
{% endif %} {% endif %}
</tr> </tr>
{% for timer in corp_timers %} {% for timer in corp_timers %}
{% ifequal timer.important True %} {% ifequal timer.important True %}
<tr class="danger"> <tr class="danger">
{% else %} {% else %}
<tr class="info"> <tr class="info">
{% endifequal %} {% endifequal %}
<td style="width:150px" class="text-center">{{ timer.details }}</td> <td style="width:150px" class="text-center">{{ timer.details }}</td>
<td class="text-center"> <td class="text-center">
{% ifequal timer.objective "Hostile" %} {% ifequal timer.objective "Hostile" %}
<div class="label label-danger"> <div class="label label-danger">
Hostile Hostile
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.objective "Friendly" %} {% ifequal timer.objective "Friendly" %}
<div class="label label-primary"> <div class="label label-primary">
Friendly Friendly
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.objective "Neutral" %} {% ifequal timer.objective "Neutral" %}
<div class="label label-default"> <div class="label label-default">
Neutral Neutral
</div> </div>
{% endifequal %} {% endifequal %}
</td> </td>
<td class="text-center"><a <td class="text-center"><a
href="http://evemaps.dotlan.net/system/{{ timer.system }}">{{ timer.system }} {{ timer.planet_moon }} </a> href="http://evemaps.dotlan.net/system/{{ timer.system }}">{{ timer.system }} {{ timer.planet_moon }} </a>
</td> </td>
<td class="text-center"> <td class="text-center">
{% ifequal timer.structure "I-HUB" %} {% ifequal timer.structure "I-HUB" %}
<div class="label label-warning"> <div class="label label-warning">
I-HUB I-HUB
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.structure "POCO" %} {% ifequal timer.structure "POCO" %}
<div class="label label-success"> <div class="label label-success">
POCO POCO
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.structure "POS[S]" %} {% ifequal timer.structure "POS[S]" %}
<div class="label label-info"> <div class="label label-info">
POS [S] POS [S]
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.structure "POS[M]" %} {% ifequal timer.structure "POS[M]" %}
<div class="label label-info"> <div class="label label-info">
POS [M] POS [M]
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.structure "POS[L]" %} {% ifequal timer.structure "POS[L]" %}
<div class="label label-info"> <div class="label label-info">
POS [L] POS [L]
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.structure "Station" %} {% ifequal timer.structure "Station" %}
<div class="label label-danger"> <div class="label label-danger">
Station Station
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.structure "TCU" %} {% ifequal timer.structure "TCU" %}
<div class="label label-danger"> <div class="label label-danger">
TCU TCU
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.structure "Other" %} {% ifequal timer.structure "Other" %}
<div class="label label-default"> <div class="label label-default">
Other Other
</div> </div>
{% 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="countdown{{ 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">
<a href="/remove_timer/{{ timer.id }}"> <a href="/remove_timer/{{ timer.id }}">
<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>
</td> </td>
{% endif %} {% endif %}
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
{% endif %} {% endif %}
<h4><b>Future Timers</b></h4> <h4><b>Future Timers</b></h4>
<table class="table table-bordered"> <table class="table table-bordered">
<tr> <tr>
<th style="width:150px" class="text-center">Details</th> <th style="width:150px" class="text-center">Details</th>
<th class="text-center">Objective</th> <th class="text-center">Objective</th>
<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>
{% endif %} {% endif %}
</tr> </tr>
{% for timer in timers %} {% for timer in timers %}
{% ifnotequal timer closest_timer %} {% ifnotequal timer closest_timer %}
{% ifequal timer.important True %} {% ifequal timer.important True %}
<tr class="danger"> <tr class="danger">
{% else %} {% else %}
<tr class="info"> <tr class="info">
{% endifequal %} {% endifequal %}
<td style="width:150px" class="text-center">{{ timer.details }}</td> <td style="width:150px" class="text-center">{{ timer.details }}</td>
<td class="text-center"> <td class="text-center">
{% ifequal timer.objective "Hostile" %} {% ifequal timer.objective "Hostile" %}
<div class="label label-danger"> <div class="label label-danger">
Hostile Hostile
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.objective "Friendly" %} {% ifequal timer.objective "Friendly" %}
<div class="label label-primary"> <div class="label label-primary">
Friendly Friendly
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.objective "Neutral" %} {% ifequal timer.objective "Neutral" %}
<div class="label label-default"> <div class="label label-default">
Neutral Neutral
</div> </div>
{% endifequal %} {% endifequal %}
</td> </td>
<td class="text-center"><a <td class="text-center"><a
href="http://evemaps.dotlan.net/system/{{ timer.system }}">{{ timer.system }} {{ timer.planet_moon }} </a> href="http://evemaps.dotlan.net/system/{{ timer.system }}">{{ timer.system }} {{ timer.planet_moon }} </a>
</td> </td>
<td class="text-center"> <td class="text-center">
{% ifequal timer.structure "I-HUB" %} {% ifequal timer.structure "I-HUB" %}
<div class="label label-warning"> <div class="label label-warning">
I-HUB I-HUB
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.structure "POCO" %} {% ifequal timer.structure "POCO" %}
<div class="label label-success"> <div class="label label-success">
POCO POCO
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.structure "POS[S]" %} {% ifequal timer.structure "POS[S]" %}
<div class="label label-info"> <div class="label label-info">
POS [S] POS [S]
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.structure "POS[M]" %} {% ifequal timer.structure "POS[M]" %}
<div class="label label-info"> <div class="label label-info">
POS [M] POS [M]
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.structure "POS[L]" %} {% ifequal timer.structure "POS[L]" %}
<div class="label label-info"> <div class="label label-info">
POS [L] POS [L]
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.structure "Station" %} {% ifequal timer.structure "Station" %}
<div class="label label-danger"> <div class="label label-danger">
Station Station
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.structure "TCU" %} {% ifequal timer.structure "TCU" %}
<div class="label label-danger"> <div class="label label-danger">
TCU TCU
</div> </div>
{% endifequal %} {% endifequal %}
{% ifequal timer.structure "Other" %} {% ifequal timer.structure "Other" %}
<div class="label label-default"> <div class="label label-default">
Other Other
</div> </div>
{% 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="countdown{{ 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">
<a href="/remove_timer/{{ timer.id }}"> <a href="/remove_timer/{{ timer.id }}">
<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>
</td> </td>
{% endif %} {% endif %}
</tr> </tr>
{% endifnotequal %} {% endifnotequal %}
{% endfor %} {% endfor %}
</table> </table>
</div> </div>
<script src="/static/js/dateformat.js"></script> <script src="/static/js/dateformat.js"></script>
<script src="/static/js/countdown.js"></script> <script src="/static/js/countdown.js"></script>
<script> <script>
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 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 %} 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.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 %} {% 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);
function updateClock() { function updateClock() {
var clock = new Date(); var clock = new Date();
document.getElementById("current-time").innerHTML = "<b>" + clock.toUTCString() + "</b>"; document.getElementById("current-time").innerHTML = "<b>" + clock.toUTCString() + "</b>";
} }
</script> </script>
{% endblock content %} {% endblock content %}