mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-12 14:00:17 +02:00
[CHANGE] Fat templates updated (Part 1)
This commit is contained in:
parent
c37ece49d5
commit
e0cd5c6fb9
@ -4,4 +4,4 @@ from django.utils.translation import gettext_lazy as _
|
||||
|
||||
class FatlinkForm(forms.Form):
|
||||
fleet = forms.CharField(label=_("Fleet Name"), max_length=50)
|
||||
duration = forms.IntegerField(label=_("Duration of fat-link"), required=True, initial=30, min_value=1, max_value=2147483647, help_text=_('minutes'))
|
||||
duration = forms.IntegerField(label=_("Duration of fat-link"), required=True, initial=30, min_value=1, max_value=2147483647, help_text=_('Duration of the fat-link in minutes'))
|
||||
|
@ -1,23 +1,44 @@
|
||||
{% extends 'allianceauth/base-bs5.html' %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
{% translate "Fleet Participation" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Fleet Activity Tracking" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Character not found!" %}</h1>
|
||||
<div class="col-lg-12 container" id="example">
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "Character not found!" %}
|
||||
</h1>
|
||||
|
||||
<div class="col-lg-12 container">
|
||||
<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="card card-default">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{{ character_name }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="col-lg-2 col-sm-2">
|
||||
<img class="ra-avatar img-responsive" src="{{ character_portrait_url }}" alt="{{ character_name }}">
|
||||
</div>
|
||||
|
||||
<div class="col-lg-10 col-sm-2">
|
||||
<div class="alert alert-danger" role="alert">{% translate "Character not registered!" %}</div>
|
||||
{% translate "This character is not associated with an auth account." %} <a href=" {% url 'authentication:add_character' %}">{% translate "Add it here" %}</a> {% translate "before attempting to click fleet attendance links." %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{% translate "Character not registered!" %}
|
||||
</div>
|
||||
|
||||
{% translate "This character is not associated with an auth account." %}
|
||||
<a href="{% url 'authentication:add_character' %}">{% translate "Add it here" %}</a>
|
||||
{% translate "before attempting to click fleet attendance links." %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,31 +1,56 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
{% load bootstrap %}
|
||||
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
{% translate "Create Fatlink" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Fleet Activity Tracking" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Create Fleet Operation" %}</h1>
|
||||
<div class="container-fluid">
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "Create Fatlink" %}
|
||||
</h1>
|
||||
|
||||
<div>
|
||||
{% if badrequest %}
|
||||
<div class="alert alert-danger" role="alert">{% translate "Bad request!" %}</div>
|
||||
{% endif %}
|
||||
{% for message in errormessages %}<div class="alert alert-danger" role="alert">{{ message }}</div>{% endfor %}
|
||||
<div class="col-md-4 offset-md-4">
|
||||
<div class="row">
|
||||
|
||||
{% for message in errormessages %}
|
||||
<div class="alert alert-danger" role="alert">{{ message }}</div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="card card-primary border-0">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "Fatlink details" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<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">
|
||||
{% translate "Create fatlink" %}
|
||||
</button>
|
||||
{% bootstrap_form form %}
|
||||
|
||||
<div class="form-group mt-3 clearfix">
|
||||
<div class="fleetpings-form-message"></div>
|
||||
|
||||
{% translate "Create fatlink" as button_text %}
|
||||
{% bootstrap_button button_class="btn btn-primary" content=button_text name="submit_fat" id="submit_fat" %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@ -1,21 +1,35 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% block page_title %}{% translate "Fatlink view" %}{% endblock page_title %}
|
||||
|
||||
{% block page_title %}
|
||||
{% translate "Fatlink view" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Fleet Activity Tracking" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Edit fatlink" %} "{{ fatlink }}"
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "Edit fatlink" %} "{{ fatlink }}"
|
||||
|
||||
<div class="text-end">
|
||||
<form>
|
||||
<button type="submit" onclick="return confirm('Are you sure?')" class="btn btn-danger" name="deletefat" value="True">
|
||||
<button type="submit" onclick="return confirm('{% translate "Are you sure?" %}')" class="btn btn-danger" name="deletefat" value="True">
|
||||
{% translate "Delete fat" %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</h1>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{% translate "Registered characters" %}</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="card card-default">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">{% translate "Registered characters" %}</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table table-responsive table-hover">
|
||||
<tr>
|
||||
<th class="text-center">{% translate "User" %}</th>
|
||||
@ -25,21 +39,23 @@
|
||||
<th class="text-center">{% translate "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>
|
||||
<td class="text-center">
|
||||
{% if fat.station != "No Station" %}
|
||||
<td class="text-center">{% blocktranslate %}Docked in {% endblocktranslate %}{{ fat.system }}</td>
|
||||
{% else %}
|
||||
<td class="text-center">{{ fat.system }}</td>
|
||||
{% translate "Docked in" %}
|
||||
{% endif %}
|
||||
{{ fat.system }}
|
||||
</td>
|
||||
<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 }}">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
<i class="fa-solid fa-trash fa-fw"></i>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
|
@ -1,30 +1,50 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "Personal fatlink statistics" %}{% endblock page_title %}
|
||||
{% block page_title %}
|
||||
{% translate "Personal fatlink statistics" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Fleet Activity Tracking" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% blocktranslate %}Participation data statistics for {{ month }}, {{ year }}{% endblocktranslate %}
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% blocktranslate %}Participation data statistics for {{ month }}, {{ year }}{% endblocktranslate %}
|
||||
|
||||
{% if char_id %}
|
||||
<div class="text-end">
|
||||
<a href="{% url 'fatlink:user_statistics_month' char_id previous_month|date:'Y' previous_month|date:'m' %}" class="btn btn-info">{% translate "Previous month" %}</a>
|
||||
<a href="{% url 'fatlink:user_statistics_month' char_id next_month|date:'Y' next_month|date:'m' %}" class="btn btn-info">{% translate "Next month" %}</a>
|
||||
<a href="{% url 'fatlink:user_statistics_month' char_id previous_month|date:'Y' previous_month|date:'m' %}" class="btn btn-info">
|
||||
{% translate "Previous month" %}
|
||||
</a>
|
||||
<a href="{% url 'fatlink:user_statistics_month' char_id next_month|date:'Y' next_month|date:'m' %}" class="btn btn-info">
|
||||
{% translate "Next month" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</h1>
|
||||
<h2>
|
||||
|
||||
<div class="card card-default mb-4">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% blocktranslate count links=n_fats trimmed %}
|
||||
{{ user }} has collected one link this month.
|
||||
{% plural %}
|
||||
{{ user }} has collected {{ links }} links this month.
|
||||
{% endblocktranslate %}
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table table-responsive">
|
||||
<tr>
|
||||
<th class="col-md-2 text-center">{% translate "Ship" %}</th>
|
||||
<th class="col-md-2 text-center">{% translate "Times used" %}</th>
|
||||
</tr>
|
||||
|
||||
{% for ship, n_fats in shipStats %}
|
||||
<tr>
|
||||
<td class="text-center">{{ ship }}</td>
|
||||
@ -32,15 +52,22 @@
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if created_fats %}
|
||||
<h2>
|
||||
<div class="card card-default">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% blocktranslate count links=n_created_fats trimmed %}
|
||||
{{ user }} has created one link this month.
|
||||
{% plural %}
|
||||
{{ user }} has created {{ links }} links this month.
|
||||
{% endblocktranslate %}
|
||||
</h2>
|
||||
{% if created_fats %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% translate "Fleet" %}</th>
|
||||
@ -49,24 +76,29 @@
|
||||
<th class="text-center">{% translate "Duration" %}</th>
|
||||
<th class="text-center">{% translate "Edit" %}</th>
|
||||
</tr>
|
||||
|
||||
{% for link in created_fats %}
|
||||
<tr>
|
||||
<td class="text-center"><a href="{% url 'fatlink:click' link.hash %}" class="badge bg-primary">{{ link.fleet }}</a></td>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'fatlink:click' link.hash %}" class="badge bg-primary">
|
||||
{{ link.fleet }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-center">{{ link.creator.username }}</td>
|
||||
<td class="text-center">{{ link.fatdatetime }}</td>
|
||||
<td class="text-center">{{ link.duration }}</td>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'fatlink:modify' link.hash %}">
|
||||
<button type="button" class="btn btn-info">
|
||||
<i class="fa-solid fa-pen-to-square"></i>
|
||||
<i class="fa-solid fa-pen-to-square fa-fw"></i>
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@ -1,25 +1,36 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
{% translate "Personal fatlink statistics" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Fleet Activity Tracking" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% blocktranslate %}Participation data statistics for {{ year }}{% endblocktranslate %}
|
||||
|
||||
<div class="text-end">
|
||||
<a href="{% url "fatlink:personal_statistics_year" previous_year %}" class="btn btn-info"><i class="fa-solid fa-chevron-left"></i> {% translate "Previous year" %}</a>
|
||||
|
||||
{% if next_year %}
|
||||
<a href="{% url "fatlink:personal_statistics_year" next_year %}" class="btn btn-info">{% translate "Next year" %} <i class="fa-solid fa-chevron-right"></i></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</h1>
|
||||
|
||||
<div class="col-lg-2 offset-lg-5">
|
||||
<table class="table table-responsive">
|
||||
<tr>
|
||||
<th scope="col" class="col-md-2 text-center">{% translate "Month" %}</th>
|
||||
<th scope="col" class="col-md-2 text-center">{% translate "Fats" %}</th>
|
||||
</tr>
|
||||
|
||||
{% for monthnr, month, n_fats in monthlystats %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
|
@ -1,19 +1,29 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
{% translate "Fatlink Corp Statistics" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Fleet Activity Tracking" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% blocktranslate %}Participation data statistics for {{ month }}, {{ year }}{% endblocktranslate %}
|
||||
|
||||
<div class="text-end">
|
||||
<a href="{% url "fatlink:statistics_corp_month" corpid previous_month|date:"Y" previous_month|date:"m" %}" class="btn btn-info">{% translate "Previous month" %}</a>
|
||||
|
||||
{% if next_month %}
|
||||
<a href="{% url "fatlink:statistics_corp_month" corpid next_month|date:"Y" next_month|date:"m" %}" class="btn btn-info">{% translate "Next month" %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</h1>
|
||||
|
||||
{% if fatStats %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
@ -43,8 +53,9 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_script %}
|
||||
$(document).ready(function () {
|
||||
$(document).ready(() => {
|
||||
$("[rel=tooltip]").tooltip();
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
|
@ -1,19 +1,29 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
{% translate "Fatlink Statistics" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Fleet Activity Tracking" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% blocktranslate %}Participation data statistics for {{ month }}, {{ year }}{% endblocktranslate %}
|
||||
|
||||
<div class="text-end">
|
||||
<a href="{% url "fatlink:statistics_month" previous_month|date:"Y" previous_month|date:"m" %}" class="btn btn-info">{% translate "Previous month" %}</a>
|
||||
|
||||
{% if next_month %}
|
||||
<a href="{% url 'fatlink:statistics_month' next_month|date:"Y" next_month|date:"m" %}" class="btn btn-info">{% translate "Next month" %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</h1>
|
||||
|
||||
{% if fatStats %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
@ -47,8 +57,9 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_script %}
|
||||
$(document).ready(function () {
|
||||
$(document).ready(() => {
|
||||
$("[rel=tooltip]").tooltip();
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
|
@ -1,11 +1,21 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
{% translate "Fatlink view" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Fleet Activity Tracking" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Participation data" %}</h1>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "Participation data" %}
|
||||
</h1>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
@ -15,11 +25,15 @@
|
||||
</h4>
|
||||
</th>
|
||||
<th class="col-md-2 align-self-end">
|
||||
<a href="{% url 'fatlink:personal_statistics' %}" class="btn btn-info"><i class="fa-solid fa-circle-info fa-fw"></i>{% translate "Personal statistics" %}</a>
|
||||
<a href="{% url 'fatlink:personal_statistics' %}" class="btn btn-info">
|
||||
<i class="fa-solid fa-circle-info fa-fw"></i>
|
||||
{% translate "Personal statistics" %}
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% if fats %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
@ -30,6 +44,7 @@
|
||||
<th scope="col" class="text-center">{% translate "Ship" %}</th>
|
||||
<th scope="col" class="text-center">{% translate "Eve Time" %}</th>
|
||||
</tr>
|
||||
|
||||
{% for fat in fats %}
|
||||
<tr>
|
||||
<td class="text-center">{{ fat.fatlink.fleet }}</td>
|
||||
@ -48,6 +63,7 @@
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% translate "No fleet activity on record." %}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.auth.fleetactivitytracking %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
@ -66,6 +82,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% if fatlinks %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
@ -77,6 +94,7 @@
|
||||
<th scope="col" class="text-center">{% translate "Duration" %}</th>
|
||||
<th scope="col" class="text-center">{% translate "Edit" %}</th>
|
||||
</tr>
|
||||
|
||||
{% for link in fatlinks %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
|
Loading…
x
Reference in New Issue
Block a user