mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-05 06:36:19 +01:00
Move templates and urls to apps.
Implement url hooks. Many apps are now removable. Default to assuming services have been migrated.
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
|
||||
{% block title %}{% trans "Alliance Auth - Fleet Operation Create" %}{% endblock %}
|
||||
|
||||
{% block page_title %}{% trans "Create Operation" %}{% endblock page_title %}
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/jquery-datetimepicker-css.html' %}
|
||||
{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% trans "Create Fleet Operation" %}</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Create Fleet Operation" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
|
||||
$('#id_start').datetimepicker({
|
||||
lang: '{{ LANGUAGE_CODE }}',
|
||||
maskInput: true,
|
||||
format: 'Y-m-d H:i',minDate:0
|
||||
});
|
||||
|
||||
{% endblock extra_script %}
|
||||
@@ -1,29 +0,0 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
|
||||
{% block title %}{% trans "Alliance Auth - Structure Timer Create" %}{% endblock %}
|
||||
|
||||
{% block page_title %}{% trans "Timer Create" %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% trans "Create Structure Timer" %}</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Create Timer" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
@@ -1,44 +0,0 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center col-lg-3">{% trans "Operation Name" %}</th>
|
||||
<th class="text-center col lg-2">{% trans "Doctrine" %}</th>
|
||||
<th class="text-center col-lg-1">{% trans "Form Up System" %}</th>
|
||||
<th class="text-center col-lg-1">{% trans "Start Time" %}</th>
|
||||
<th class="text-center col-lg-1">{% trans "Local Time" %}</th>
|
||||
<th class="text-center col-lg-1">{% trans "Duration" %}</th>
|
||||
<th class="text-center col-lg-1">{% trans "FC" %}</th>
|
||||
{% if perms.auth.optimer_management %}
|
||||
<th class="text-center col-lg-1">{% trans "Creator" %}</th>
|
||||
<th class="text-center col-lg-2">{% trans "Action" %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
{% for ops in timers %}
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center">{{ ops.operation_name }}</td>
|
||||
<td class="text-center">{{ ops.doctrine }}</td>
|
||||
<td class="text-center">
|
||||
<a href="http://evemaps.dotlan.net/system/{{ ops.system }}">{{ ops.system }}</a>
|
||||
</td>
|
||||
<td class="text-center" nowrap>{{ ops.start | date:"Y-m-d H:i" }}</td>
|
||||
<td class="text-center" nowrap><div id="localtime{{ ops.id }}"></div><div id="countdown{{ ops.id }}"></div></td>
|
||||
<td class="text-center">{{ ops.duration }}</td>
|
||||
<td class="text-center">{{ ops.fc }}</td>
|
||||
{% if perms.auth.optimer_management %}
|
||||
<td 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>
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endblock content %}
|
||||
@@ -1,27 +0,0 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Choose a Corp{% endblock %}
|
||||
{% block page_title %}{% trans "Choose a Corp" %}{% endblock page_title %}
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% trans "Choose a Corp" %}</h1>
|
||||
{% if choices %}
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">{% trans "Available Corps" %}</div>
|
||||
<table class="table table-responsive">
|
||||
{% for choice in choices %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'auth_hrapplication_create_view' choice.0 %}" class="btn btn-primary" title="Apply">{{ choice.1 }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-danger">{% trans "No corps are accepting applications at this time." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
@@ -1,33 +0,0 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Apply To {{ corp.corporation_name }}{% endblock title %}
|
||||
{% block page_title %}{% trans "Apply To" %} {{ corp.corporation_name }}{% endblock page_title %}
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% trans "Apply To" %} {{ corp.corporation_name }}</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
<form class="form-signin">
|
||||
{% csrf_token %}
|
||||
{% for question in questions %}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="id_{{ question.pk }}">{{ question.title }}</label>
|
||||
<div class=" ">
|
||||
{% if question.help_text %}
|
||||
<div cass="text-center">{{ question.help_text }}</div>
|
||||
{% endif %}
|
||||
<textarea class="form-control" cols="40" id="id_{{ question.pk }}" name="{{ question.pk }}" rows="10"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit" formmethod="post">{% trans "Submit" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,198 +0,0 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}{% trans "HR Application Management" %}{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% trans "Personal Applications" %}
|
||||
<div class="text-right">
|
||||
{% if create %}
|
||||
<a href="{% url 'auth_hrapplication_create_view' %}">
|
||||
<button type="button" class="btn btn-success">{% trans "Create Application" %}</button>
|
||||
</a>
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-success" disabled>{% trans "Create Application" %}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</h1>
|
||||
{% if personal_apps %}
|
||||
<div class="panel panel-default">
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<th class="text-center">{% trans "Username" %}</th>
|
||||
<th class="text-center">{% trans "Corporation" %}
|
||||
<th class="text-center">{% trans "Status" %}</th>
|
||||
<th class="text-center">{% trans "Actions" %}</th>
|
||||
</tr>
|
||||
{% for personal_app in personal_apps %}
|
||||
<tr>
|
||||
<td class="text-center">{{ personal_app.user.username }}</td>
|
||||
<td class="text-center">{{ personal_app.form.corp.corporation_name }}</td>
|
||||
<td class="text-center">
|
||||
{% if personal_app.approved == None %}
|
||||
<div class="label label-warning">{% trans "Pending" %}</div>
|
||||
{% elif personal_app.approved == True %}
|
||||
<div class="label label-success">{% trans "Approved" %}</div>
|
||||
{% else %}
|
||||
<div class="label label-danger">{% trans "Rejected" %}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'auth_hrapplication_personal_view' personal_app.id %}"
|
||||
class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
</a>
|
||||
|
||||
{% if personal_app.approved == None %}
|
||||
<a href="{% url 'auth_hrapplication_personal_removal' personal_app.id %}"
|
||||
class="btn btn-danger">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if perms.auth.human_resources %}
|
||||
<h1 class="page-header text-center">{% trans "Application Management" %}
|
||||
<div class="text-right">
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal">
|
||||
{% trans "Search Applications" %}
|
||||
</button>
|
||||
</div>
|
||||
</h1>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#pending">{% trans "Pending" %}</a></li>
|
||||
<li><a data-toggle="tab" href="#reviewed">{% trans "Reviewed" %}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="pending" class="tab-pane fade in active panel panel-default">
|
||||
<div class="panel-body">
|
||||
{% if applications %}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% trans "Date" %}</th>
|
||||
<th class="text-center">{% trans "Username" %}</th>
|
||||
<th class="text-center">{% trans "Main Character" %}</th>
|
||||
<th class="text-center">{% trans "Corporation" %}</th>
|
||||
<th class="text-center">{% trans "Status" %}</th>
|
||||
<th class="text-center">{% trans "Actions" %}</th>
|
||||
</tr>
|
||||
{% for app in applications %}
|
||||
<tr>
|
||||
<td class="text-center">{{ app.created }}</td>
|
||||
<td class="text-center">{{ app.user.username }}</td>
|
||||
<td class="text-center">{{ app.main_character }}</td>
|
||||
<td class="text-center">{{ app.form.corp.corporation_name }}</td>
|
||||
<td class="text-center">
|
||||
{% if app.approved == None %}
|
||||
{% if app.reviewer_str %}
|
||||
<div class="label label-info">{% trans "Reviewer:" %} {{ app.reviewer_str }}</div>
|
||||
{% else %}
|
||||
<div class="label label-warning">{% trans "Pending" %}</div>
|
||||
{% endif %}
|
||||
{% elif app.approved == True %}
|
||||
<div class="label label-success">{% trans "Approved" %}</div>
|
||||
{% else %}
|
||||
<div class="label label-danger">{% trans "Rejected" %}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'auth_hrapplication_view' app.id %}"
|
||||
class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% trans "No pending applications." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="reviewed" class="tab-pane fade panel panel-default">
|
||||
<div class="panel-body">
|
||||
{% if finished_applications %}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% trans "Date" %}</th>
|
||||
<th class="text-center">{% trans "Username" %}</th>
|
||||
<th class="text-center">{% trans "Main Character" %}</th>
|
||||
<th class="text-center">{% trans "Corporation" %}</th>
|
||||
<th class="text-center">{% trans "Status" %}</th>
|
||||
<th class="text-center">{% trans "Actions" %}</th>
|
||||
</tr>
|
||||
{% for app in finished_applications %}
|
||||
<tr>
|
||||
<td class="text-center">{{ app.created }}</td>
|
||||
<td class="text-center">{{ app.user.username }}</td>
|
||||
<td class="text-center">{{ app.main_character }}</td>
|
||||
<td class="text-center">{{ app.form.corp.corporation_name }}</td>
|
||||
<td class="text-center">
|
||||
{% if app.approved == None %}
|
||||
{% if app.reviewer_str %}
|
||||
<div class="label label-info">{% trans "Reviewer:" %} {{ app.reviewer_str }}</div>
|
||||
{% else %}
|
||||
<div class="label label-warning">{% trans "Pending" %}</div>
|
||||
{% endif %}
|
||||
{% elif app.approved == True %}
|
||||
<div class="label label-success">{% trans "Approved" %}</div>
|
||||
{% else %}
|
||||
<div class="label label-danger">{% trans "Rejected" %}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'auth_hrapplication_view' app.id %}"
|
||||
class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% trans "No reviewed applications." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if perms.auth.human_resources %}
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
||||
class="sr-only">{% trans "Close" %}</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">{% trans "Application Search" %}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-signin" role="form"
|
||||
action={% url 'auth_hrapplication_search' %} method="POST">
|
||||
{% csrf_token %}
|
||||
{{ search_form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Search" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
@@ -1,85 +0,0 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}HR Application Management{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
{% if perms.auth.human_resources %}
|
||||
<h1 class="page-header text-center">{% trans "Application Search Results" %}
|
||||
<div class="text-right">
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal">
|
||||
{% trans "Search Applications" %}
|
||||
</button>
|
||||
</div>
|
||||
</h1>
|
||||
<div class="container-fluid">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th class="text-center">{% trans "Application ID" %}</th>
|
||||
<th class="text-center">{% trans "Username" %}</th>
|
||||
<th class="text-center">{% trans "Main Character" %}</th>
|
||||
<th class="text-center">{% trans "Corporation" %}</th>
|
||||
<th class="text-center">{% trans "Status" %}</th>
|
||||
<th class="text-center">{% trans "Actions" %}</th>
|
||||
</tr>
|
||||
{% for app in applications %}
|
||||
<tr>
|
||||
<td class="text-center">{{ app.id }}</td>
|
||||
<td class="text-center">{{ app.user }}</td>
|
||||
<td class="text-center">{{ app.main_character }}</td>
|
||||
<td class="text-center">{{ app.form.corp }}</td>
|
||||
<td class="text-center">
|
||||
{% if app.approved == None %}
|
||||
<div class="label label-warning">{% trans "Pending" %}</div>
|
||||
{% elif app.approved == True %}
|
||||
<div class="label label-success">{% trans "Approved" %}</div>
|
||||
{% else %}
|
||||
<div class="label label-danger">{% trans "Rejected" %}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'auth_hrapplication_view' app.id %}" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if perms.auth.human_resources %}
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
|
||||
class="sr-only">{% trans "Close" %}</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">{% trans "Application Search" %}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-signin" role="form"
|
||||
action={% url 'auth_hrapplication_search' %} method="POST">
|
||||
{% csrf_token %}
|
||||
{{ search_form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Search" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
@@ -1,164 +0,0 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load bootstrap %}
|
||||
{% load i18n %}
|
||||
{% load eveonline_extras %}
|
||||
|
||||
{% block title %}Alliance Auth - {% trans "View Application" %}{% endblock %}
|
||||
{% block page_title %}{% trans "View Application" %}{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% trans "View Application" %}</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<div class="row">
|
||||
{% if app.approved %}
|
||||
<div class="alert alert-success text-center">{% trans "Approved" %}</div>
|
||||
{% elif app.approved == False %}
|
||||
<div class="alert alert-danger text-center">{% trans "Denied" %}</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% trans "Pending" %}</div>
|
||||
{% endif %}
|
||||
{% if app.reviewer_str %}
|
||||
<div class="alert alert-info text-center">{% trans "Reviewer:" %} {{ app.reviewer_str }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">{% trans "Applicant" %}</div>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% trans "User" %}</th>
|
||||
<th class="text-center">{% trans "Main Character" %}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">{{ app.user }}</td>
|
||||
<td class="text-center">{{ app.main_character }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">{% trans "Characters" %}</div>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center"></th>
|
||||
<th class="text-center">{% trans "Name" %}</th>
|
||||
<th class="text-center">{% trans "Corp" %}</th>
|
||||
<th class="text-center">{% trans "Alliance" %}</th>
|
||||
</tr>
|
||||
{% for char in app.characters %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<img class="ra-avatar img-responsive img-circle"
|
||||
src="https://image.eveonline.com/Character/{{ char.character_id }}_32.jpg">
|
||||
</td>
|
||||
<td class="text-center">{{ char.character_name }}</td>
|
||||
<td class="text-center">{{ char.corporation_name }}</td>
|
||||
<td class="text-center">{{ char.alliance_name }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
{% for response in responses %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{{ response.question.title }}</div>
|
||||
<div class="alert">{{ response.answer|linebreaksbr }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if buttons %}
|
||||
{% if perms.auth.human_resources %}
|
||||
<div class="row">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">{% trans "Actions" %}</div>
|
||||
<div class="panel-body text-center">
|
||||
{% if app.approved == None %}
|
||||
{% if app.reviewer == user %}
|
||||
{% if perms.hrapplications.approve_application %}
|
||||
<a href="{% url 'auth_hrapplication_approve' app.id %}"
|
||||
class="btn btn-success">{% trans "Approve" %}</a>
|
||||
{% endif %}
|
||||
{% if perms.hrapplications.reject_application %}
|
||||
<a href="{% url 'auth_hrapplication_reject' app.id %}"
|
||||
class="btn btn-danger">{% trans "Reject" %}</a>
|
||||
{% endif %}
|
||||
{% if perms.hrapplications.delete_application %}
|
||||
<a href="{% url 'auth_hrapplication_remove' app.id %}"
|
||||
class="btn btn-danger">{% trans "Delete" %}</a>
|
||||
{% endif %}
|
||||
{% elif not app.reviewer %}
|
||||
<a href="{% url 'auth_hrapplication_mark_in_progress' app.id %}"
|
||||
class="btn btn-warning">{% trans "Mark in Progress" %}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if perms.hrapplications.add_applicationcomment %}
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal"
|
||||
data-target="#myModal">{% trans "Comment" %}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab" id="headingThree">
|
||||
<h4 class="panel-title">
|
||||
<a class="collapsed" data-toggle="collapse" data-parent="#accordion"
|
||||
href="#collapseThree" aria-expanded="false"
|
||||
aria-controls="collapseThree">
|
||||
{% trans 'Comments' %} ({{ comments.count }})
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapseThree" class="panel-collapse collapse" role="tabpanel"
|
||||
aria-labelledby="headingThree">
|
||||
<div class="panel-body">
|
||||
{% for comment in comments %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab" id="">
|
||||
<div class="panel-title">
|
||||
<div class="pull-right">{{ comment.created }}</div>
|
||||
<div class="pull-left">{% if comment.user.profile.main_character %}{{ comment.user.profile.main_character }}{% else %}{{ comment.user }}{% endif %}</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">{{ comment.text|linebreaks }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if perms.hrapplications.add_applicationcomment %}
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span><span class="sr-only">{% trans "Close" %}</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel">{% trans "Add Comment" %}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ comment_form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Add Comment" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,119 +0,0 @@
|
||||
{% extends "registered/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>
|
||||
|
||||
<h4><b>{% trans "Next Timers" %}</b></h4>
|
||||
{% if future_timers %}
|
||||
{% include "registered/fleetoptable.html" with timers=future_timers %}
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% trans "No upcoming timers." %}</div>
|
||||
{% endif %}
|
||||
|
||||
<h4><b>{% trans "Past Timers" %}</b></h4>
|
||||
{% if past_timers %}
|
||||
{% include "registered/fleetoptable.html" with timers=past_timers %}
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% trans "No past timers." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% include 'bundles/moment-js.html' with locale=True %}
|
||||
<script src="{% static 'js/timers.js' %}"></script>
|
||||
<script type="text/javascript">
|
||||
// Data
|
||||
var timers = [
|
||||
{% for op in optimer %}
|
||||
{
|
||||
'id': {{ op.id }},
|
||||
'start': moment("{{ op.start | date:"c" }}"),
|
||||
'expired': false
|
||||
},
|
||||
{% endfor %}
|
||||
];
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
timedUpdate();
|
||||
setAllLocalTimes();
|
||||
|
||||
// Start timed updates
|
||||
setInterval(timedUpdate, 1000);
|
||||
|
||||
function timedUpdate() {
|
||||
updateClock();
|
||||
updateAllTimers();
|
||||
}
|
||||
|
||||
function updateAllTimers () {
|
||||
var l = timers.length;
|
||||
for (var i=0; i < l; ++i) {
|
||||
if (timers[i].expired) continue;
|
||||
updateTimer(timers[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a timer
|
||||
* @param timer Timer information
|
||||
* @param timer.start Date of the timer
|
||||
* @param timer.id Id number of the timer
|
||||
* @param timer.expired
|
||||
*/
|
||||
function updateTimer(timer) {
|
||||
if (timer.start.isAfter(Date.now())) {
|
||||
var duration = moment.duration(timer.start - moment(), 'milliseconds');
|
||||
document.getElementById("countdown" + timer.id).innerHTML = getDurationString(duration);
|
||||
} else {
|
||||
timer.expired = true;
|
||||
document.getElementById("countdown" + timer.id).innerHTML = "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set all local time fields
|
||||
*/
|
||||
function setAllLocalTimes() {
|
||||
var l = timers.length;
|
||||
for (var i=0; i < l; ++i) {
|
||||
setLocalTime(timers[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the local time info for the timer
|
||||
* @param timer Timer information
|
||||
* @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 updateClock() {
|
||||
document.getElementById("current-time").innerHTML = "<b>" + moment.utc().format('LLLL') + "</b>";
|
||||
}
|
||||
</script>
|
||||
{% endblock content %}
|
||||
@@ -1,54 +0,0 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
|
||||
{% block title %}Alliance Auth - Update Fleet Operation {% endblock %}
|
||||
|
||||
{% block page_title %}{% trans "Update AAR Link" %}{% endblock page_title %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/jquery-datetimepicker-css.html' %}
|
||||
{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% trans "Update Fleet Operation" %}</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
{% if no_fleet_id %}
|
||||
<div class="alert alert-danger" role="alert">{% trans "Fleet Operation Does Not Exist" %}</div>
|
||||
{% else %}
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Update Fleet Operation" %}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
|
||||
$('#id_start').datetimepicker({
|
||||
lang: '{{ LANGUAGE_CODE }}',
|
||||
maskInput: true,
|
||||
format: 'Y-m-d H:i',minDate:0
|
||||
});
|
||||
|
||||
{% endblock extra_script %}
|
||||
@@ -1,55 +0,0 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Alliance Auth - SRP Fleet Create{% endblock %}
|
||||
|
||||
{% block page_title %}{% trans "SRP Fleet Create" %}{% endblock page_title %}
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/jquery-datetimepicker-css.html' %}
|
||||
{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% trans "Create SRP Fleet" %}</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
{% if completed == False %}
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Create SRP Fleet" %}</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<div class="alert alert-info" role="alert">{% blocktrans %}Give this link to the line members{% endblocktrans %}.</div>
|
||||
<div class="alert alert-info" role="alert">
|
||||
http://{{ request.get_host }}{% url 'auth_srp_request_view' completed_srp_code %}</div>
|
||||
<div class="text-center">
|
||||
<a href="{% url 'auth_srp_management_view' %}" class="btn btn-primary btn-lg">{% trans "Continue" %}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
|
||||
$('#id_fleet_time').datetimepicker({
|
||||
maskInput: true,
|
||||
format: 'Y-m-d H:i'
|
||||
});
|
||||
|
||||
{% endblock extra_script %}
|
||||
@@ -1,208 +0,0 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% load humanize %}
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}Srp Fleet Data{% endblock page_title %}
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/x-editable.css.html' %}
|
||||
<link href="{% static 'css/checkbox.css' %}" rel="stylesheet" type="text/css">
|
||||
<style>
|
||||
.radio label, .checkbox label {
|
||||
padding-left: 10px;
|
||||
}
|
||||
.editable {
|
||||
width:150px;
|
||||
text-align: center;
|
||||
}
|
||||
.editableform .form-control {
|
||||
width: 95%;
|
||||
text-align: center;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.editable-input {
|
||||
width: 95%;
|
||||
}
|
||||
.radio, .checkbox {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.editable-error-block {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.editable-click, a.editable-click, a.editable-click:hover {
|
||||
border-bottom: none;
|
||||
}
|
||||
.tooltip-inner {
|
||||
white-space:pre;
|
||||
max-width: none;
|
||||
}
|
||||
</style>
|
||||
{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<h1 class="page-header text-center">{% trans "SRP Fleet Data" %}
|
||||
<div class="text-right">
|
||||
{% if perms.auth.srp_management %}
|
||||
{% if fleet_status == "Completed" %}
|
||||
<a href="{% url 'auth_srp_fleet_mark_uncompleted' fleet_id %}" class="btn btn-warning">
|
||||
{% trans "Mark Incomplete" %}
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'auth_srp_fleet_mark_completed' fleet_id %}" class="btn btn-success">
|
||||
{% trans "Mark Completed" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</h1>
|
||||
|
||||
{% if srpfleetrequests %}
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="alert alert-info" role="alert">
|
||||
<div class="text-right">
|
||||
<b><span style="padding-right:2.5em">{% trans "Total Losses:" %} {{ srpfleetrequests.count }}</span></b>
|
||||
<b><span style="padding-right:2.5em">{% trans "Total ISK Cost:" %} {{ totalcost | intcomma }}</span></b>
|
||||
{% if perms.auth.srp_management %}
|
||||
<button type="submit" title="Approve" class="btn btn-success" formaction="{% url 'auth_srp_request_approve' %}">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
</button>
|
||||
<button type="submit" title="Reject" class="btn btn-warning" formaction="{% url 'auth_srp_request_reject' %}">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</button>
|
||||
<button type="submit" title="Remove" onclick="return confirm('{% trans "Are you sure you want to delete SRP requests?" %}')" class="btn btn-danger" formaction="{% url 'auth_srp_request_remove' %}">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% trans "Pilot Name" %}</th>
|
||||
<th class="text-center">{% trans "Killboard Link" %}</th>
|
||||
<th class="text-center">{% trans "Additional Info" %}</th>
|
||||
<th class="text-center">{% trans "Ship Type" %}</th>
|
||||
<th class="text-center">{% trans "Killboard Loss Amt" %}</th>
|
||||
<th class="text-center">{% trans "SRP ISK Cost" %}
|
||||
{% blocktrans %}<i class="glyphicon glyphicon-question-sign" rel="tooltip" title="Click value to edit
|
||||
Enter to save&next
|
||||
ESC to cancel"
|
||||
id="blah"></i></th>{% endblocktrans %}
|
||||
<th class="text-center">{% trans "Post Time" %}</th>
|
||||
<th class="text-center">{% trans "Status" %}</th>
|
||||
{% if perms.auth.srp_management %}
|
||||
<th class="text-center">{% trans "Actions" %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% for srpfleetrequest in srpfleetrequests %}
|
||||
<tr>
|
||||
<td class="text-center">{{ srpfleetrequest.character.character_name }}</td>
|
||||
<td class="text-center">
|
||||
<a href="{{ srpfleetrequest.killboard_link }}"
|
||||
target="_blank" class="label label-warning">Link</a>
|
||||
</td>
|
||||
<td class="text-center">{{ srpfleetrequest.additional_info }}</td>
|
||||
<td class="text-center">{{ srpfleetrequest.srp_ship_name }}</td>
|
||||
<td class="text-center">{{ srpfleetrequest.kb_total_loss | intcomma }} ISK</td>
|
||||
<td class="srp" data-name="srp_total_amount" data-type="number" data-pk="{{srpfleetrequest.id}}" data-url="{% url 'auth_srp_request_update_amount' srpfleetrequest.id %}" data-params="{csrfmiddlewaretoken:'{{csrf_token}}'}" class="text-center">{{ srpfleetrequest.srp_total_amount | intcomma }} ISK</td>
|
||||
<td class="text-center">{{ srpfleetrequest.post_time | date:"Y-m-d H:i" }}</td>
|
||||
<td class="text-center">
|
||||
{% if srpfleetrequest.srp_status == "Approved" %}
|
||||
<div class="label label-success">
|
||||
{% trans "Approved" %}
|
||||
</div>
|
||||
{% elif srpfleetrequest.srp_status == "Rejected" %}
|
||||
<div class="label label-danger">
|
||||
{% trans "Rejected" %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="label label-warning">
|
||||
{% trans "Pending" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if perms.auth.srp_management %}
|
||||
<td class="text-center">
|
||||
<div class="checkbox">
|
||||
<label style="font-size: 1.5em">
|
||||
<input type="checkbox" name="{{srpfleetrequest.id}}">
|
||||
<span class="cr"><i class="cr-icon fa fa-check"></i></span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<div class="alert alert-info" role="alert">
|
||||
<div class="text-right">
|
||||
<b><span style="padding-right:2.5em">{% trans "Total Losses:" %} {{ srpfleetrequests.count }}</span></b>
|
||||
<b><span style="padding-right:2.5em">{% trans "Total ISK Cost:" %} {{ totalcost | intcomma }}</span></b>
|
||||
{% if perms.auth.srp_management %}
|
||||
<button type="submit" title="Approve" class="btn btn-success" formaction="{% url 'auth_srp_request_approve' %}">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
</button>
|
||||
<button type="submit" title="Reject" class="btn btn-warning" formaction="{% url 'auth_srp_request_reject' %}">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</button>
|
||||
<button type="submit" title="Remove" onclick="return confirm('{% trans "Are you sure you want to delete SRP requests?" %}')" class="btn btn-danger" formaction="{% url 'auth_srp_request_remove' %}">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% trans "No SRP requests for this fleet." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/x-editable-js.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
$(document).ready(function() {
|
||||
$.fn.editable.defaults.mode = 'inline';
|
||||
$.fn.editable.defaults.showbuttons = false;
|
||||
$.fn.editable.defaults.highlight = "#AAFF80";
|
||||
|
||||
|
||||
$('.srp').editable({
|
||||
display: function(value, response) {
|
||||
return false;
|
||||
},
|
||||
success: function(response, newValue) {
|
||||
newValue = parseInt(newValue);
|
||||
newvalue = newValue.toLocaleString() + " ISK";
|
||||
$(this).html(newvalue.bold());
|
||||
},
|
||||
validate: function(value) {
|
||||
if (value === null || value === '') {
|
||||
return 'Empty values not allowed';
|
||||
}
|
||||
}
|
||||
});
|
||||
$('.srp').on('hidden', function(e, reason){
|
||||
if(reason === 'save' || reason === 'nochange') {
|
||||
var $next = $(this).closest('tr').next().find('.editable');
|
||||
setTimeout(function() {
|
||||
$next.editable('show');
|
||||
}, 400);
|
||||
}
|
||||
});
|
||||
});
|
||||
$(document).ready(function(){
|
||||
$("[rel=tooltip]").tooltip({ placement: 'top'});
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
@@ -1,31 +0,0 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}SRP Request{% endblock %}
|
||||
|
||||
{% block page_title %}{% trans "SRP Request" %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% trans "Create SRP Request" %}</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Create SRP Request" %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
@@ -1,35 +0,0 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Alliance Auth - Update AAR Link{% endblock %}
|
||||
|
||||
{% block page_title %}{% trans "Update AAR Link" %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% trans "Update AAR Link" %}</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
{% if no_fleet_id %}
|
||||
<div class="alert alert-danger" role="alert">{% trans "SRP Fleet Does Not Exist" %}</div>
|
||||
{% else %}
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Update AAR Link" %}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
@@ -1,125 +0,0 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% load humanize %}
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}{% trans "Srp Management" %}{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<h1 class="page-header text-center">{% trans "SRP Management" %}
|
||||
<div class="text-right">
|
||||
{% if perms.auth.srp_management %}
|
||||
<a href="{% url 'auth_srp_management_all_view' %}" class="btn btn-primary">
|
||||
{% trans "View All" %}
|
||||
</a>
|
||||
<a href="{% url 'auth_srp_fleet_add_view' %}" class="btn btn-success">
|
||||
{% trans "Add SRP Fleet" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</h1>
|
||||
<div class="alert alert-info" role="alert">
|
||||
<div class="text-right">
|
||||
<b>{% trans "Total ISK Cost:" %} {{ totalcost | intcomma }}</b>
|
||||
</div>
|
||||
</div>
|
||||
{% if srpfleets %}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% trans "Fleet Name" %}</th>
|
||||
<th class="text-center">{% trans "Fleet Time" %}</th>
|
||||
<th class="text-center">{% trans "Fleet Doctrine" %}</th>
|
||||
<th class="text-center">{% trans "Fleet Commander" %}</th>
|
||||
<th class="text-center">{% trans "Fleet AAR" %}</th>
|
||||
<th class="text-center">{% trans "Fleet SRP Code" %}</th>
|
||||
<th class="text-center">{% trans "Fleet ISK Cost" %}</th>
|
||||
<th class="text-center">{% trans "SRP Status" %}</th>
|
||||
<th class="text-center">{% trans "Pending Requests" %}</th>
|
||||
<th width="100px" class="text-center">{% trans "Actions" %}</th>
|
||||
</tr>
|
||||
{% for srpfleet in srpfleets %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<div class="label label-info">
|
||||
{{ srpfleet.fleet_name }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">{{ srpfleet.fleet_time | date:"Y-m-d H:i" }}</td>
|
||||
<td class="text-center">{{ srpfleet.fleet_doctrine }}</td>
|
||||
<td class="text-center">
|
||||
<div class="label label-success">
|
||||
{{ srpfleet.fleet_commander.character_name }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if srpfleet.fleet_srp_aar_link %}
|
||||
<a href="{{ srpfleet.fleet_srp_aar_link }}" target="_blank" class="label label-primary">{% trans 'Link' %}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if srpfleet.fleet_srp_code %}
|
||||
<a class="label label-warning" href="{% url 'auth_srp_request_view' srpfleet.fleet_srp_code %}">{{ srpfleet.fleet_srp_code }}</a>
|
||||
{% else %}
|
||||
<div class="label label-danger">
|
||||
{% trans "Disabled" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">ISK: {{ srpfleet.total_cost | intcomma }}</td>
|
||||
|
||||
<td class="text-center">
|
||||
{% if srpfleet.fleet_srp_status == "" %}
|
||||
<div class="label label-warning">
|
||||
{% trans "Pending" %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="label label-success">
|
||||
{% trans "Completed" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="label label-warning">{{ srpfleet.pending_requests }}</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
|
||||
<a href="{% url 'auth_srp_fleet_view' srpfleet.id %}" class="btn btn-primary" title="View">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
</a>
|
||||
|
||||
{% if perms.auth.srp_management %}
|
||||
<a href="{% url 'auth_srp_fleet_edit_view' srpfleet.id %}" class="btn btn-info" title="Edit">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
|
||||
<a href="{% url 'auth_srp_fleet_remove' srpfleet.id %}" onclick="return confirm('{% trans "Are you sure you want to delete this SRP code and its contents?" %}')" class="btn btn-danger" title="Remove">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{% if srpfleet.fleet_srp_code %}
|
||||
<a href="{% url 'auth_srp_fleet_disable' srpfleet.id %}" class="btn btn-warning" title="Disable">
|
||||
<span class="glyphicon glyphicon-remove-sign"></span>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'auth_srp_fleet_enable' srpfleet.id %}" class="btn btn-success" title="Enable">
|
||||
<span class="glyphicon glyphicon-ok-sign"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% trans "No SRP fleets created." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
@@ -1,518 +0,0 @@
|
||||
{% extends "registered/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">
|
||||
{% if perms.auth.timer_management %}
|
||||
<a href="{% url 'auth_add_timer_view' %}" class="btn btn-success">{% trans "Create Structure Timer" %}</a>
|
||||
{% endif %}
|
||||
</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>
|
||||
{% if corp_timers %}
|
||||
<h4><b>{% trans "Corp Timers" %}</b></h4>
|
||||
<table class="table">
|
||||
<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 "Citadel[M]" %}
|
||||
<div class="label label-danger">
|
||||
Citadel [M]
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Citadel[L]" %}
|
||||
<div class="label label-danger">
|
||||
Citadel [L]
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Citadel[XL]" %}
|
||||
<div class="label label-danger">
|
||||
Citadel [XL]
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Engineering Complex[M]" %}
|
||||
<div class="label label-warning">
|
||||
Engineering Complex [M]
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Engineering Complex[L]" %}
|
||||
<div class="label label-warning">
|
||||
Engineering Complex [L]
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Engineering Complex[XL]" %}
|
||||
<div class="label label-warning">
|
||||
Engineering Complex [XL]
|
||||
</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="localtime{{ timer.id }}"></div>
|
||||
<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="{% url 'auth_remove_timer' timer.id %}" class="btn btn-danger">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
<a href="{% url 'auth_edit_timer' timer.id %}" class="btn btn-info">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
<h4><b>{% trans "Next Timers" %}</b></h4>
|
||||
{% if future_timers %}
|
||||
<table class="table">
|
||||
<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 future_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 "Citadel[M]" %}
|
||||
<div class="label label-danger">
|
||||
Citadel [M]
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Citadel[L]" %}
|
||||
<div class="label label-danger">
|
||||
Citadel [L]
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Citadel[XL]" %}
|
||||
<div class="label label-danger">
|
||||
Citadel [XL]
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Engineering Complex[M]" %}
|
||||
<div class="label label-warning">
|
||||
Engineering Complex [M]
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Engineering Complex[L]" %}
|
||||
<div class="label label-warning">
|
||||
Engineering Complex [L]
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Engineering Complex[XL]" %}
|
||||
<div class="label label-warning">
|
||||
Engineering Complex [XL]
|
||||
</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="localtime{{ timer.id }}"></div>
|
||||
<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="{% url 'auth_remove_timer' timer.id %}" class="btn btn-danger">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
<a href="{% url 'auth_edit_timer' timer.id %}" class="btn btn-info">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% trans "No upcoming timers." %}</div>
|
||||
{% endif %}
|
||||
<h4><b>{% trans "Past Timers" %}</b></h4>
|
||||
{% if past_timers %}
|
||||
<table class="table">
|
||||
<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 past_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 "Citadel[M]" %}
|
||||
<div class="label label-danger">
|
||||
Citadel [M]
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Citadel[L]" %}
|
||||
<div class="label label-danger">
|
||||
Citadel [L]
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Citadel[XL]" %}
|
||||
<div class="label label-danger">
|
||||
Citadel [XL]
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Engineering Complex[M]" %}
|
||||
<div class="label label-warning">
|
||||
Engineering Complex [M]
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Engineering Complex[L]" %}
|
||||
<div class="label label-warning">
|
||||
Engineering Complex [L]
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Engineering Complex[XL]" %}
|
||||
<div class="label label-warning">
|
||||
Engineering Complex [XL]
|
||||
</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="localtime{{ timer.id }}"></div>
|
||||
<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="{% url 'auth_remove_timer' timer.id %}" class="btn btn-danger">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
<a href="{% url 'auth_edit_timer' timer.id %}" class="btn btn-info">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% trans "No past timers." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% include 'bundles/moment-js.html' with locale=True %}
|
||||
<script src="{% static 'js/timers.js' %}"></script>
|
||||
<script type="text/javascript">
|
||||
var locale = "{{ LANGUAGE_CODE }}";
|
||||
|
||||
var timers = [
|
||||
{% for timer in timers %}
|
||||
{
|
||||
'id': {{ timer.id }},
|
||||
'targetDate': moment("{{ timer.eve_time | date:"c" }}"),
|
||||
'expired': false
|
||||
},
|
||||
{% endfor %}
|
||||
{% for timer in corp_timers %}
|
||||
{
|
||||
'id': {{ timer.id }},
|
||||
'targetDate': moment("{{ timer.eve_time | date:"c" }}"),
|
||||
'expired': false
|
||||
},
|
||||
{% endfor %}
|
||||
];
|
||||
|
||||
moment.locale(locale);
|
||||
|
||||
// Set initial values
|
||||
setAllLocalTimes();
|
||||
timedUpdate();
|
||||
|
||||
// Start timed updates
|
||||
setInterval(timedUpdate, 1000);
|
||||
|
||||
function timedUpdate() {
|
||||
updateClock();
|
||||
updateAllTimers();
|
||||
}
|
||||
|
||||
function updateAllTimers () {
|
||||
var l = timers.length;
|
||||
for (var i=0; i < l; ++i) {
|
||||
if (timers[i].expired) continue;
|
||||
updateTimer(timers[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a timer
|
||||
* @param timer Timer information
|
||||
* @param timer.targetDate Date of the timer
|
||||
* @param timer.id Id number of the timer
|
||||
* @param timer.expired
|
||||
*/
|
||||
function updateTimer(timer) {
|
||||
if (timer.targetDate.isAfter(Date.now())) {
|
||||
duration = moment.duration(timer.targetDate - moment(), 'milliseconds');
|
||||
document.getElementById("countdown" + timer.id).innerHTML = getDurationString(duration);
|
||||
} else {
|
||||
timer.expired = true;
|
||||
document.getElementById("countdown" + timer.id).innerHTML = "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set all local time fields
|
||||
*/
|
||||
function setAllLocalTimes() {
|
||||
var l = timers.length;
|
||||
for (var i=0; i < l; ++i) {
|
||||
setLocalTime(timers[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the local time info for the timer
|
||||
* @param timer Timer information
|
||||
* @param timer.targetDate Date of the timer
|
||||
* @param timer.id Id number of the timer
|
||||
*/
|
||||
function setLocalTime(timer) {
|
||||
document.getElementById("localtime" + timer.id).innerHTML = timer.targetDate.format("ddd @ LT");
|
||||
}
|
||||
|
||||
function updateClock() {
|
||||
document.getElementById("current-time").innerHTML = "<b>" + moment().format('LLLL') + "</b>";
|
||||
}
|
||||
</script>
|
||||
{% endblock content %}
|
||||
@@ -1,35 +0,0 @@
|
||||
{% extends "registered/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Alliance Auth - Update Structure Timer {% endblock %}
|
||||
|
||||
{% block page_title %}{% trans "Update AAR Link" %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% trans "Update Structure Timer" %}</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
{% if no_fleet_id %}
|
||||
<div class="alert alert-danger" role="alert">{% trans "Structure Timer Does Not Exist" %}</div>
|
||||
{% else %}
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Update Structure Timer" %}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user