Move FAT templates to app folder.

Provide feedback via messages.
This commit is contained in:
Adarnof
2016-12-11 23:26:20 -05:00
parent b4b739ee61
commit 32009fd3ff
10 changed files with 17 additions and 53 deletions

View File

@@ -0,0 +1,25 @@
{% extends 'public/base.html' %}
{% block title %}Fleet Participation{% endblock %}
{% block page_title %}Fleet Participation{% endblock %}
<div class="col-lg-12">
<h1 class="page-header text-center">Character not found!</h1>
<div class="col-lg-12 container" id="example">
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">{{ character_name }}</div>
<div class="panel-body">
<div class="col-lg-2 col-sm-2">
<img class="ra-avatar img-responsive" src="https://image.eveonline.com/Character/{{ character_id }}_128.jpg">
</div>
<div class="col-lg-10 col-sm-2">
<div class="alert alert-danger" role="alert">Character not registered!</div>
This character is not part of any registered API-key. You must go to <a href=" {% url 'auth_api_key_management' %}">API key management</a> and add an API with the character on before being able to click fleet attendance links.
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,37 @@
{% extends "public/base.html" %}
{% load bootstrap %}
{% load staticfiles %}
{% load i18n %}
{% block title %}Alliance Auth - Fatlink Create{% endblock %}
{% block page_title %}{% trans "Create Fatlink" %}{% endblock page_title %}
{% block extra_css %}
<link href="{% static 'css/jquery.datetimepicker.css' %}" rel="stylesheet" type="text/css">{% 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">
{% if badrequest %}
<div class="alert alert-danger" role="alert">{% trans "Bad request!" %}</div>
{% endif %}
{% for message in errormessages %}
<div class="alert alert-danger" role="alert">{{ message }}</div>
{% endfor %}
<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" name="submit_fat">{% trans "Create fatlink" %}</button>
</form>
</div>
</div>
</div>
</div>
{% endblock content %}

View File

@@ -0,0 +1,55 @@
{% extends "public/base.html" %}
{% load bootstrap %}
{% load staticfiles %}
{% load i18n %}
{% block title %}Alliance Auth{% endblock %}
{% block page_title %}{% trans "Fatlink view" %}{% endblock page_title %}
{% block content %}
<div class="col-lg-12">
<h1 class="page-header text-center">{% blocktrans %}Edit fatlink "{{ fatlink.name }}"{% endblocktrans %}
<div class="text-right">
<form>
<button type="submit" onclick="return confirm('Are you sure?')" class="btn btn-danger" name="deletefat" value="True">
{% trans "Delete fat" %}
</button>
</form>
</div>
</h1>
<h4><b>{% trans "Registered characters" %}</b></h4>
<table class="table table-responsive table-bordered">
<tr>
<th class="text-center">{% trans "User" %}</th>
<th class="text-center">{% trans "Character" %}</th>
<th class="text-center">{% trans "System" %}</th>
<th class="text-center">{% trans "Ship" %}</th>
<th class="text-center">{% trans "Eve Time" %}</th>
<th></th>
</tr>
{% for fat in registered_fats %}
<tr>
<td class="text-center">{{ fat.user }}</td>
<td class="text-center">{{ fat.character.character_name }}</td>
{% if fat.station != "No Station" %}
<td class="text-center">Docked in {{ fat.system }}</td>
{% else %}
<td class="text-center">{{ fat.system }}</td>
{% endif %}
<td class="text-center">{{ fat.shiptype }}</td>
<td class="text-center">{{ fat.fatlink.fatdatetime }}</td>
<td class="text-center">
<form>
<button type="submit" class="btn btn-warning" name="removechar" value="{{ fat.character.character_id }}"><span
class="glyphicon glyphicon-remove"></span></button>
</form>
</td>
</tr>
{% endfor %}
</table>
</div>
<script src="/static/js/dateformat.js"></script>
{% endblock content %}

View File

@@ -0,0 +1,68 @@
{% extends "public/base.html" %}
{% load bootstrap %}
{% load staticfiles %}
{% load i18n %}
{% block title %}Alliance Auth{% endblock %}
{% block page_title %}{% trans "Personal fatlink statistics" %}{% endblock page_title %}
{% block content %}
<div class="col-lg-12">
<h1 class="page-header text-center">{% trans "Participation data statistics for" %} {{ month }}, {{ year }}
{% if char_id %}
<div class="text-right">
<a href="{% url 'auth_fatlink_view_user_statistics_month' char_id previous_month|date:"Y" previous_month|date:"m" %}" class="btn btn-info">{% trans "Previous month" %}</a>
<a href="{% url 'auth_fatlink_view_user_statistics_month' char_id next_month|date:"Y" next_month|date:"m" %}" class="btn btn-info">{% trans "Next month" %}</a>
</div>
{% endif %}
</h1>
<h2>{% blocktrans %}{{ user }} has collected {{ n_fats }} links this month.{% endblocktrans %}</h2>
<table class="table table-responsive">
<tr>
<th class="col-md-2 text-center">{% trans "Ship" %}</th>
<th class="col-md-2 text-center">{% trans "Times used" %}</th>
</tr>
{% for ship, n_fats in shipStats %}
<tr>
<td class="text-center">{{ ship }}</td>
<td class="text-center">{{ n_fats }}</td>
</tr>
{% endfor %}
</table>
{% if created_fats %}
<h2>{% blocktrans %}{{ user }} has created {{ n_created_fats }} links this month.{% endblocktrans %}</h2>
{% if created_fats %}
<table class="table">
<tr>
<th class="text-center">{% trans "Name" %}</th>
<th class="text-center">{% trans "Creator" %}</th>
<th class="text-center">{% trans "Fleet" %}</th>
<th class="text-center">{% trans "Eve Time" %}</th>
<th class="text-center">{% trans "Duration" %}</th>
<th class="text-center">{% trans "Edit" %}</th>
</tr>
{% for link in created_fats %}
<tr>
<td class="text-center"><a href="{% url 'auth_click_fatlink_view' %}{{ link.hash }}/{{ link.name }}">{{ link.name }}</a></td>
<td class="text-center">{{ link.creator.username }}</td>
<td class="text-center">{{ link.fleet }}</td>
<td class="text-center">{{ link.fatdatetime }}</td>
<td class="text-center">{{ link.duration }}</td>
<td class="text-center">
<a href="{% url 'auth_modify_fatlink_view' %}{{ link.hash }}/{{ link.name }}">
<button type="button" class="btn btn-info"><span
class="glyphicon glyphicon-edit"></span></button>
</a>
</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% endif %}
</div>
<script src="/static/js/dateformat.js"></script>
{% endblock content %}

View File

@@ -0,0 +1,42 @@
{% extends "public/base.html" %}
{% load bootstrap %}
{% load staticfiles %}
{% load i18n %}
{% block title %}Alliance Auth{% endblock %}
{% block page_title %}{% trans "Personal fatlink statistics" %}{% endblock page_title %}
{% block content %}
<div class="col-lg-12">
<h1 class="page-header text-center">{% trans "Participation data statistics for" %} {{ year }}
<div class="text-right">
<a href="{% url 'auth_fatlink_view_personal_statistics_year' previous_year %}" class="btn btn-info">{% trans "Previous year" %}</a>
{% if next_year %}
<a href="{% url 'auth_fatlink_view_personal_statistics_year' next_year %}" class="btn btn-info">{% trans "Next year" %}</a>
{% endif %}
</div>
</h1>
<div class="col-lg-2 col-lg-offset-5">
<table class="table table-responsive">
<tr>
<th class="col-md-2 text-center">{% trans "Month" %}</th>
<th class="col-md-2 text-center">{% trans "Fats" %}</th>
</tr>
{% for monthnr, month, n_fats in monthlystats %}
<tr>
<td class="text-center">
<a href="{% url 'auth_fatlink_view_personal_statistics_month' year monthnr %}">
{{ month }}
</a>
</td>
<td class="text-center">{{ n_fats }}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
<script src="/static/js/dateformat.js"></script>
{% endblock content %}

View File

@@ -0,0 +1,48 @@
{% extends "public/base.html" %}
{% load bootstrap %}
{% load staticfiles %}
{% load i18n %}
{% block title %}Alliance Auth{% endblock %}
{% block page_title %}{% trans "Fatlink statistics" %}{% endblock page_title %}
{% block content %}
<div class="col-lg-12">
<h1 class="page-header text-center">{% blocktrans %}Participation data statistics for {{ month }}, {{ year }}{% endblocktrans %}
<div class="text-right">
<a href="{% url 'auth_fatlink_view_statistics_month' previous_month|date:"Y" previous_month|date:"m" %}" class="btn btn-info">{% trans "Previous month" %}</a>
{% if next_month %}
<a href="{% url 'auth_fatlink_view_statistics_month' next_month|date:"Y" next_month|date:"m" %}" class="btn btn-info">{% trans "Next month" %}</a>
{% endif %}
</div>
</h1>
{% if fatStats %}
<table class="table table-responsive">
<tr>
<th class="col-md-1"></th>
<th class="col-md-2 text-center">{% trans "Ticker" %}</th>
<th class="col-md-5 text-center">{% trans "Corp" %}</th>
<th class="col-md-2 text-center">{% trans "Members" %}</th>
<th class="col-md-2 text-center">{% trans "Fats" %}</th>
<th class="col-md-2 text-center">{% trans "Average fats" %}</th>
</tr>
{% for corpStat in fatStats %}
<tr>
<td>
<img src="https://image.eveonline.com/Corporation/{{ corpStat.corp.corporation_id }}_32.png" class="ra-avatar img-responsive">
</td>
<td class="text-center">[{{ corpStat.corp.corporation_ticker }}]</td>
<td class="text-center">{{ corpStat.corp.corporation_name }}</td>
<td class="text-center">{{ corpStat.corp.member_count }}</td>
<td class="text-center">{{ corpStat.n_fats }}</td>
<td class="text-center">{{ corpStat.avg_fat }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
</div>
<script src="/static/js/dateformat.js"></script>
{% endblock content %}

View File

@@ -0,0 +1,106 @@
{% extends "public/base.html" %}
{% load bootstrap %}
{% load staticfiles %}
{% load i18n %}
{% block title %}Alliance Auth{% endblock %}
{% block page_title %}{% trans "Fatlink view" %}{% endblock page_title %}
{% block content %}
<div class="col-lg-12">
<h1 class="page-header text-center">{% trans "Participation data" %}</h1>
<table class="table">
<tr>
<th class="col-md-11">
<h4><b>{% trans "Most recent clicked fatlinks" %}</b>
</h4>
</th>
<th class="col-md-1">
<a href="{% url 'auth_fatlink_view_personal_statistics' %}" class="btn btn-info">
{% trans "Personal statistics" %}
</a>
</th>
</tr>
</table>
{% if fats %}
<table class="table table-responsive">
<tr>
<th class="text-center">{% trans "fatname" %}</th>
<th class="text-center">{% trans "Character" %}</th>
<th class="text-center">{% trans "System" %}</th>
<th class="text-center">{% trans "Ship" %}</th>
<th class="text-center">{% trans "Eve Time" %}</th>
</tr>
{% for fat in fats %}
<tr>
<td class="text-center">{{ fat.fatlink.name }}</td>
<td class="text-center">{{ fat.character.character_name }}</td>
{% if fat.station != "No Station" %}
<td class="text-center">Docked in {{ fat.system }}</td>
{% else %}
<td class="text-center">{{ fat.system }}</td>
{% endif %}
<td class="text-center">{{ fat.shiptype }}</td>
<td class="text-center">{{ fat.fatlink.fatdatetime }}</td>
</tr>
{% endfor %}
</table>
{% else %}
<div class="alert alert-warning text-center">No fleet activity on record.</div>
{% endif %}
{% if perms.auth.fleetactivitytracking%}
<table class="table">
<tr>
<th class="col-md-10">
<h4><b>{% trans "Most recent fatlinks" %}</b>
</h4>
</th>
<th class="col-md-1">
<a href="{% url 'auth_fatlink_view_statistics' %}" class="btn btn-info">
{% trans "View statistics" %}
</a>
</th>
<th class="col-md-1">
<a href="{% url 'auth_create_fatlink_view' %}" class="btn btn-success">
{% trans "Create fatlink" %}
</a>
</th>
</tr>
</table>
{% if fatlinks %}
<table class="table">
<tr>
<th class="text-center">{% trans "Name" %}</th>
<th class="text-center">{% trans "Creator" %}</th>
<th class="text-center">{% trans "Fleet" %}</th>
<th class="text-center">{% trans "Eve Time" %}</th>
<th class="text-center">{% trans "Duration" %}</th>
<th class="text-center">{% trans "Edit" %}</th>
</tr>
{% for link in fatlinks %}
<tr>
<td class="text-center"><a href="{% url 'auth_click_fatlink_view' %}{{ link.hash }}/{{ link.name }}">{{ link.name }}</a></td>
<td class="text-center">{{ link.creator.username }}</td>
<td class="text-center">{{ link.fleet }}</td>
<td class="text-center">{{ link.fatdatetime }}</td>
<td class="text-center">{{ link.duration }}</td>
<td class="text-center">
<a href="{% url 'auth_modify_fatlink_view' %}{{ link.hash }}/{{ link.name }}" class="btn btn-info">
<span class="glyphicon glyphicon-edit"></span>
</a>
</td>
</tr>
{% endfor %}
</table>
{% else %}
<div class="alert alert-warning text-center">No created fatlinks on record.</div>
{% endif %}
{% endif %}
</div>
<script src="/static/js/dateformat.js"></script>
{% endblock content %}