mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-13 14:30:17 +02:00
Merge branch 'aa-services-fixes' into 'v4.x'
Template Updates (I hope I got them all) See merge request allianceauth/allianceauth!1566
This commit is contained in:
commit
04cdd4c64f
@ -1,5 +1,5 @@
|
||||
{% load i18n %}
|
||||
<div class="col-12 col-xl-8 align-self-stretch p-2 ps-0">
|
||||
<div class="col-12 col-xl-8 align-self-stretch p-2 ps-0 pe-0 ps-xl-0 pe-xl-2">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-center">
|
||||
|
@ -1,11 +1,11 @@
|
||||
{% load i18n %}
|
||||
<div class="col-12 col-xl-4 align-self-stretch py-2 ps-2">
|
||||
<div class="col-12 col-xl-4 align-self-stretch py-2 ps-xl-2">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title text-center">{% translate "Membership" %}</h4>
|
||||
<div class="card-body">
|
||||
<div style="height: 300px; overflow-y:auto;">
|
||||
<h6 class="text-center">{% translate "State:" %} {{ request.user.profile.state }}</h6>
|
||||
<h5 class="text-center">{% translate "State:" %} {{ request.user.profile.state }}</h5>
|
||||
<table class="table">
|
||||
{% for group in groups %}
|
||||
<tr>
|
||||
|
@ -1,65 +1,85 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "Dashboard" %}{% endblock page_title %}
|
||||
{% block page_title %}
|
||||
{% translate "Token Management" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Token Management" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="page-header text-center">{% translate "Token Management" %}</h1>
|
||||
<div>
|
||||
<table class="table table-aa" id="table_tokens" style="width: 100%;">
|
||||
<p class="mb-3">
|
||||
{% translate "This page is a best attempt, but backups or database logs can still contain your tokens. Always revoke tokens on https://community.eveonline.com/support/third-party-applications/ where possible."|urlize %}
|
||||
</p>
|
||||
|
||||
<table class="table" id="table_tokens" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% translate "Scopes" %}</th>
|
||||
<th class="text-end">{% translate "Actions" %}</th>
|
||||
<th>{% translate "Character" %}</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for t in tokens %}
|
||||
<tr>
|
||||
<td style="white-space:initial;">{% for s in t.scopes.all %}<span class="badge bg-secondary">{{ s.name }}</span>{% endfor %}</td>
|
||||
<td nowrap class="text-end">
|
||||
<a href="{% url 'authentication:token_delete' t.id %}" class="btn btn-danger"><i class="fas fa-trash"></i></a>
|
||||
<a href="{% url 'authentication:token_refresh' t.id %}" class="btn btn-success"><i class="fas fa-sync-alt"></i></a>
|
||||
<td style="white-space:initial;">
|
||||
{% for s in t.scopes.all %}
|
||||
<span class="badge bg-secondary">{{ s.name }}</span>
|
||||
{% endfor %}
|
||||
</td>
|
||||
|
||||
<td nowrap class="text-end">
|
||||
<a href="{% url 'authentication:token_delete' t.id %}" class="btn btn-danger"><i class="fa-solid fa-trash-can"></i></a>
|
||||
<a href="{% url 'authentication:token_refresh' t.id %}" class="btn btn-success"><i class="fa-solid fa-rotate"></i></a>
|
||||
</td>
|
||||
|
||||
<td>{{ t.character_name }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% translate "This page is a best attempt, but backups or database logs can still contain your tokens. Always revoke tokens on https://community.eveonline.com/support/third-party-applications/ where possible."|urlize %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include "bundles/datatables-js-bs5.html" %}
|
||||
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
let grp = 2;
|
||||
|
||||
const table = $('#table_tokens').DataTable({
|
||||
'columnDefs': [{orderable: false, targets: [0, 1]}, {
|
||||
'visible': false,
|
||||
'targets': grp
|
||||
}],
|
||||
'order': [[grp, 'asc']],
|
||||
'drawCallback': function (settings) {
|
||||
var api = this.api();
|
||||
var rows = api.rows({page: 'current'}).nodes();
|
||||
var last = null;
|
||||
api.column(grp, {page: 'current'})
|
||||
.data()
|
||||
.each((group, i) => {
|
||||
if (last !== group) {
|
||||
$(rows).eq(i).before(`<tr class="h5 table-primary"><td colspan="3">${group}</td></tr>`);
|
||||
|
||||
last = group;
|
||||
}
|
||||
});
|
||||
},
|
||||
'stateSave': true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock extra_javascript %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% include "bundles/datatables-css-bs5.html" %}
|
||||
{% endblock extra_css %}
|
||||
|
||||
{% block extra_script %}
|
||||
$(document).ready(function(){
|
||||
let grp = 2;
|
||||
var table = $('#table_tokens').DataTable({
|
||||
"columnDefs": [{ orderable: false, targets: [0,1] },{ "visible": false, "targets": grp }],
|
||||
"order": [[grp, 'asc']],
|
||||
"drawCallback": function (settings) {
|
||||
var api = this.api();
|
||||
var rows = api.rows({ page: 'current' }).nodes();
|
||||
var last = null;
|
||||
api.column(grp, { page: 'current' })
|
||||
.data()
|
||||
.each(function (group, i) {
|
||||
if (last !== group) {
|
||||
$(rows).eq(i).before('<tr class="info"><td colspan="3">' + group + '</td></tr>');
|
||||
last = group;
|
||||
}
|
||||
});
|
||||
},
|
||||
"stateSave": true,
|
||||
});
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
|
@ -7,7 +7,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<!-- TODO Bundle all the site specific stuff up into its own template for easy overide -->
|
||||
<!-- TODO Bundle all the site specific stuff up into its own template for easy override -->
|
||||
<meta property="og:title" content="{{ SITE_NAME }}">
|
||||
<meta property="og:image" content="{{ SITE_URL }}{% static 'allianceauth/icons/apple-touch-icon.png' %}">
|
||||
<meta property="og:description" content="Alliance Auth - An auth system for EVE Online to help in-game organizations manage online service access.">
|
||||
@ -16,8 +16,9 @@
|
||||
|
||||
<title>{% block title %}{% block page_title %}{% endblock page_title %} - {{ SITE_NAME }}{% endblock title %}</title>
|
||||
|
||||
{% include 'bundles/bootstrap-css.html' %}
|
||||
{% include 'bundles/bootstrap-css-bs5.html' %}
|
||||
{% include 'bundles/fontawesome.html' %}
|
||||
|
||||
{% block extra_include %}
|
||||
{% endblock %}
|
||||
|
||||
@ -30,25 +31,23 @@
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.panel-transparent {
|
||||
.card-login {
|
||||
background: rgba(48 48 48 / 0.7);
|
||||
color: #ffffff;
|
||||
color: rgb(255 255 255);
|
||||
padding-bottom: 21px;
|
||||
}
|
||||
|
||||
.panel-body {
|
||||
|
||||
}
|
||||
|
||||
#lang-select {
|
||||
width: 40%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
{% block extra_style %}
|
||||
{% endblock %}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container" style="margin-top:150px;">
|
||||
{% block content %}
|
||||
|
@ -1,9 +1,12 @@
|
||||
{% load i18n %}
|
||||
|
||||
<div class="dropdown">
|
||||
<form action="{% url 'set_language' %}" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
<select onchange="this.form.submit()" class="form-control" id="lang-select" name="language">
|
||||
{% get_language_info_list for LANGUAGES as languages %}
|
||||
|
||||
{% for language in languages %}
|
||||
<option lang="{{ language.code }}" value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>
|
||||
{{ language.name_local|capfirst }} ({{ language.code }})
|
||||
|
@ -3,16 +3,17 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-4">
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-{{ message.level_tag}}">{{ message }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<div class="panel panel-default panel-transparent">
|
||||
<div class="panel-body">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-login border-secondary p-3">
|
||||
<div class="card-body">
|
||||
<div class="text-center">
|
||||
{% block middle_box_content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
@ -20,22 +21,23 @@
|
||||
|
||||
{% include 'public/lang_select.html' %}
|
||||
|
||||
<p class="text-center" style="margin-top: 2rem;">
|
||||
<p class="text-center mt-3">
|
||||
{% translate "For information on SSO, ESI and security read the CCP Dev Blog" %}<br>
|
||||
<a href="https://www.eveonline.com/news/view/introducing-esi" target="_blank" rel="noopener noreferrer">
|
||||
<a class="text-reset" href="https://www.eveonline.com/news/view/introducing-esi" target="_blank" rel="noopener noreferrer">
|
||||
{% translate "Introducing ESI - A New API For EVE Online" %}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="text-center">
|
||||
<a href="https://community.eveonline.com/support/third-party-applications/" target="_blank" rel="noopener noreferrer">
|
||||
<a class="text-reset" href="https://community.eveonline.com/support/third-party-applications/" target="_blank" rel="noopener noreferrer">
|
||||
{% translate "Manage ESI Applications" %}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_include %}
|
||||
{% include 'bundles/bootstrap-js.html' %}
|
||||
{% include 'bundles/bootstrap-js-bs5.html' %}
|
||||
{% endblock %}
|
||||
|
@ -6,9 +6,9 @@
|
||||
{% block page_title %}{% translate "Registration" %}{% endblock %}
|
||||
|
||||
{% block extra_include %}
|
||||
{% include 'bundles/bootstrap-css.html' %}
|
||||
{% include 'bundles/bootstrap-css-bs5.html' %}
|
||||
{% include 'bundles/fontawesome.html' %}
|
||||
{% include 'bundles/bootstrap-js.html' %}
|
||||
{% include 'bundles/bootstrap-js-bs5.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
@ -1,5 +1,7 @@
|
||||
{% extends 'public/middle_box.html' %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block middle_box_content %}
|
||||
<div class="alert alert-danger">{% translate 'Invalid or expired activation link.' %}</div>
|
||||
{% endblock %}
|
||||
|
@ -1,34 +1,69 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
{% translate "Corporation Member Data" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Corporation Member Data" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
<h1 class="page-header text-center">{% translate "Corporation Member Data" %}</h1>
|
||||
<nav class="navbar navbar-default">
|
||||
<nav class="navbar navbar-default navbar-expand-lg mb-4">
|
||||
<div class="container-fluid">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="dropdown">
|
||||
<a href="#" id="dLabel" class="dropdown-toggle" role="button" data-toggle="dropdown" aria-haspopup="false" aria-expanded="false">{% translate "Corporations" %}<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
|
||||
<button
|
||||
class="navbar-toggler collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#fleetfinder-header-navbar"
|
||||
aria-controls="fleetfinder-header-navbar"
|
||||
aria-expanded="false"
|
||||
aria-label="{% translate 'Toggle navigation' %}"
|
||||
>
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">
|
||||
{% translate "Corporations" %}
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu">
|
||||
{% for corpstat in available %}
|
||||
<li>
|
||||
<a href="{% url 'corputils:view_corp' corpstat.corp.corporation_id %}">{{ corpstat.corp.corporation_name }}</a>
|
||||
<a class="dropdown-item" href="{% url 'corputils:view_corp' corpstat.corp.corporation_id %}">
|
||||
{{ corpstat.corp.corporation_name }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
{% if perms.corputils.add_corpstats %}
|
||||
{% if available.count >= 1 %}
|
||||
<li> </li>
|
||||
{% endif %}
|
||||
|
||||
<li>
|
||||
<a href="{% url 'corputils:add' %}">{% translate "Add" %}</a>
|
||||
<a class="dropdown-item" href="{% url 'corputils:add' %}">
|
||||
{% translate "Add corporation" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<form class="navbar-form navbar-right" role="search" action="{% url 'corputils:search' %}" method="GET">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="search_string" placeholder="{% if search_string %}{{ search_string }}{% else %}{% translate 'Search all corporations...' %}{% endif %}">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="search_string"
|
||||
placeholder="{% if search_string %}{{ search_string }}{% else %}{% translate 'Search all corporations...' %}{% endif %}"
|
||||
>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -1,65 +1,114 @@
|
||||
{% extends 'corputils/base.html' %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load humanize %}
|
||||
|
||||
{% block member_data %}
|
||||
{% if corpstats %}
|
||||
<div>
|
||||
<table class="table">
|
||||
<table class="table text-center">
|
||||
<tr>
|
||||
<td class="text-center col-lg-6{% if corpstats.corp.alliance %}{% else %}col-lg-offset-3{% endif %}">
|
||||
<td>
|
||||
<img class="ra-avatar" src="{{ corpstats.corp.logo_url_64 }}" alt="{{ corpstats.corp.corporation_name }}">
|
||||
</td>
|
||||
|
||||
{% if corpstats.corp.alliance %}
|
||||
<td class="text-center col-lg-6">
|
||||
<td>
|
||||
<img class="ra-avatar" src="{{ corpstats.corp.alliance.logo_url_64 }}" alt="{{ corpstats.corp.alliance.alliance_name }}">
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="text-center"><h4>{{ corpstats.corp.corporation_name }}</h4></td>
|
||||
<td><p class="h4">{{ corpstats.corp.corporation_name }}</p></td>
|
||||
|
||||
{% if corpstats.corp.alliance %}
|
||||
<td class="text-center"><h4>{{ corpstats.corp.alliance.alliance_name }}</h4></td>
|
||||
<td><p class="h4">{{ corpstats.corp.alliance.alliance_name }}</p></td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<ul class="nav nav-pills pull-left">
|
||||
<li class="active"><a href="#mains" data-toggle="pill">{% translate 'Mains' %} ({{ total_mains }})</a></li>
|
||||
<li><a href="#members" data-toggle="pill">{% translate 'Members' %} ({{ corpstats.member_count }})</a></li>
|
||||
<li><a href="#unregistered" data-toggle="pill">{% translate 'Unregistered' %} ({{ unregistered.count }})</a></li>
|
||||
<div class="card card-default mt-4">
|
||||
<div class="card-header clearfix" role="tablist">
|
||||
<ul class="nav nav-pills text-right float-start">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a
|
||||
class="nav-link active"
|
||||
id="mains"
|
||||
data-bs-toggle="tab"
|
||||
href="#tab-mains"
|
||||
role="tab"
|
||||
aria-controls="tab-mains"
|
||||
aria-selected="true"
|
||||
>
|
||||
{% translate 'Mains' %} ({{ total_mains }})
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item" role="presentation">
|
||||
<a
|
||||
class="nav-link"
|
||||
id="members"
|
||||
data-bs-toggle="tab"
|
||||
href="#tab-members"
|
||||
role="tab"
|
||||
aria-controls="tab-members"
|
||||
aria-selected="false"
|
||||
>
|
||||
{% translate 'Members' %} ({{ corpstats.member_count }})
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a
|
||||
class="nav-link"
|
||||
id="unregistered"
|
||||
data-bs-toggle="tab"
|
||||
href="#tab-unregistered"
|
||||
role="tab"
|
||||
aria-controls="tab-unregistered"
|
||||
aria-selected="false"
|
||||
>
|
||||
{% translate 'Unregistered' %} ({{ unregistered.count }})
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="pull-right hidden-xs">
|
||||
{% translate "Last update:" %} {{ corpstats.last_update|naturaltime }}
|
||||
<a class="btn btn-success" type="button" href="{% url 'corputils:update' corpstats.corp.corporation_id %}" title="Update Now">
|
||||
<span class="glyphicon glyphicon-refresh"></span>
|
||||
|
||||
<div class="float-end d-none d-sm-block">
|
||||
{% translate "Last update:" %} {{ corpstats.last_update|naturaltime }}
|
||||
|
||||
<a
|
||||
class="btn btn-success btn-sm ms-2"
|
||||
type="button"
|
||||
href="{% url 'corputils:update' corpstats.corp.corporation_id %}"
|
||||
title="{% translate 'Update Now' %}"
|
||||
>
|
||||
<i class="fa-solid fa-rotate"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="card-body">
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active" id="mains">
|
||||
<div class="tab-pane fade show active" id="tab-mains" role="tabpanel" aria-labelledby="tab-mains">
|
||||
{% if mains %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover" id="table-mains">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="height:1em;"><!-- Must have text or height to prevent clipping --></th>
|
||||
<th style="min-height: 1rem;"><!-- Must have a text or height to prevent clipping --></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for id, main in mains.items %}
|
||||
<tr>
|
||||
<td class="text-center" style="vertical-align:middle">
|
||||
<td class="text-center" style="vertical-align: middle;">
|
||||
<div class="thumbnail" style="border: 0 none; box-shadow: none; background: transparent;">
|
||||
<img src="{{ main.main.portrait_url_64 }}" class="img-circle" alt="{{ main.main }}">
|
||||
<div class="caption text-center">
|
||||
<div class="caption">
|
||||
{{ main.main }}
|
||||
</div>
|
||||
</div>
|
||||
@ -70,22 +119,22 @@
|
||||
{% if forloop.first %}
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="text-center">{% translate "Character" %}</th>
|
||||
<th class="text-center">{% translate "Corporation" %}</th>
|
||||
<th class="text-center">{% translate "Alliance" %}</th>
|
||||
<th class="text-center"></th>
|
||||
<th>{% translate "Character" %}</th>
|
||||
<th>{% translate "Corporation" %}</th>
|
||||
<th>{% translate "Alliance" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td class="text-center" style="width:5%">
|
||||
<td style="width: 5%;">
|
||||
<div class="thumbnail" style="border: 0 none; box-shadow: none; background: transparent;">
|
||||
<img src="{{ alt.portrait_url_32 }}" class="img-circle" alt="{{ alt.character_name }}">
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center" style="width:30%">{{ alt.character_name }}</td>
|
||||
<td class="text-center" style="width:30%">{{ alt.corporation_name }}</td>
|
||||
<td class="text-center" style="width:30%">{{ alt.alliance_name }}</td>
|
||||
<td class="text-center" style="width:5%">
|
||||
<td style="width: 30%;">{{ alt.character_name }}</td>
|
||||
<td style="width: 30%;">{{ alt.corporation_name }}</td>
|
||||
<td style="width: 30%;">{{ alt.alliance_name }}</td>
|
||||
<td style="width: 5%;">
|
||||
<a href="https://zkillboard.com/character/{{ alt.character_id }}/" class="badge bg-danger" target="_blank">
|
||||
{% translate "Killboard" %}
|
||||
</a>
|
||||
@ -101,43 +150,45 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="tab-pane fade" id="members">
|
||||
|
||||
<div class="tab-pane fade" id="tab-members" role="tabpanel" aria-labelledby="tab-members">
|
||||
{% if members %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover" id="table-members">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="text-center">{% translate "Character" %}</th>
|
||||
<th class="text-center"></th>
|
||||
<th class="text-center">{% translate "Main Character" %}</th>
|
||||
<th class="text-center">{% translate "Main Corporation" %}</th>
|
||||
<th class="text-center">{% translate "Main Alliance" %}</th>
|
||||
<th>{% translate "Character" %}</th>
|
||||
<th></th>
|
||||
<th>{% translate "Main Character" %}</th>
|
||||
<th>{% translate "Main Corporation" %}</th>
|
||||
<th>{% translate "Main Alliance" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for member in members %}
|
||||
<tr>
|
||||
<td><img src="{{ member.portrait_url }}" class="img-circle" alt="{{ member }}"></td>
|
||||
<td class="text-center">{{ member }}</td>
|
||||
<td class="text-center">
|
||||
<td>{{ member }}</td>
|
||||
<td>
|
||||
<a href="https://zkillboard.com/character/{{ member.character_id }}/" class="badge bg-danger" target="_blank">{% translate "Killboard" %}</a>
|
||||
</td>
|
||||
<td class="text-center">{{ member.character_ownership.user.profile.main_character.character_name }}</td>
|
||||
<td class="text-center">{{ member.character_ownership.user.profile.main_character.corporation_name }}</td>
|
||||
<td class="text-center">{{ member.character_ownership.user.profile.main_character.alliance_name }}</td>
|
||||
<td>{{ member.character_ownership.user.profile.main_character.character_name }}</td>
|
||||
<td>{{ member.character_ownership.user.profile.main_character.corporation_name }}</td>
|
||||
<td>{{ member.character_ownership.user.profile.main_character.alliance_name }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% for member in unregistered %}
|
||||
<tr class="danger">
|
||||
<td><img src="{{ member.portrait_url }}" class="img-circle" alt="{{ member.character_name }}"></td>
|
||||
<td class="text-center">{{ member.character_name }}</td>
|
||||
<td class="text-center">
|
||||
<td>{{ member.character_name }}</td>
|
||||
<td>
|
||||
<a href="https://zkillboard.com/character/{{ member.character_id }}/" class="badge bg-danger" target="_blank">{% translate "Killboard" %}</a>
|
||||
</td>
|
||||
<td class="text-center"></td>
|
||||
<td class="text-center"></td>
|
||||
<td class="text-center"></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
@ -145,23 +196,25 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="tab-pane fade" id="unregistered">
|
||||
|
||||
<div class="tab-pane fade" id="tab-unregistered" role="tabpanel" aria-labelledby="tab-unregistered">
|
||||
{% if unregistered %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover" id="table-unregistered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="text-center">{% translate "Character" %}</th>
|
||||
<th class="text-center"></th>
|
||||
<th>{% translate "Character" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for member in unregistered %}
|
||||
<tr class="danger">
|
||||
<td><img src="{{ member.portrait_url }}" class="img-circle" alt="{{ member.character_name }}"></td>
|
||||
<td class="text-center">{{ member.character_name }}</td>
|
||||
<td class="text-center">
|
||||
<td>{{ member.character_name }}</td>
|
||||
<td>
|
||||
<a href="https://zkillboard.com/character/{{ member.character_id }}/" class="badge bg-danger" target="_blank">
|
||||
{% translate "Killboard" %}
|
||||
</a>
|
||||
@ -176,20 +229,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/datatables-js.html' %}
|
||||
{% endblock %}
|
||||
{% include 'bundles/datatables-js-bs5.html' %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/datatables-css.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
$(document).ready(function(){
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$('#table-mains').DataTable({
|
||||
"columnDefs": [
|
||||
{ "sortable": false, "targets": [1] },
|
||||
@ -197,6 +244,7 @@
|
||||
"stateSave": true,
|
||||
"stateDuration": 0
|
||||
});
|
||||
|
||||
$('#table-members').DataTable({
|
||||
"columnDefs": [
|
||||
{ "searchable": false, "targets": [0, 2] },
|
||||
@ -206,6 +254,7 @@
|
||||
"stateSave": true,
|
||||
"stateDuration": 0
|
||||
});
|
||||
|
||||
$('#table-unregistered').DataTable({
|
||||
"columnDefs": [
|
||||
{ "searchable": false, "targets": [0, 2] },
|
||||
@ -215,6 +264,10 @@
|
||||
"stateSave": true,
|
||||
"stateDuration": 0
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/datatables-css-bs5.html' %}
|
||||
{% endblock %}
|
||||
|
@ -1,33 +1,36 @@
|
||||
{% extends "corputils/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block member_data %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading clearfix">
|
||||
<div class="panel-title pull-left">{% translate "Search Results" %}</div>
|
||||
<div class="card card-default">
|
||||
<div class="card-header clearfix">
|
||||
<div class="card-title">{% translate "Search Results" %}</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="card-body mt-2">
|
||||
<table class="table table-hover" id="table-search">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center"></th>
|
||||
<th class="text-center">{% translate "Character" %}</th>
|
||||
<th class="text-center">{% translate "Corporation" %}</th>
|
||||
<th class="text-center">{% translate "zKillboard" %}</th>
|
||||
<th class="text-center">{% translate "Main Character" %}</th>
|
||||
<th class="text-center">{% translate "Main Corporation" %}</th>
|
||||
<th class="text-center">{% translate "Main Alliance" %}</th>
|
||||
<th></th>
|
||||
<th>{% translate "Character" %}</th>
|
||||
<th>{% translate "Corporation" %}</th>
|
||||
<th>{% translate "zKillboard" %}</th>
|
||||
<th>{% translate "Main Character" %}</th>
|
||||
<th>{% translate "Main Corporation" %}</th>
|
||||
<th>{% translate "Main Alliance" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for result in results %}
|
||||
<tr {% if not result.1.registered %}class="danger"{% endif %}>
|
||||
<td class="text-center"><img src="{{ result.1.portrait_url }}" class="img-circle" alt="{{ result.1.character_name }}"></td>
|
||||
<td class="text-center">{{ result.1.character_name }}</td>
|
||||
<td class="text-center">{{ result.0.corp.corporation_name }}</td>
|
||||
<td class="text-center"><a href="https://zkillboard.com/character/{{ result.1.character_id }}/" class="badge bg-danger" target="_blank">{% translate "Killboard" %}</a></td>
|
||||
<td class="text-center">{{ result.1.main_character.character_name }}</td>
|
||||
<td class="text-center">{{ result.1.main_character.corporation_name }}</td>
|
||||
<td class="text-center">{{ result.1.main_character.alliance_name }}</td>
|
||||
<td><img src="{{ result.1.portrait_url }}" class="img-circle" alt="{{ result.1.character_name }}"></td>
|
||||
<td>{{ result.1.character_name }}</td>
|
||||
<td >{{ result.0.corp.corporation_name }}</td>
|
||||
<td><a href="https://zkillboard.com/character/{{ result.1.character_id }}/" class="badge bg-danger" target="_blank">{% translate "Killboard" %}</a></td>
|
||||
<td>{{ result.1.main_character.character_name }}</td>
|
||||
<td>{{ result.1.main_character.corporation_name }}</td>
|
||||
<td>{{ result.1.main_character.alliance_name }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
@ -35,17 +38,20 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/datatables-js.html' %}
|
||||
{% endblock %}
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/datatables-css.html' %}
|
||||
{% endblock %}
|
||||
{% block extra_script %}
|
||||
$(document).ready(function(){
|
||||
{% include 'bundles/datatables-js-bs5.html' %}
|
||||
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$('#table-search').DataTable({
|
||||
"stateSave": true,
|
||||
"stateDuration": 0
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/datatables-css-bs5.html' %}
|
||||
{% endblock %}
|
||||
|
@ -16,7 +16,7 @@ Needs to be called with a context containing three objects:
|
||||
{% block content %}
|
||||
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">Evelinks templatetags examples</h1>
|
||||
<h1 class="page-header text-center mb-3">Evelinks templatetags examples</h1>
|
||||
<div class="col-lg-12 container">
|
||||
|
||||
<h2>profile URLs</h2>
|
||||
|
@ -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>
|
||||
|
@ -0,0 +1,54 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% 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>
|
||||
<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="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 role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form form %}
|
||||
|
||||
<div class="form-group mt-3 clearfix">
|
||||
{% 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,31 +0,0 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load i18n %}
|
||||
{% block page_title %}
|
||||
{% translate "Create Fatlink" %}
|
||||
{% endblock page_title %}
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Create Fleet Operation" %}</h1>
|
||||
<div class="container-fluid">
|
||||
{% 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">
|
||||
<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>
|
||||
</form>
|
||||
</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 }}">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
<i class="fa-solid fa-trash-can 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,23 +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"><span
|
||||
class="glyphicon glyphicon-edit"></span></button>
|
||||
<button type="button" class="btn btn-info">
|
||||
<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,11 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
{% block extra_script %}
|
||||
$(document).ready(function () {
|
||||
|
||||
{% block extra_javascript %}
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$("[rel=tooltip]").tooltip();
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
</script>
|
||||
{% endblock extra_javascript %}
|
||||
|
@ -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,11 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
{% block extra_script %}
|
||||
$(document).ready(function () {
|
||||
|
||||
{% block extra_javascript %}
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$("[rel=tooltip]").tooltip();
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
</script>
|
||||
{% endblock extra_javascript %}
|
||||
|
@ -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">
|
||||
|
@ -352,11 +352,11 @@ def create_fatlink_view(request):
|
||||
for errorname, message in e.message_dict.items():
|
||||
messages.append(message[0].decode())
|
||||
context = {'form': form, 'errormessages': messages}
|
||||
return render(request, 'fleetactivitytracking/fatlinkformatter.html', context=context)
|
||||
return render(request, 'fleetactivitytracking/fatlinkcreate.html', context=context)
|
||||
else:
|
||||
form = FatlinkForm()
|
||||
context = {'form': form, 'badrequest': True}
|
||||
return render(request, 'fleetactivitytracking/fatlinkformatter.html', context=context)
|
||||
return render(request, 'fleetactivitytracking/fatlinkcreate.html', context=context)
|
||||
return redirect('fatlink:view')
|
||||
|
||||
else:
|
||||
@ -365,7 +365,7 @@ def create_fatlink_view(request):
|
||||
|
||||
context = {'form': form}
|
||||
|
||||
return render(request, 'fleetactivitytracking/fatlinkformatter.html', context=context)
|
||||
return render(request, 'fleetactivitytracking/fatlinkcreate.html', context=context)
|
||||
|
||||
|
||||
@login_required
|
||||
|
@ -16,7 +16,7 @@ class GroupManagementMenuItem(MenuItemHook):
|
||||
MenuItemHook.__init__(
|
||||
self,
|
||||
text=_("Group Management"),
|
||||
classes="fas fa-users-cog fa-fw",
|
||||
classes="fa-solid fa-users-gear",
|
||||
url_name="groupmanagement:management",
|
||||
order=50,
|
||||
navactive=[
|
||||
@ -36,7 +36,7 @@ class GroupManagementMenuItem(MenuItemHook):
|
||||
|
||||
"""
|
||||
<li class="d-flex m-2 p-2 pt-0 pb-0 mt-0 mb-0">
|
||||
<i class="fas fa-users fa-fw align-self-center me-2"></i>
|
||||
<i class="fa-solid fa-users fa-fw align-self-center me-2"></i>
|
||||
<a class="nav-link flex-fill align-self-center {% navactive request 'groupmanagement:groups' %}" href="{% url 'groupmanagement:groups' %}">
|
||||
{% translate "Groups" %}
|
||||
</a>
|
||||
@ -49,7 +49,7 @@ class GroupsMenuItem(MenuItemHook):
|
||||
MenuItemHook.__init__(
|
||||
self,
|
||||
text=_("Groups"),
|
||||
classes="fas fa-user fa-fw",
|
||||
classes="fa-solid fa-user",
|
||||
url_name="groupmanagement:groups",
|
||||
order=25,
|
||||
navactive=[
|
||||
|
@ -1,15 +1,21 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load navactive %}
|
||||
|
||||
{% block page_title %}{{ group }} {% translate "Audit Log" %}{% endblock page_title %}
|
||||
{% block header_nav_brand %}{% translate "Audit Log" %} - {{ group.name }}{% endblock header_nav_brand %}
|
||||
{% block page_title %}
|
||||
{{ group }} {% translate "Audit Log" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Audit Log" %} - {{ group.name }}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block header_nav_collapse_left %}
|
||||
<li class="nav-item ">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% navactive request 'groupmanagement:management' %}" href="{% url 'groupmanagement:management' %}">{% translate "Back" %}</a>
|
||||
</li>
|
||||
</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@ -65,31 +71,26 @@
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/datatables-js-bs5.html' %}
|
||||
{% include 'bundles/moment-js.html' with locale=True %}
|
||||
{% include 'bundles/filterdropdown-js.html' %}
|
||||
{% endblock %}
|
||||
{# {% include 'bundles/filterdropdown-js.html' %}#}
|
||||
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/datatables-css-bs5.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
$.fn.dataTable.moment = function(format, locale) {
|
||||
let types = $.fn.dataTable.ext.type;
|
||||
<script>
|
||||
$.fn.dataTable.moment = (format, locale) => {
|
||||
const types = $.fn.dataTable.ext.type;
|
||||
|
||||
// Add type detection
|
||||
types.detect.unshift(function(d) {
|
||||
types.detect.unshift((d) => {
|
||||
return moment(d, format, locale, true).isValid() ?
|
||||
'moment-'+format :
|
||||
null;
|
||||
});
|
||||
|
||||
// Add sorting method - use an integer for the sorting
|
||||
types.order[ 'moment-'+format+'-pre' ] = function(d) {
|
||||
types.order[ 'moment-'+format+'-pre' ] = (d) => {
|
||||
return moment(d, format, locale, true).unix();
|
||||
};
|
||||
};
|
||||
|
||||
$(document).ready(function(){
|
||||
$(document).ready(() => {
|
||||
$.fn.dataTable.moment('YYYY-MMM-D, HH:mm');
|
||||
|
||||
$('#log-entries').DataTable({
|
||||
@ -122,4 +123,9 @@
|
||||
"stateDuration": 0
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/datatables-css-bs5.html' %}
|
||||
{% endblock %}
|
||||
|
@ -1,22 +1,28 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load evelinks %}
|
||||
{% load navactive %}
|
||||
|
||||
{% block page_title %}{% translate "Group Members" %}{% endblock page_title %}
|
||||
{% block header_nav_brand %}{% translate "Group Members" %} - {{ group.name }}{% endblock header_nav_brand %}
|
||||
{% block page_title %}
|
||||
{% translate "Group Members" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Group Members" %} - {{ group.name }}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block header_nav_collapse_left %}
|
||||
<li class="nav-item ">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% navactive request 'groupmanagement:management' %}" href="{% url 'groupmanagement:management' %}">{% translate "Back" %}</a>
|
||||
</li>
|
||||
</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if group.user_set %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-aa" id="tab_group_members">
|
||||
<table class="table" id="tab_group_members">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% translate "Character" %}</th>
|
||||
@ -30,6 +36,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<img src="{{ member.main_char|character_portrait_url:32 }}" class="rounded-circle" style="margin-right: 1rem;" alt="{{ member.main_char.character_name }}">
|
||||
|
||||
{% if member.main_char %}
|
||||
<a href="{{ member.main_char|evewho_character_url }}" target="_blank">
|
||||
{{ member.main_char.character_name }}
|
||||
@ -39,7 +46,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if member.is_leader %}
|
||||
<i class="fa-solid fa-star"> title="{% translate "Group leader" %}" style="margin-left: 1rem;"></i>
|
||||
<sup><i class="fa-solid fa-star" title="{% translate "Group leader" %}"></i></sup>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
@ -53,6 +60,7 @@
|
||||
{% translate "(unknown)" %}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td class="text-end">
|
||||
<a href="{% url 'groupmanagement:membership_remove' group.id member.user.id %}" class="btn btn-danger" title="{% translate "Remove from group" %}">
|
||||
<i class="fa-solid fa-xmark"></i>
|
||||
@ -77,14 +85,9 @@
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/datatables-js-bs5.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/datatables-css-bs5.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
$(document).ready(function(){
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$('#tab_group_members').DataTable({
|
||||
order: [[0, "asc"]],
|
||||
columnDefs: [
|
||||
@ -97,4 +100,9 @@
|
||||
"stateDuration": 0
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/datatables-css-bs5.html' %}
|
||||
{% endblock %}
|
||||
|
@ -9,7 +9,7 @@
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block header_nav_collapse_left %}
|
||||
<li class="nav-item ">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% navactive request 'groupmanagement:management' %}" href="{% url 'groupmanagement:management' %}">{% translate "Join/Leave Requests" %}</a>
|
||||
</li>
|
||||
{% endblock header_nav_collapse_left %}
|
||||
@ -17,7 +17,7 @@
|
||||
{% block content %}
|
||||
{% if groups %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-aa">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% translate "Name" %}</th>
|
||||
@ -54,15 +54,15 @@
|
||||
|
||||
<td class="text-end">
|
||||
<a href="{% url 'groupmanagement:membership' group.id %}" class="btn btn-primary" title="{% translate "View Members" %}">
|
||||
<i class="far fa-eye"></i>
|
||||
<i class="fa-regular fa-eye"></i>
|
||||
</a>
|
||||
|
||||
<a href="{% url "groupmanagement:audit_log" group.id %}" class="btn btn-info" title="{% translate "Audit Members" %}">
|
||||
<i class="far fa-list-alt"></i>
|
||||
<i class="fa-regular fa-rectangle-list"></i>
|
||||
</a>
|
||||
|
||||
<a id="clipboard-copy" data-clipboard-text="{{ request.scheme }}://{{request.get_host}}{% url 'groupmanagement:request_add' group.id %}" class="btn btn-warning" title="{% translate "Copy Direct Join Link" %}">
|
||||
<i class="far fa-clipboard"></i>
|
||||
<i class="fa-regular fa-clipboard"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -1,21 +1,28 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "Available Groups" %}{% endblock page_title %}
|
||||
{% block header_nav_brand %}{% translate "Available Groups" %}{% endblock header_nav_brand %}
|
||||
{% block page_title %}
|
||||
{% translate "Available Groups" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Available Groups" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% if manager_perms %}
|
||||
{% block header_nav_collapse_left %}
|
||||
<li class="nav-item">
|
||||
{% block header_nav_collapse_left %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'groupmanagement:management' %}">{% translate "Group Management" %}
|
||||
{% if req_count %}
|
||||
<span class="badge bg-secondary">{{ req_count }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
{% block content %}
|
||||
{% if groups %}
|
||||
<table class="table" id="groupsTable" >
|
||||
@ -78,16 +85,17 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/datatables-js-bs5.html' %}
|
||||
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$('#groupsTable').DataTable();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/datatables-css-bs5.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
$(document).ready(function () {
|
||||
$('#groupsTable').DataTable();
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
|
@ -1,34 +1,32 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load evelinks %}
|
||||
{% load navactive %}
|
||||
|
||||
{% block page_title %}{% translate "Groups Management" %}{% endblock page_title %}
|
||||
{% block header_nav_brand %}{% translate "Groups Management" %}{% endblock header_nav_brand %}
|
||||
{% block page_title %}
|
||||
{% translate "Groups Management" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% endblock extra_css %}
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Groups Management" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block header_nav_collapse_left %}
|
||||
<li class="active">
|
||||
<a class="nav-link active" id="add-tab" data-bs-toggle="tab" data-bs-target="#add" type="button" role="tab" aria-controls="addd" aria-selected="true">
|
||||
<li class="active">
|
||||
<a class="nav-link active" id="add-tab" data-bs-toggle="tab" data-bs-target="#add" type="button" role="tab" aria-controls="add" aria-selected="true">
|
||||
{% translate "Join Requests" %}
|
||||
|
||||
{% if acceptrequests %}
|
||||
<span class="badge bg-secondary">{{ acceptrequests|length }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if not auto_leave %}
|
||||
<li>
|
||||
<a class="nav-link" id="leave-tab" data-bs-toggle="tab" data-bs-target="#leave" type="button" role="tab" aria-controls="leave" aria-selected="false">
|
||||
{% translate "Leave Requests" %}
|
||||
</li>
|
||||
|
||||
{% if not show_leave_tab %}
|
||||
<li>
|
||||
<a data-toggle="tab" href="#leave">
|
||||
<a class="nav-link" id="leave-tab" data-bs-toggle="tab" data-bs-target="#leave" type="button" role="tab" aria-controls="leave" aria-selected="false">
|
||||
{% translate "Leave Requests" %}
|
||||
|
||||
{% if leaverequests %}
|
||||
@ -37,22 +35,21 @@
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li class="nav-item ">
|
||||
<a class="nav-link {% navactive request 'groupmanagement:membership groupmanagement:audit_log' %}" href="{% url 'groupmanagement:membership' %}">
|
||||
{% translate "Group Membership" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="nav-item ">
|
||||
<a class="nav-link {% navactive request 'groupmanagement:membership groupmanagement:audit_log' %}" href="{% url 'groupmanagement:membership' %}">{% translate "Group Membership" %}</a>
|
||||
</li>
|
||||
|
||||
{% endblock %}
|
||||
{% endblock header_nav_collapse_left %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="tab-content">
|
||||
<div class="tab-content">
|
||||
<div id="add" class="tab-pane active">
|
||||
{% if acceptrequests %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-aa">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% translate "Character" %}</th>
|
||||
@ -67,6 +64,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<img src="{{ acceptrequest.main_char|character_portrait_url:32 }}" class="rounded-circle" style="margin-right: 1rem;" alt="{{ acceptrequest.main_char.character_name }}">
|
||||
|
||||
{% if acceptrequest.main_char %}
|
||||
<a href="{{ acceptrequest.main_char|evewho_character_url }}" target="_blank">
|
||||
{{ acceptrequest.main_char.character_name }}
|
||||
@ -75,68 +73,25 @@
|
||||
{{ acceptrequest.user.username }}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{% if acceptrequest.main_char %}
|
||||
<a href="{{ acceptrequest.main_char|dotlan_corporation_url }}" target="_blank">
|
||||
{{ acceptrequest.main_char.corporation_name }}
|
||||
</a><br>
|
||||
</a>
|
||||
<br>
|
||||
{{ acceptrequest.main_char.alliance_name|default_if_none:"" }}
|
||||
{% else %}
|
||||
{% translate "(unknown)" %}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td>{{ acceptrequest.group.name }}</td>
|
||||
|
||||
<td class="text-end">
|
||||
<a href="{% url 'groupmanagement:accept_request' acceptrequest.id %}" class="btn btn-success">
|
||||
{% translate "Accept" %}
|
||||
</a>
|
||||
|
||||
{% if not show_leave_tab %}
|
||||
<div id="leave" class="tab-pane">
|
||||
{% if leaverequests %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-aa">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% translate "Character" %}</th>
|
||||
<th>{% translate "Organization" %}</th>
|
||||
<th>{% translate "Group" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for leaverequest in leaverequests %}
|
||||
<tr>
|
||||
<td>
|
||||
<img src="{{ leaverequest.main_char|character_portrait_url:32 }}" class="img-circle" style="margin-right: 1rem;" alt="{{ leaverequest.main_char.character_name }}">
|
||||
{% if leaverequest.main_char %}
|
||||
<a href="{{ leaverequest.main_char|evewho_character_url }}" target="_blank">
|
||||
{{ leaverequest.main_char.character_name }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ leaverequest.user.username }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if leaverequest.main_char %}
|
||||
<a href="{{ leaverequest.main_char|dotlan_corporation_url }}" target="_blank">
|
||||
{{ leaverequest.main_char.corporation_name }}
|
||||
</a><br>
|
||||
{{ leaverequest.main_char.alliance_name|default_if_none:"" }}
|
||||
{% else %}
|
||||
{% translate "(unknown)" %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ leaverequest.group.name }}</td>
|
||||
<td class="text-right">
|
||||
<a href="{% url 'groupmanagement:leave_accept_request' leaverequest.id %}" class="btn btn-success">
|
||||
{% translate "Accept" %}
|
||||
</a>
|
||||
|
||||
<a href="{% url 'groupmanagement:leave_reject_request' leaverequest.id %}" class="btn btn-danger">
|
||||
{% translate "Reject" %}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
@ -144,22 +99,17 @@
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% translate "No group leave requests." %}</div>
|
||||
{% endif %}
|
||||
<div class="aa-callout aa-callout-warning text-center">
|
||||
{% translate "No group add requests." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% translate "No group add requests." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if not auto_leave %}
|
||||
{% if not show_leave_tab %}
|
||||
<div id="leave" class="tab-pane">
|
||||
{% if leaverequests %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-aa">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% translate "Character" %}</th>
|
||||
@ -174,6 +124,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<img src="{{ leaverequest.main_char|character_portrait_url:32 }}" class="rounded-circle" style="margin-right: 1rem;" alt="{{ leaverequest.main_char.character_name }}">
|
||||
|
||||
{% if leaverequest.main_char %}
|
||||
<a href="{{ leaverequest.main_char|evewho_character_url }}" target="_blank">
|
||||
{{ leaverequest.main_char.character_name }}
|
||||
@ -182,17 +133,21 @@
|
||||
{{ leaverequest.user.username }}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{% if leaverequest.main_char %}
|
||||
<a href="{{ leaverequest.main_char|dotlan_corporation_url }}" target="_blank">
|
||||
{{ leaverequest.main_char.corporation_name }}
|
||||
</a><br>
|
||||
</a>
|
||||
<br>
|
||||
{{ leaverequest.main_char.alliance_name|default_if_none:"" }}
|
||||
{% else %}
|
||||
{% translate "(unknown)" %}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td>{{ leaverequest.group.name }}</td>
|
||||
|
||||
<td class="text-end">
|
||||
<a href="{% url 'groupmanagement:leave_accept_request' leaverequest.id %}" class="btn btn-success">
|
||||
{% translate "Accept" %}
|
||||
@ -208,9 +163,9 @@
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% translate "No group leave requests." %}</div>
|
||||
<div class="aa-callout aa-callout-warning text-center">{% translate "No group leave requests." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@ -99,5 +99,5 @@ class TestViews(TestCase):
|
||||
# then
|
||||
content = response_content_to_str(response)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertIn('<a data-toggle="tab" href="#leave">', content)
|
||||
self.assertIn('<a class="nav-link" id="leave-tab" data-bs-toggle="tab" data-bs-target="#leave"', content)
|
||||
self.assertIn('<div id="leave" class="tab-pane">', content)
|
||||
|
@ -1,13 +1,28 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "Choose a Corp" %}{% endblock page_title %}
|
||||
{% block page_title %}
|
||||
{% translate "Choose a Corp" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "HR Application Management" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Choose a Corp" %}</h1>
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "Choose a Corp" %}
|
||||
</h1>
|
||||
|
||||
{% if choices %}
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">{% translate "Available Corps" %}</div>
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">{% translate "Available Corps" %}</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table table-responsive">
|
||||
{% for choice in choices %}
|
||||
<tr>
|
||||
@ -18,6 +33,7 @@
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-danger">{% translate "No corps are accepting applications at this time." %}</div>
|
||||
{% endif %}
|
||||
|
@ -1,35 +1,66 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
{% load django_bootstrap5 %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "Apply To" %} {{ corp.corporation_name }}{% endblock page_title %}
|
||||
{% block page_title %}
|
||||
{% translate "Apply To" %} {{ corp.corporation_name }}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "HR Application Management" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "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">
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "Apply To" %} {{ corp.corporation_name }}
|
||||
</h1>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "Application form" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
{% for question in questions %}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="id_{{ question.pk }}">{{ question.title }}</label>
|
||||
<div class=" ">
|
||||
<div class="card mb-3 form-group border-0">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">{{ question.title }}</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{% if question.help_text %}
|
||||
<div class="text-center">{{ question.help_text }}</div>
|
||||
<p class="text-muted">
|
||||
{{ question.help_text }}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% for choice in question.choices.all %}
|
||||
<input type={% if question.multi_select == False %}"radio"{% else %}"checkbox"{% endif %} name="{{ question.pk }}" id="id_{{ question.pk }}_choice_{{ forloop.counter }}" value="{{ choice.choice_text }}">
|
||||
<input type="{% if question.multi_select == False %}radio{% else %}checkbox{% endif %}" name="{{ question.pk }}" id="id_{{ question.pk }}_choice_{{ forloop.counter }}" value="{{ choice.choice_text }}">
|
||||
<label for="id_{{ question.pk }}_choice_{{ forloop.counter }}">{{ choice.choice_text }}</label><br>
|
||||
{% empty %}
|
||||
<textarea class="form-control" cols="30" id="id_{{ question.pk }}" name="{{ question.pk }}" rows="4"></textarea>
|
||||
<textarea class="form-control" cols="30" id="id_{{ question.pk }}" name="{{ question.pk }}" rows="10"></textarea>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit" formmethod="post">{% translate "Submit" %}</button>
|
||||
|
||||
<div class="form-group clearfix">
|
||||
{% translate "Submit" as button_text %}
|
||||
{% bootstrap_button button_class="btn btn-primary" content=button_text name="submitApplicationForm" id="submitApplicationForm" %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,13 +1,19 @@
|
||||
{% extends "allianceauth/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "HR Application Management" %}{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
{% block page_title %}
|
||||
{% translate "HR Application Management" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "HR Application Management" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Personal Applications" %}
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">{% translate "Personal Applications" %}
|
||||
<div class="text-end">
|
||||
{% if create %}
|
||||
<a href="{% url 'hrapplications:create_view' %}">
|
||||
@ -18,8 +24,10 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</h1>
|
||||
|
||||
{% if personal_apps %}
|
||||
<div class="panel panel-default">
|
||||
<div class="card card-default mb-3">
|
||||
<div class="card-body">
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<th class="text-center">{% translate "Username" %}</th>
|
||||
@ -27,6 +35,7 @@
|
||||
<th class="text-center">{% translate "Status" %}</th>
|
||||
<th class="text-center">{% translate "Actions" %}</th>
|
||||
</tr>
|
||||
|
||||
{% for personal_app in personal_apps %}
|
||||
<tr>
|
||||
<td class="text-center">{{ personal_app.user.username }}</td>
|
||||
@ -42,12 +51,12 @@
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'hrapplications:personal_view' personal_app.id %}" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
|
||||
{% if personal_app.approved == None %}
|
||||
<a href="{% url 'hrapplications:personal_removal' personal_app.id %}" class="btn btn-danger">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
<i class="fa-solid fa-trash-can"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
@ -55,23 +64,53 @@
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.auth.human_resources %}
|
||||
<h1 class="page-header text-center">{% translate "Application Management" %}
|
||||
<h1 class="page-header text-center mb-3">{% translate "Application Management" %}
|
||||
<div class="text-end">
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal">
|
||||
<button type="button" class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#modal-hr-search">
|
||||
{% translate "Search Applications" %}
|
||||
</button>
|
||||
</div>
|
||||
</h1>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#pending">{% translate "Pending" %}</a></li>
|
||||
<li><a data-toggle="tab" href="#reviewed">{% translate "Reviewed" %}</a></li>
|
||||
|
||||
<div class="card card-default mt-4">
|
||||
<div class="card-body clearfix">
|
||||
<ul class="nav nav-tabs" id="application-list" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a
|
||||
class="nav-link active"
|
||||
id="pending"
|
||||
data-bs-toggle="tab"
|
||||
href="#tab-pending"
|
||||
role="tab"
|
||||
aria-controls="tab-pending"
|
||||
aria-selected="true"
|
||||
>
|
||||
{% translate "Pending" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item" role="presentation">
|
||||
<a
|
||||
class="nav-link"
|
||||
id="reviewed"
|
||||
data-bs-toggle="tab"
|
||||
href="#tab-reviewed"
|
||||
role="tab"
|
||||
aria-controls="tab-reviewed"
|
||||
aria-selected="false"
|
||||
>
|
||||
{% translate "Reviewed" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="pending" class="tab-pane fade in active panel panel-default">
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="tab-content" id="application-list-content">
|
||||
<div id="tab-pending" class="tab-pane fade show active" role="tabpanel" aria-labelledby="tab-pending">
|
||||
{% if applications %}
|
||||
<table class="table">
|
||||
<tr>
|
||||
@ -82,6 +121,7 @@
|
||||
<th class="text-center">{% translate "Status" %}</th>
|
||||
<th class="text-center">{% translate "Actions" %}</th>
|
||||
</tr>
|
||||
|
||||
{% for app in applications %}
|
||||
<tr>
|
||||
<td class="text-center">{{ app.created }}</td>
|
||||
@ -103,7 +143,7 @@
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'hrapplications:view' app.id %}" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@ -113,9 +153,8 @@
|
||||
<div class="alert alert-warning text-center">{% translate "No pending applications." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="reviewed" class="tab-pane fade panel panel-default">
|
||||
<div class="panel-body">
|
||||
|
||||
<div id="tab-reviewed" class="tab-pane fade" role="tabpanel" aria-labelledby="tab-reviewed">
|
||||
{% if finished_applications %}
|
||||
<table class="table">
|
||||
<tr>
|
||||
@ -126,6 +165,7 @@
|
||||
<th class="text-center">{% translate "Status" %}</th>
|
||||
<th class="text-center">{% translate "Actions" %}</th>
|
||||
</tr>
|
||||
|
||||
{% for app in finished_applications %}
|
||||
<tr>
|
||||
<td class="text-center">{{ app.created }}</td>
|
||||
@ -147,11 +187,12 @@
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{% url 'hrapplications:view' app.id %}" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
|
||||
{% if perms.hrapplications.delete_application %}
|
||||
<a href="{% url 'hrapplications:remove' app.id %}" class="btn btn-danger">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
<i class="fa-solid fa-trash-can"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
@ -164,30 +205,9 @@
|
||||
</div>
|
||||
</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">{% translate "Close" %}</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">{% translate "Application Search" %}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-signin" role="form" action="{% url 'hrapplications:search' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ search_form|bootstrap }}
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% translate "Search" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include "hrapplications/partials/modals/search.html" %}
|
||||
{% endblock content %}
|
||||
|
@ -0,0 +1,32 @@
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% if perms.auth.human_resources %}
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="modal-hr-search" tabindex="-1" aria-labelledby="modalHrSearch" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="modal-title fs-5" id="modalHrSearchLabel">
|
||||
{% translate "Application Search" %}
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% translate 'Close' %}"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form class="form-signin" role="form" action="{% url 'hrapplications:search' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
|
||||
{% bootstrap_form search_form %}
|
||||
|
||||
<div class="form-group mt-3 clearfix">
|
||||
{% translate "Search" as button_text %}
|
||||
{% bootstrap_button button_class="btn btn-primary" content=button_text name="search" id="search" %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
@ -1,37 +1,47 @@
|
||||
{% extends "allianceauth/base.html" %}
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load bootstrap %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "HR Application Management" %}{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
{% block page_title %}
|
||||
{% translate "HR Application Management" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "HR Application Management" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<div>
|
||||
{% if perms.auth.human_resources %}
|
||||
<h1 class="page-header text-center">{% translate "Application Search Results" %}
|
||||
<div class="text-end">
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "Application Search Results" %}
|
||||
</h1>
|
||||
|
||||
<div class="text-end mb-3">
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal">
|
||||
<button type="button" class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#modal-hr-search">
|
||||
{% translate "Search Applications" %}
|
||||
</button>
|
||||
</div>
|
||||
</h1>
|
||||
<div class="container-fluid">
|
||||
<table class="table table-bordered">
|
||||
|
||||
<div>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% translate "Application ID" %}</th>
|
||||
<th class="text-center">{% translate "Username" %}</th>
|
||||
<th class="text-center">{% translate "Main Character" %}</th>
|
||||
<th class="text-center">{% translate "Corporation" %}</th>
|
||||
<th>{% translate "Application ID" %}</th>
|
||||
<th>{% translate "Username" %}</th>
|
||||
<th>{% translate "Main Character" %}</th>
|
||||
<th>{% translate "Corporation" %}</th>
|
||||
<th class="text-center">{% translate "Status" %}</th>
|
||||
<th class="text-center">{% translate "Actions" %}</th>
|
||||
<th class="text-end">{% translate "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>{{ app.id }}</td>
|
||||
<td>{{ app.user }}</td>
|
||||
<td >{{ app.main_character }}</td>
|
||||
<td>{{ app.form.corp }}</td>
|
||||
<td class="text-center">
|
||||
{% if app.approved == None %}
|
||||
<div class="badge bg-warning">{% translate "Pending" %}</div>
|
||||
@ -41,9 +51,9 @@
|
||||
<div class="badge bg-danger">{% translate "Rejected" %}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td class="text-end">
|
||||
<a href="{% url 'hrapplications:view' app.id %}" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@ -53,27 +63,5 @@
|
||||
{% 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">{% translate "Close" %}</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">{% translate "Application Search" %}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-signin" role="form" action="{% url 'hrapplications:search' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ search_form|bootstrap }}
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% translate "Search" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include "hrapplications/partials/modals/search.html" %}
|
||||
{% endblock content %}
|
||||
|
@ -1,16 +1,21 @@
|
||||
{% extends "allianceauth/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "View Application" %}{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
{% block page_title %}
|
||||
{% translate "View Application" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "HR Application Management" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "View Application" %}</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<div class="row">
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">{% translate "View Application" %}</h1>
|
||||
|
||||
<div>
|
||||
{% if app.approved %}
|
||||
<div class="alert alert-success text-center">{% translate "Approved" %}</div>
|
||||
{% elif app.approved == False %}
|
||||
@ -18,13 +23,18 @@
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% translate "Pending" %}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if app.reviewer_str %}
|
||||
<div class="alert alert-info text-center">{% translate "Reviewer:" %} {{ app.reviewer_str }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">{% translate "Applicant" %}</div>
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-header bg-info">
|
||||
<div class="card-title mb-0">{% translate "Applicant" %}</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% translate "User" %}</th>
|
||||
@ -36,49 +46,61 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">{% translate "Characters" %}</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-header bg-info">
|
||||
<div class="card-title mb-0">{% translate "Characters" %}</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center"></th>
|
||||
<th class="text-center">{% translate "Name" %}</th>
|
||||
<th class="text-center">{% translate "Corp" %}</th>
|
||||
<th class="text-center">{% translate "Alliance" %}</th>
|
||||
<th></th>
|
||||
<th>{% translate "Name" %}</th>
|
||||
<th>{% translate "Corporation" %}</th>
|
||||
<th>{% translate "Alliance" %}</th>
|
||||
</tr>
|
||||
|
||||
{% for char in app.characters %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<img class="ra-avatar img-responsive img-circle" src="{{ char.portrait_url_32 }}" alt="{{ char.character_name }}">
|
||||
<td>
|
||||
<img class="ra-avatar img-responsive rounded-circle" src="{{ char.portrait_url_32 }}" alt="{{ char.character_name }}">
|
||||
</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>
|
||||
<td>{{ char.character_name }}</td>
|
||||
<td>{{ char.corporation_name }}</td>
|
||||
<td>{{ 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 class="card mb-3">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">{{ response.question.title }}</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">{{ 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">{% translate "Actions" %}</div>
|
||||
<div class="panel-body text-center">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">{% translate "Actions" %}</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body text-center">
|
||||
{% if app.approved == None %}
|
||||
{% if app.reviewer == user %}
|
||||
{% if perms.hrapplications.approve_application %}
|
||||
<a href="{% url 'hrapplications:approve' app.id %}" class="btn btn-success">{% translate "Approve" %}</a>
|
||||
{% endif %}
|
||||
{% if perms.hrapplications.reject_application %}
|
||||
<a href="{% url 'hrapplications:reject' app.id %}" class="btn btn-danger">{% translate "Reject" %}</a>
|
||||
<a href="{% url 'hrapplications:reject' app.id %}" class="btn btn-warning">{% translate "Reject" %}</a>
|
||||
{% endif %}
|
||||
{% if perms.hrapplications.delete_application %}
|
||||
<a href="{% url 'hrapplications:remove' app.id %}" class="btn btn-danger">{% translate "Delete" %}</a>
|
||||
@ -87,63 +109,70 @@
|
||||
<a href="{% url 'hrapplications:mark_in_progress' app.id %}" class="btn btn-warning">{% translate "Mark in Progress" %}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if perms.hrapplications.add_applicationcomment %}
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">{% translate "Comment" %}</button>
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modal-hr-comment">{% translate "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">
|
||||
|
||||
<div class="card-group" id="accordion" role="tablist" aria-multiselectable="true">
|
||||
<div class="card card-default">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate 'Comments' %} ({{ comments.count }})
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
|
||||
<div class="panel-body">
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{% if comments %}
|
||||
{% 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 class="card card-default">
|
||||
<div class="card-header" role="tab" id="">
|
||||
<div class="card-title mb-0 clearfix">
|
||||
<div class="float-md-end">{{ comment.created }}</div>
|
||||
<div class="float-md-start">{% if comment.user.profile.main_character %}{{ comment.user.profile.main_character }}{% else %}{{ comment.user }}{% endif %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">{{ comment.text|linebreaks }}</div>
|
||||
<div class="card-body">{{ comment.text|linebreaks }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="alert alert-info">
|
||||
{% translate "No comments" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</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 fade" id="modal-hr-comment" tabindex="-1" aria-labelledby="modalHrComment" 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">{% translate "Close" %}</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel">{% translate "Add Comment" %}</h4>
|
||||
<div class="modal-title fs-5" id="modalHrCommentLabel">
|
||||
{% translate "Add Comment" %}
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% translate 'Close' %}"></button>
|
||||
</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">{% translate "Add Comment" %}</button>
|
||||
|
||||
{% bootstrap_form comment_form %}
|
||||
|
||||
<div class="form-group mt-3 clearfix">
|
||||
{% translate "Add comment" as button_text %}
|
||||
{% bootstrap_button button_class="btn btn-primary" content=button_text name="addComment" id="addComment" %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -144,7 +144,7 @@ class MenuItem(models.Model):
|
||||
"render": _render,
|
||||
"text": mi.text,
|
||||
"rank": mi.rank,
|
||||
"classes": (mi.icon_classes if mi.icon_classes != "" else "fas fa-folder"),
|
||||
"classes": (mi.icon_classes if mi.icon_classes != "" else "fa-solid fa-folder"),
|
||||
"hide": mi.hide
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
{% load i18n %}
|
||||
{% load navactive %}
|
||||
|
||||
{% if not item.hide %}
|
||||
<li class="d-flex flex-wrap m-2 p-2 pt-0 pb-0 mt-0 mb-0 me-0 pe-0">
|
||||
<i class="nav-link {{ item.classes }} fa-fw align-self-center me-3 {% if item.navactive %}{% navactive request item.navactive|join:' ' %}{% endif %}" {% if item.items|length %} type="button" data-bs-toggle="collapse" data-bs-target="#id-{{ item.text|slugify }}" aria-expanded="false" aria-controls="" {% endif %}></i>
|
||||
@ -7,6 +8,7 @@
|
||||
href="{% if item.url_name %}{% url item.url_name %}{% else %}{{ item.url }}{% endif %}">
|
||||
{% translate item.text %}
|
||||
</a>
|
||||
|
||||
{% if item.count >= 1 %}
|
||||
<span class="badge bg-primary m-2 align-self-center {% if item.items|length == 0 %}me-4{% endif %}">
|
||||
{{ item.count }}
|
||||
@ -14,13 +16,16 @@
|
||||
{% elif item.url %}
|
||||
<span class="pill m-2 me-4 align-self-center fas fa-external-link-alt"></span>
|
||||
{% endif %}
|
||||
|
||||
{% if item.items|length > 0 %}
|
||||
<span class="pill m-2 me-4 align-self-center fas fa-solid fa-chevron-down"
|
||||
<span
|
||||
class="pill m-2 me-4 align-self-center fas fa-solid fa-chevron-down"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#id-{{ item.text|slugify }}"
|
||||
aria-expanded="false"
|
||||
aria-controls=""></span>
|
||||
aria-controls="">
|
||||
</span>
|
||||
<!--<hr class="m-0 w-100">-->
|
||||
<ul class="collapse ps-1 w-100 border-start rounded-start border-light border-3" id="id-{{ item.text|slugify }}">
|
||||
{% for sub_item in item.items %}
|
||||
|
@ -1,15 +1,13 @@
|
||||
{% load i18n %}
|
||||
{% load navactive %}
|
||||
{% load auth_notifications %}
|
||||
<li class="nav-item {% navactive request 'notifications:' %}"
|
||||
id="menu_item_notifications">
|
||||
<a class="nav-link"
|
||||
href="{% url 'notifications:list' %}">
|
||||
<span class="fa">
|
||||
|
||||
<li class="nav-item {% navactive request 'notifications:' %}" id="menu_item_notifications">
|
||||
<a class="nav-link" href="{% url 'notifications:list' %}">
|
||||
{% with unread_count=request.user|user_unread_notification_count %}
|
||||
<i class="fas fa-bell{% if unread_count %} text-danger{% endif %}"></i>
|
||||
<i class="fa-solid fa-bell{% if unread_count %} text-danger{% endif %}"></i>
|
||||
{% endwith %}
|
||||
</span>
|
||||
|
||||
<span class="d-lg-none d-md-inline m-2">
|
||||
{% translate "Notifications" %}
|
||||
</span>
|
||||
|
@ -9,6 +9,7 @@
|
||||
<div class="p-2 position-relative m-2">
|
||||
<img class="rounded-circle" src="{{ main.character_id|character_portrait_url:64 }}" alt="{{ main.character_name }}">
|
||||
<img class="rounded-circle position-absolute bottom-0 start-0" src="{{ main.corporation_logo_url_32 }}" alt="{{ main.corporation_name }}">
|
||||
|
||||
{% if main.alliance_id %}
|
||||
<img class="rounded-circle position-absolute bottom-0 end-0" src="{{ main.alliance_logo_url_32 }}" alt="{{ main.alliance_name }}">
|
||||
{% elif main.faction_id %}
|
||||
|
@ -2,10 +2,10 @@
|
||||
{% load navactive %}
|
||||
{% load menu_menu_items %}
|
||||
|
||||
<div class="col-auto px-0 " >
|
||||
<div class="collapse collapse-horizontal" tabindex="-1" id="sidebar" >
|
||||
<div class="col-auto px-0">
|
||||
<div class="collapse collapse-horizontal" tabindex="-1" id="sidebar">
|
||||
<div style="width: 350px;">
|
||||
<div class="nav-padding navbar-dark bg-dark text-light px-0 d-flex flex-column overflow-hidden vh-100 auth-logo" >
|
||||
<div class="nav-padding navbar-dark bg-dark text-light px-0 d-flex flex-column overflow-hidden vh-100 auth-logo">
|
||||
{% if user.is_authenticated %}
|
||||
<ul style="z-index:5;" id="sidebar-menu" class="navbar-nav flex-column mb-auto overflow-auto pt-2">
|
||||
<li class="d-flex flex-wrap m-2 p-2 pt-0 pb-0 mt-0 mb-0 me-0 pe-0">
|
||||
@ -14,6 +14,7 @@
|
||||
{% translate "Dashboard" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% sorted_menu_items %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
@ -1,4 +1,5 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
@ -17,6 +18,7 @@
|
||||
<span class="badge bg-secondary">{{ unread|length }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="read-tab" data-bs-toggle="tab" data-bs-target="#read" type="button" role="tab" aria-controls="read" aria-selected="false">
|
||||
{% translate "Read" %}
|
||||
@ -28,12 +30,13 @@
|
||||
{% block header_nav_collapse_right %}
|
||||
<li class="nav-item">
|
||||
<a href="{% url 'notifications:mark_all_read' %}" class="nav-link" title="{% translate 'Mark all notifications as read' %}">
|
||||
<i class="fas fa-check-double"></i>
|
||||
<i class="fa-solid fa-check-double"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{% url 'notifications:delete_all_read' %}" class="nav-link" title="{% translate 'Delete all read notifications' %}">
|
||||
<i class="fas fa-trash"></i>
|
||||
<i class="fa-solid fa-trash-can"></i>
|
||||
</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
|
@ -7,16 +7,18 @@
|
||||
<th>{% translate "Title" %}</th>
|
||||
<th class="text-end">{% translate "Action" %}</th>
|
||||
</tr>
|
||||
|
||||
{% for notif in notifications %}
|
||||
<tr class="table-{{ notif.level }}">
|
||||
<td>{{ notif.timestamp }}</td>
|
||||
<td>{{ notif.title }}</td>
|
||||
<td class="text-end">
|
||||
<a href="{% url 'notifications:view' notif.id %}" class="btn btn-primary btn-sm" title="View">
|
||||
<span class="fas fa-eye"></span>
|
||||
<span class="fa-solid fa-eye"></span>
|
||||
</a>
|
||||
|
||||
<a href="{% url 'notifications:remove' notif.id %}" class="btn btn-danger btn-sm" title="Remove">
|
||||
<span class="fas fa-trash"></span>
|
||||
<span class="fa-solid fa-trash-can"></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -32,7 +32,7 @@ def register_url():
|
||||
|
||||
|
||||
class NextOpsHook(hooks.DashboardItemHook):
|
||||
def __init__(self): #TODO add the view permms so if they cant see it is not rendered
|
||||
def __init__(self): #TODO add the view perms so if they cant see it is not rendered
|
||||
hooks.DashboardItemHook.__init__(
|
||||
self,
|
||||
dashboard_ops,
|
||||
|
@ -3,6 +3,7 @@ Form Widgets
|
||||
"""
|
||||
|
||||
from django import forms
|
||||
from django.utils.safestring import mark_safe
|
||||
|
||||
|
||||
class DataListWidget(forms.TextInput):
|
||||
@ -42,4 +43,4 @@ class DataListWidget(forms.TextInput):
|
||||
|
||||
data_list += "</datalist>"
|
||||
|
||||
return text_html + data_list
|
||||
return mark_safe(text_html + data_list)
|
||||
|
@ -1,47 +1,65 @@
|
||||
{% extends "allianceauth/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
|
||||
{% block page_title %}{% translate "Create Operation" %}{% endblock page_title %}
|
||||
{% block page_title %}
|
||||
{% translate "Create Operation" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Fleet Operation Timers" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% 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">{% translate "Create Fleet Operation" %}</h1>
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "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">
|
||||
<div class="card card-primary border-0">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "Fleet operation details" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<form role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% translate "Create Fleet Operation" %}</button>
|
||||
|
||||
{% bootstrap_form form %}
|
||||
|
||||
<div class="form-group mt-3 clearfix">
|
||||
{% translate "Create fleet operation" as button_text %}
|
||||
{% bootstrap_button button_class="btn btn-primary" content=button_text %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$('#id_start').datetimepicker({
|
||||
setlocale: '{{ LANGUAGE_CODE }}',
|
||||
{% if NIGHT_MODE %}
|
||||
theme: 'dark',
|
||||
{% else %}
|
||||
theme: 'default',
|
||||
{% endif %}
|
||||
mask: true,
|
||||
format: 'Y-m-d H:i',
|
||||
minDate: 0
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -1,10 +1,11 @@
|
||||
{% load i18n %}
|
||||
{% load evelinks %}
|
||||
|
||||
<div class="col-12 col-xl-6 align-self-stretch p-2">
|
||||
<div class="col-12 align-self-stretch py-2">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title text-center">{% translate "Upcoming Fleets" %}</h4>
|
||||
|
||||
<div class="card-body">
|
||||
<div style="height: 300px; overflow-y:auto;">
|
||||
<table class="table">
|
||||
@ -16,6 +17,7 @@
|
||||
<th class="text-center">{% translate "Start Time" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for ops in timers %}
|
||||
<tr>
|
||||
@ -23,7 +25,7 @@
|
||||
{{ ops.operation_name }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
({{ ops.type }})
|
||||
{{ ops.type }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{{ ops.system|dotlan_solar_system_url }}">{{ ops.system }}</a>
|
||||
|
@ -14,17 +14,20 @@
|
||||
<th>{% translate "Local Time" %}</th>
|
||||
<th>{% translate "Duration" %}</th>
|
||||
<th>{% translate "FC" %}</th>
|
||||
|
||||
{% if perms.auth.optimer_management %}
|
||||
{# <th>{% translate "Creator" %}</th>#}
|
||||
<th class="text-end" style="width: 150px;">{% translate "Action" %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{% for ops in timers %}
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{{ ops.operation_name }}
|
||||
|
||||
{% if ops.type %}
|
||||
<br>({{ ops.type }})
|
||||
{% endif %}
|
||||
@ -38,15 +41,16 @@
|
||||
<td nowrap><div id="localtime{{ ops.id }}"></div><div id="countdown{{ ops.id }}"></div></td>
|
||||
<td>{{ ops.duration }}</td>
|
||||
<td>{{ ops.fc }}</td>
|
||||
|
||||
{% if perms.auth.optimer_management %}
|
||||
{# <td>{{ ops.eve_character }}</td>#}
|
||||
<td class="text-end">
|
||||
<a href="{% url 'optimer:remove' ops.id %}" class="btn btn-danger">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
<i class="fa-solid fa-trash-can"></i>
|
||||
</a>
|
||||
|
||||
<a href="{% url 'optimer:edit' ops.id %}" class="btn btn-info">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
<i class="fa-solid fa-pen-to-square"></i>
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
@ -1,49 +1,70 @@
|
||||
{% extends "allianceauth/base.html" %}
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
|
||||
{% block page_title %}{% translate "Fleet Operation Management" %}{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
{% block page_title %}
|
||||
{% translate "Fleet Operation Management" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Fleet Operation Timers" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Fleet Operation Timers" %}
|
||||
<div>
|
||||
<div class="text-end">
|
||||
{% if perms.auth.optimer_management %}
|
||||
<a href="{% url 'optimer:add' %}" class="btn btn-success">{% translate "Create Operation" %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</h1>
|
||||
|
||||
<div class="col-lg-12 text-center row">
|
||||
<div class="text-center mb-3">
|
||||
<div class="badge bg-info text-start">
|
||||
<b>{% translate "Current Eve Time:" %} </b>
|
||||
<b>{% translate "Current Eve Time:" %}</b>
|
||||
<span id="current-time"></span>
|
||||
</div>
|
||||
<strong class="badge bg-info text-start" id="current-time"></strong>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
<h4><b>{% translate "Next Fleet Operations" %}</b></h4>
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "Next Fleet Operations" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{% if future_timers %}
|
||||
{% include "optimer/fleetoptable.html" with timers=future_timers %}
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% translate "No upcoming timers." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4><b>{% translate "Past Fleet Operations" %}</b></h4>
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "Past Fleet Operations" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{% if past_timers %}
|
||||
{% include "optimer/fleetoptable.html" with timers=past_timers %}
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">{% translate "No past timers." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include 'bundles/moment-js.html' with locale=True %}
|
||||
{% include 'bundles/timers-js.html' %}
|
||||
|
||||
<script>
|
||||
// Data
|
||||
let timers = [
|
||||
const timers = [
|
||||
{% for op in optimer %}
|
||||
{
|
||||
'id': {{ op.id }},
|
||||
@ -57,9 +78,9 @@
|
||||
* Update a timer
|
||||
* @param timer Timer information
|
||||
*/
|
||||
let updateTimer = function (timer) {
|
||||
const updateTimer = (timer) => {
|
||||
if (timer.start.isAfter(Date.now())) {
|
||||
let duration = moment.duration(timer.start - moment(), 'milliseconds');
|
||||
const duration = moment.duration(timer.start - moment(), 'milliseconds');
|
||||
|
||||
document.getElementById("countdown" + timer.id).innerHTML = getDurationString(duration);
|
||||
} else {
|
||||
@ -69,10 +90,13 @@
|
||||
}
|
||||
};
|
||||
|
||||
let updateAllTimers = function () {
|
||||
let l = timers.length;
|
||||
/**
|
||||
* Update all timers
|
||||
*/
|
||||
const updateAllTimers = () => {
|
||||
const l = timers.length;
|
||||
|
||||
for (var i=0; i < l; ++i) {
|
||||
for (let i=0; i < l; ++i) {
|
||||
if (timers[i].expired) continue;
|
||||
|
||||
updateTimer(timers[i]);
|
||||
@ -83,26 +107,30 @@
|
||||
* Set the local time info for the timer
|
||||
* @param timer Timer information
|
||||
*/
|
||||
let setLocalTime = function (timer) {
|
||||
const setLocalTime = (timer) => {
|
||||
document.getElementById("localtime" + timer.id).innerHTML = timer.start.format("ddd @ LT");
|
||||
};
|
||||
|
||||
/**
|
||||
* Set all local time fields
|
||||
*/
|
||||
let setAllLocalTimes = function () {
|
||||
let l = timers.length;
|
||||
const setAllLocalTimes = () => {
|
||||
const l = timers.length;
|
||||
|
||||
for (var i=0; i < l; ++i) {
|
||||
for (let i=0; i < l; ++i) {
|
||||
setLocalTime(timers[i]);
|
||||
}
|
||||
};
|
||||
|
||||
let updateClock = function () {
|
||||
/**
|
||||
* Get the current Eve time as a string
|
||||
* @returns {string} Eve time string
|
||||
*/
|
||||
const updateClock = () => {
|
||||
document.getElementById("current-time").innerHTML = getCurrentEveTimeString();
|
||||
};
|
||||
|
||||
let timedUpdate = function () {
|
||||
const timedUpdate = () => {
|
||||
updateClock();
|
||||
updateAllTimers();
|
||||
};
|
||||
|
@ -1,57 +1,65 @@
|
||||
{% extends "allianceauth/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
|
||||
{% block page_title %}{% translate "Update Fleet Operation" %}{% endblock page_title %}
|
||||
{% block page_title %}
|
||||
{% translate "Update Fleet Operation" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Fleet Operation Timers" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/jquery-datetimepicker-css.html' %}
|
||||
{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "Update Fleet Operation" %}
|
||||
</h1>
|
||||
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Update Fleet Operation" %}</h1>
|
||||
<div class="card card-primary border-0">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "Fleet operation details" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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">{% translate "Fleet Operation Does Not Exist" %}</div>
|
||||
{% else %}
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
<div class="card-body">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<form role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% translate "Update Fleet Operation" %}
|
||||
</button>
|
||||
|
||||
{% bootstrap_form form %}
|
||||
|
||||
<div class="form-group mt-3 clearfix">
|
||||
{% translate "Update fleet operation" as button_text %}
|
||||
{% bootstrap_button button_class="btn btn-primary" content=button_text %}
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$('#id_start').datetimepicker({
|
||||
setlocale: '{{ LANGUAGE_CODE }}',
|
||||
{% if NIGHT_MODE %}
|
||||
theme: 'dark',
|
||||
{% else %}
|
||||
theme: 'default',
|
||||
{% endif %}
|
||||
mask: true,
|
||||
format: 'Y-m-d H:i',
|
||||
minDate: 0
|
||||
});
|
||||
|
||||
{% endblock extra_script %}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -18,6 +18,15 @@ logger = logging.getLogger(__name__)
|
||||
@login_required
|
||||
@permission_required('auth.optimer_view')
|
||||
def optimer_view(request):
|
||||
"""
|
||||
View for the optimer management page
|
||||
|
||||
:param request:
|
||||
:type request:
|
||||
:return:
|
||||
:rtype:
|
||||
"""
|
||||
|
||||
logger.debug("optimer_view called by user %s" % request.user)
|
||||
base_query = OpTimer.objects.select_related('eve_character', 'type')
|
||||
render_items = {'optimer': base_query.all(),
|
||||
@ -32,7 +41,17 @@ def optimer_view(request):
|
||||
@login_required
|
||||
@permission_required('auth.optimer_management')
|
||||
def add_optimer_view(request):
|
||||
"""
|
||||
View for the add optimer page
|
||||
|
||||
:param request:
|
||||
:type request:
|
||||
:return:
|
||||
:rtype:
|
||||
"""
|
||||
|
||||
logger.debug("add_optimer_view called by user %s" % request.user)
|
||||
|
||||
if request.method == 'POST':
|
||||
form = OpForm(request.POST, data_list=OpTimerType.objects.all())
|
||||
logger.debug("Request type POST contains form valid: %s" % form.is_valid())
|
||||
@ -81,19 +100,43 @@ def add_optimer_view(request):
|
||||
@login_required
|
||||
@permission_required('auth.optimer_management')
|
||||
def remove_optimer(request, optimer_id):
|
||||
"""
|
||||
Remove optimer
|
||||
|
||||
:param request:
|
||||
:type request:
|
||||
:param optimer_id:
|
||||
:type optimer_id:
|
||||
:return:
|
||||
:rtype:
|
||||
"""
|
||||
|
||||
logger.debug(f"remove_optimer called by user {request.user} for operation id {optimer_id}")
|
||||
op = get_object_or_404(OpTimer, id=optimer_id)
|
||||
op.delete()
|
||||
logger.info(f"Deleting optimer id {optimer_id} by user {request.user}")
|
||||
messages.success(request, _('Removed operation timer for %(opname)s.') % {"opname": op.operation_name})
|
||||
|
||||
return redirect("optimer:view")
|
||||
|
||||
|
||||
@login_required
|
||||
@permission_required('auth.optimer_management')
|
||||
def edit_optimer(request, optimer_id):
|
||||
"""
|
||||
Edit optimer
|
||||
|
||||
:param request:
|
||||
:type request:
|
||||
:param optimer_id:
|
||||
:type optimer_id:
|
||||
:return:
|
||||
:rtype:
|
||||
"""
|
||||
|
||||
logger.debug(f"edit_optimer called by user {request.user} for optimer id {optimer_id}")
|
||||
op = get_object_or_404(OpTimer, id=optimer_id)
|
||||
|
||||
if request.method == 'POST':
|
||||
form = OpForm(request.POST, data_list=OpTimerType.objects.all())
|
||||
logger.debug("Received POST request containing update optimer form, is valid: %s" % form.is_valid())
|
||||
@ -141,8 +184,18 @@ def edit_optimer(request, optimer_id):
|
||||
|
||||
|
||||
def dashboard_ops(request):
|
||||
"""
|
||||
Returns the next five upcoming ops for the dashboard
|
||||
|
||||
:param request:
|
||||
:type request:
|
||||
:return:
|
||||
:rtype:
|
||||
"""
|
||||
|
||||
base_query = OpTimer.objects.select_related('eve_character', 'type')
|
||||
timers = base_query.filter(start__gte=timezone.now())[:5]
|
||||
|
||||
if timers.count():
|
||||
context = {
|
||||
'timers': timers,
|
||||
|
@ -1,18 +1,29 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
{{ permission.permission.codename }} - {% translate "Permissions Audit" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Permissions Audit" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
<h1 class="page-header">{% translate "Permissions Audit" %}: {{ permission.permission.codename }}</h1>
|
||||
<h1 class="page-header md-3">
|
||||
{% translate "Permissions Audit" %}: {{ permission.permission.codename }}
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
<a href="{% url 'permissions_tool:overview' %}" class="btn btn-primary">
|
||||
<i class="fa-solid fa-chevron-left"></i> {% translate "Back" %}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped" id="tab_permissions_audit">
|
||||
<table class="table table-striped" id="tab_permissions_audit" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{% translate "Group" %}</th>
|
||||
@ -44,14 +55,11 @@
|
||||
{% endblock content %}
|
||||
{% block extra_javascript %}
|
||||
{% include "bundles/datatables-js-bs5.html" %}
|
||||
{% include "bundles/filterdropdown-js.html" %}
|
||||
{% endblock extra_javascript %}
|
||||
{% block extra_css %}
|
||||
{% include "bundles/datatables-css-bs5.html" %}
|
||||
{% endblock extra_css %}
|
||||
{% block extra_script %}
|
||||
$(document).ready(function () {
|
||||
let groupColumn = 0;
|
||||
{# {% include "bundles/filterdropdown-js.html" %}#}
|
||||
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
const groupColumn = 0;
|
||||
|
||||
$('#tab_permissions_audit').DataTable({
|
||||
columnDefs: [{
|
||||
@ -72,19 +80,17 @@
|
||||
"stateSave": true,
|
||||
"stateDuration": 0,
|
||||
drawCallback: function (settings) {
|
||||
let api = this.api();
|
||||
let rows = api.rows({
|
||||
const api = this.api();
|
||||
const rows = api.rows({
|
||||
page: 'current'
|
||||
}).nodes();
|
||||
let last = null;
|
||||
|
||||
api.column(groupColumn, {
|
||||
page: 'current'
|
||||
}).data().each(function (group, i) {
|
||||
}).data().each((group, i) => {
|
||||
if (last !== group) {
|
||||
$(rows).eq(i).before(
|
||||
'<tr class="h4 table-secondary"><td colspan="3">' + group + '</td></tr>'
|
||||
);
|
||||
$(rows).eq(i).before(`<tr class="h5 table-primary"><td colspan="3">${group}</td></tr>`);
|
||||
|
||||
last = group;
|
||||
}
|
||||
@ -92,4 +98,9 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
</script>
|
||||
{% endblock extra_javascript %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% include "bundles/datatables-css-bs5.html" %}
|
||||
{% endblock extra_css %}
|
||||
|
@ -1,10 +1,14 @@
|
||||
{% load evelinks %}
|
||||
{% load i18n %}
|
||||
|
||||
<tr>
|
||||
<td>{{ type }}: {{ name }}</td>
|
||||
<td class="text-end">
|
||||
<img src="{{ user.profile.main_character|character_portrait_url:32 }}" class="img-circle" alt="{{ user.profile.main_character.character_name }}"></td>
|
||||
<td><strong>{{ user }}<br></strong>{{ user.profile.main_character.character_name }}</td>
|
||||
<img src="{{ user.profile.main_character|character_portrait_url:32 }}" class="img-circle" alt="{{ user.profile.main_character.character_name }}">
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ user }}<br></strong>{{ user.profile.main_character.character_name }}
|
||||
</td>
|
||||
<td class="text-start">
|
||||
{% if user.profile.main_character %}
|
||||
<a href="{{ user.profile.main_character|dotlan_corporation_url }}" target="_blank">{{ user.profile.main_character.corporation_name }}</a>
|
||||
|
@ -1,11 +1,17 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
{% translate "Permissions Overview" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Permissions Audit" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-12">
|
||||
<h1 class="page-header">{% translate "Permissions Overview" %}</h1>
|
||||
<div>
|
||||
<p>
|
||||
{% if request.GET.all != 'yes' %}
|
||||
{% translate "Showing only applied permissions" %}
|
||||
@ -15,8 +21,9 @@
|
||||
<a href="{% url 'permissions_tool:overview' %}?all=no" class="btn btn-primary">{% translate "Show Applied" %}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped" id="tab_permissions_overview">
|
||||
<table class="table table-striped" id="tab_permissions_overview" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{% translate "App" %}</th>
|
||||
@ -28,6 +35,7 @@
|
||||
<th scope="col">{% translate "States" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for perm in permissions %}
|
||||
<tr>
|
||||
@ -49,16 +57,15 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include "bundles/datatables-js-bs5.html" %}
|
||||
{% include "bundles/filterdropdown-js.html" %}
|
||||
{% endblock extra_javascript %}
|
||||
{% block extra_css %}
|
||||
{% include "bundles/datatables-css-bs5.html" %}
|
||||
{% endblock extra_css %}
|
||||
{% block extra_script %}
|
||||
$(document).ready(function () {
|
||||
let groupColumn = 0;
|
||||
{# {% include "bundles/filterdropdown-js.html" %}#}
|
||||
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
const groupColumn = 0;
|
||||
|
||||
$('#tab_permissions_overview').DataTable({
|
||||
columnDefs: [{
|
||||
"visible": false,
|
||||
@ -70,7 +77,8 @@
|
||||
[2, 'asc']
|
||||
],
|
||||
filterDropDown: {
|
||||
columns: [{
|
||||
columns: [
|
||||
{
|
||||
idx: 0
|
||||
},
|
||||
{
|
||||
@ -81,27 +89,28 @@
|
||||
},
|
||||
"stateSave": true,
|
||||
"stateDuration": 0,
|
||||
drawCallback: function (settings) {
|
||||
let api = this.api();
|
||||
let rows = api.rows({
|
||||
drawCallback: function(settings) {
|
||||
const api = this.api();
|
||||
const rows = api.rows({
|
||||
page: 'current'
|
||||
}).nodes();
|
||||
let last = null;
|
||||
|
||||
api.column(groupColumn, {
|
||||
page: 'current'
|
||||
}).data().each(function (group, i) {
|
||||
}).data().each((group, i) => {
|
||||
if (last !== group) {
|
||||
$(rows).eq(i).before(
|
||||
'
|
||||
<tr class="h4 table-secondary">
|
||||
<td colspan="6">' + group + '</td>
|
||||
</tr>
|
||||
'
|
||||
);
|
||||
$(rows).eq(i).before(`<tr class="h5 table-primary"><td colspan="6">${group}</td></tr>`);
|
||||
|
||||
last = group;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
</script>
|
||||
{% endblock extra_javascript %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% include "bundles/datatables-css-bs5.html" %}
|
||||
{% endblock extra_css %}
|
||||
|
@ -24,26 +24,26 @@
|
||||
{% if not user_has_account %}
|
||||
{% if urls.auth_activate %}
|
||||
<a class="btn btn-warning" href="{% url urls.auth_activate %}" title="{% translate 'Activate' %}">
|
||||
<span class="fas fa-check fa-fw"></span>
|
||||
<i class="fa-solid fa-check fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if urls.auth_reset %}
|
||||
<a class="btn btn-primary" href="{% url urls.auth_reset %}" title="{% translate 'Reset Password' %}">
|
||||
<span class="fas fa-sync fa-fw"></span>
|
||||
<i class="fa-solid fa-rotate fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if urls.auth_deactivate %}
|
||||
<a class="btn btn-danger" href="{% url urls.auth_deactivate %}" title="{% translate 'Deactivate' %}">
|
||||
<span class="fas fa-times fa-fw"></span>
|
||||
<i class="fa-solid fa-xmark fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if request.user.is_superuser %}
|
||||
<a class="btn btn-primary" type="button" id="btnLinkDiscordServer" href="{% url urls.auth_add_bot %}" title="{% translate 'Link Discord Server' %}">
|
||||
<span class="fas fa-link fa-fw"></span>
|
||||
<i class="fa-solid fa-link fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -21,6 +21,6 @@
|
||||
|
||||
{% block controls %}
|
||||
<a class="btn btn-success" href="{{ DISCOURSE_URL }}" title="{% translate 'Go to forums' %}">
|
||||
<span class="fas fa-arrow-right fa-fw"></span>
|
||||
<i class="fa-solid fa-arrow-right fa-fw"></i>
|
||||
</a>
|
||||
{% endblock %}
|
||||
|
@ -18,31 +18,31 @@
|
||||
{% if username == "" %}
|
||||
{% if urls.auth_activate %}
|
||||
<a class="btn btn-warning" href="{% url urls.auth_activate %}" title="{% translate 'Activate' %}">
|
||||
<span class="fas fa-check fa-fw"></span>
|
||||
<i class="fa-solid fa-check fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if urls.auth_set_password %}
|
||||
<a class="btn btn-warning" href="{% url urls.auth_set_password %}" title="{% translate 'Set Password' %}">
|
||||
<span class="fas fa-edit fa-fw"></span>
|
||||
<i class="fa-solid fa-pen-to-square fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if urls.auth_reset_password %}
|
||||
<a class="btn btn-primary" href="{% url urls.auth_reset_password %}" title="{% translate 'Reset Password' %}">
|
||||
<span class="fas fa-sync fa-fw"></span>
|
||||
<i class="fa-solid fa-rotate fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if urls.auth_deactivate %}
|
||||
<a class="btn btn-danger" href="{% url urls.auth_deactivate %}" title="{% translate 'Deactivate' %}">
|
||||
<span class="fas fa-times fa-fw"></span>
|
||||
<i class="fa-solid fa-xmark fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if connect_url %}
|
||||
<a class="btn btn-success" href="mumble://{{ connect_url }}" title="{% translate 'Connect' %}">
|
||||
<span class="fas fa-arrow-right fa-fw"></span>
|
||||
<i class="fa-solid fa-arrow-right fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -1,30 +1,47 @@
|
||||
{% extends "allianceauth/base.html" %}
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "Jabber Broadcast" %}{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
{% block page_title %}
|
||||
{% translate "Jabber Broadcast" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Jabber Broadcast" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Jabber Broadcast" %}</h1>
|
||||
<div>
|
||||
<div class="card card-primary border-0">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "Jabber Broadcast" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
<div class="card-body">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
{% if success %}
|
||||
<div class="alert alert-success" role="alert">{% translate "Broadcast Sent!!" %}</div>
|
||||
<div class="alert alert-success" role="alert">
|
||||
{% translate "Broadcast Sent!!" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<form class="form-signin" role="form" action="" method="POST" onsubmit="submitbutton.disabled = true; return true;">
|
||||
|
||||
<form role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
|
||||
{% bootstrap_form form %}
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary btn-block" name="submitbutton" type="submit">{% translate "Broadcast" %}
|
||||
</button>
|
||||
|
||||
<div class="form-group mt-3 clearfix">
|
||||
{% translate "Broadcast" as button_text %}
|
||||
{% bootstrap_button button_class="btn btn-primary" content=button_text %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@ -1,11 +1,13 @@
|
||||
{% extends "admin/change_list.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block object-tools-items %}
|
||||
|
||||
{{ block.super }}
|
||||
<li>
|
||||
<li>
|
||||
<a href="{% url 'teamspeak3:admin_update_ts3_groups' %}" class="btn btn-high">
|
||||
{% translate "Update TeamSpeak3 groups" %}
|
||||
</a>
|
||||
</li>
|
||||
</li>
|
||||
{% endblock %}
|
||||
|
@ -1,4 +1,5 @@
|
||||
{% extends "services/services_ctrl_base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
@ -20,20 +21,20 @@
|
||||
{% block controls %}
|
||||
{% if authinfo.teamspeak3_uid == "" %}
|
||||
<a href="{% url 'teamspeak3:activate' %}" title="Activate" class="btn btn-warning">
|
||||
<span class="fas fa-check fa-fw"></span>
|
||||
<i class="fa-solid fa-check fa-fw"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'teamspeak3:verify' %}" title="Verify Client ID" class="btn btn-success">
|
||||
<span class="far fa-sign-in fa-fw"></span>
|
||||
<i class="fa-solid fa-right-to-bracket fa-fw"></i>
|
||||
</a>
|
||||
<a href="{% url 'teamspeak3:reset_perm' %}" title="Refresh Token" class="btn btn-primary">
|
||||
<span class="fas fa-sync fa-fw"></span>
|
||||
<i class="fa-solid fa-rotate fa-fw"></i>
|
||||
</a>
|
||||
<a href="{% url 'teamspeak3:deactivate' %}" title="Deactivate" class="btn btn-danger">
|
||||
<span class="fas fa-times fa-fw"></span>
|
||||
<i class="fa-solid fa-xmark fa-fw"></i>
|
||||
</a>
|
||||
<a href="ts3server://{{ TEAMSPEAK3_PUBLIC_URL }}?nickname={{ authinfo.teamspeak3_uid }}" title="Connect" class="btn btn-success">
|
||||
<span class="fas fa-arrow-right fa-fw"></span>
|
||||
<i class="fa-solid fa-arrow-right fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -1,20 +1,25 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "Verify TeamSpeak3" %}{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Verify TeamSpeak3 Identity" %}</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "Verify TeamSpeak3 Identity" %}
|
||||
</h1>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-4">
|
||||
<a href="ts3server://{{ public_url }}?token={{ authinfo.teamspeak3_perm_key }}&nickname={{ authinfo.teamspeak3_uid }}" class="btn btn-primary btn-block btn-lg" title="Join">{% translate "Join Server" %}</a>
|
||||
<br>
|
||||
<form class="form-signin" role="form" action="{% url 'teamspeak3:verify' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
|
||||
{% bootstrap_form form %}
|
||||
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% translate "Continue" %}</button>
|
||||
</form>
|
||||
|
@ -4,6 +4,7 @@
|
||||
<li>
|
||||
<a class="{% navactive request item.navactive|join:' ' %}" href="{% url item.url_name %}">
|
||||
<i class="{{ item.classes }}"></i> {% translate item.text %}
|
||||
|
||||
{% if item.count != None %}
|
||||
<span class="badge">{{ item.count }}</span>
|
||||
{% endif %}
|
||||
|
@ -2,30 +2,45 @@
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "Fleet Formatter Tool" %}{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
{% block page_title %}
|
||||
{% translate "Fleet Formatter Tool" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Fleet Formatter Tool" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Fleet Broadcast Formatter Tool" %}</h1>
|
||||
<div>
|
||||
<div class="card card-primary border-0">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "Fleet Details" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<div class="row">
|
||||
<div class="card-body">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
{% if generated != "" %}
|
||||
<textarea class="form-control" rows="10" cols="60">{{ generated }}
|
||||
</textarea>
|
||||
<div class="text-right mb-3">
|
||||
<textarea class="form-control" rows="10" cols="60">{{ generated }}</textarea>
|
||||
</div>
|
||||
{% endif %}
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
|
||||
<form role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
|
||||
{% bootstrap_form form %}
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% translate "Format" %}</button>
|
||||
<br>
|
||||
|
||||
<div class="form-group mt-3 clearfix">
|
||||
{% translate "Format" as button_text %}
|
||||
{% bootstrap_button button_class="btn btn-primary" content=button_text %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@ -1,17 +1,21 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
{% blocktranslate with service_name=view.service_name|title %}Delete {{ service_name }} Account?{% endblocktranslate %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Available Services" %}
|
||||
{% 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 with service_name=view.service_name|title %}Delete {{ service_name }} Account?{% endblocktranslate %}
|
||||
</h1>
|
||||
<div class="container">
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-4 align-self-center">
|
||||
<form action="" method="post">
|
||||
@ -26,5 +30,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@ -1,15 +1,24 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% blocktranslate with service_name=view.service_name|title %}{{ service_name }} Credentials{% endblocktranslate %}{% endblock page_title %}
|
||||
{% block page_title %}
|
||||
{% blocktranslate with service_name=view.service_name|title %}{{ service_name }} Credentials{% endblocktranslate %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Available Services" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% blocktranslate with service_name=view.service_name|title %}{{ service_name }} Credentials{% endblocktranslate %}</h1>
|
||||
<div class="container">
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% blocktranslate with service_name=view.service_name|title %}{{ service_name }} Credentials{% endblocktranslate %}
|
||||
</h1>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-4 align-self-center">
|
||||
<form class="form-signin">
|
||||
<form>
|
||||
{% for key, value in credentials.items %}
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="id_{{ key }}">{{ key|capfirst }}</label>
|
||||
@ -17,9 +26,9 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
</form>
|
||||
|
||||
<a href="{% url 'services:services' %}" class="btn btn-lg btn-block btn-primary" title="Continue">{% translate "Continue" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,16 +1,25 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% blocktranslate with service_name=view.service_name|title %}{{ service_name }} Password Change{% endblocktranslate %}{% endblock page_title %}
|
||||
{% block page_title %}
|
||||
{% blocktranslate with service_name=view.service_name|title %}{{ service_name }} Password Change{% endblocktranslate %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Available Services" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% blocktranslate with service_name=view.service_name|title %}Set {{service_name}} Password{% endblocktranslate %}</h1>
|
||||
<div class="container">
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% blocktranslate with service_name=view.service_name|title %}Set {{service_name}} Password{% endblocktranslate %}
|
||||
</h1>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-4 align-self-center">
|
||||
<form class="form-signin" role="form" action="" method="POST" onsubmit="submitbutton.disabled = true; return true;">
|
||||
<form role="form" action="" method="POST" onsubmit="submitbutton.disabled = true; return true;">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form form %}
|
||||
<br>
|
||||
@ -19,5 +28,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@ -1,11 +1,13 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "Services Management" %}{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block header_nav_brand %}{% translate "Available Services" %}{% endblock header_nav_brand %}
|
||||
{% block page_title %}
|
||||
{% translate "Services Management" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Available Services" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="d-flex py-2 pt-0 bd-highlight justify-content-center flex-wrap">
|
||||
@ -14,40 +16,40 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="w-100 text-center">
|
||||
<h4>Legend</h4>
|
||||
<div class="mt-3">
|
||||
<h4 class="border-bottom">{% translate "Legend" %}</h4>
|
||||
<div class="d-inline-flex bd-highlight justify-content-center flex-wrap">
|
||||
<div class="d-inline-flex m-3">
|
||||
<a title="Activate" class="btn btn-warning">
|
||||
<span class="fas fa-check fa-fw"></span>
|
||||
</a>
|
||||
<div class="d-inline-flex align-items-center m-2">
|
||||
<span title="Activate" class="btn btn-warning btn-sm">
|
||||
<i class="fa-solid fa-check fa-fw"></i>
|
||||
</span>
|
||||
<p class="m-2 p-0 align-self-center">
|
||||
{% translate "Click to activate the service for your user." %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="d-inline-flex m-3">
|
||||
<a title="Set Password" class="btn btn-warning">
|
||||
<span class="fas fa-edit fa-fw"></span>
|
||||
</a>
|
||||
<div class="d-inline-flex align-items-center m-2">
|
||||
<span title="Set Password" class="btn btn-warning btn-sm">
|
||||
<i class="fa-solid fa-pen-to-square"></i>
|
||||
</span>
|
||||
<p class="m-2 p-0 align-self-center">
|
||||
{% translate "Click to manually set your password." %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="d-inline-flex m-3">
|
||||
<a title="Reset Password" class="btn btn-primary">
|
||||
<span class="fas fa-sync fa-fw"></span>
|
||||
</a>
|
||||
<div class="d-inline-flex align-items-center m-2">
|
||||
<span title="Reset Password" class="btn btn-primary btn-sm">
|
||||
<i class="fa-solid fa-rotate fa-fw"></i>
|
||||
</span>
|
||||
<p class="m-2 p-0 align-self-center">
|
||||
{% translate "Click to randomly generate your password." %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="d-inline-flex m-3">
|
||||
<a title="Deactivate" class="btn btn-danger">
|
||||
<span class="fas fa-times fa-fw"></span>
|
||||
</a>
|
||||
<div class="d-inline-flex align-items-center m-2">
|
||||
<span title="Deactivate" class="btn btn-danger btn-sm">
|
||||
<i class="fa-solid fa-xmark fa-fw"></i>
|
||||
</span>
|
||||
<p class="m-2 p-0 align-self-center">
|
||||
{% translate "Click to deactivate the service for your user" %}
|
||||
</p>
|
||||
|
@ -1,4 +1,5 @@
|
||||
{% extends "services/services_ctrl_base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
@ -13,23 +14,25 @@
|
||||
{% if username == "" %}
|
||||
{% if urls.auth_activate %}
|
||||
<a href="{% url urls.auth_activate %}" title="Activate" class="btn btn-warning">
|
||||
<span class="fas fa-check fa-fw"></span>
|
||||
<i class="fa-solid fa-check fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if urls.auth_set_password %}
|
||||
<a href="{% url urls.auth_set_password %}" title="Set Password" class="btn btn-warning">
|
||||
<span class="fas fa-edit fa-fw"></span>
|
||||
<i class="fa-solid fa-pen-to-square"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if urls.auth_reset_password %}
|
||||
<a href="{% url urls.auth_reset_password %}" title="Reset Password" class="btn btn-primary">
|
||||
<span class="fas fa-sync fa-fw"></span>
|
||||
<i class="fa-solid fa-rotate fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if urls.auth_deactivate %}
|
||||
<a href="{% url urls.auth_deactivate %}" title="Deactivate" class="btn btn-danger">
|
||||
<span class="fas fa-times fa-fw"></span>
|
||||
<i class="fa-solid fa-xmark fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% load i18n %}
|
||||
|
||||
<div class="card text-center m-4" style="min-width: 18rem; min-height: 18rem;">
|
||||
<div class="card text-center m-3" style="min-width: 18rem; min-height: 18rem;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{% block title %}{% endblock title %}</h5>
|
||||
|
||||
|
@ -1,57 +1,75 @@
|
||||
{% extends "allianceauth/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "SRP Fleet Create" %}{% endblock page_title %}
|
||||
{% block page_title %}
|
||||
{% translate "SRP Fleet Create" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Ship Replacement Program" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% include 'bundles/jquery-datetimepicker-css.html' %}
|
||||
{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "Create SRP Fleet" %}
|
||||
</h1>
|
||||
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Create SRP Fleet" %}</h1>
|
||||
<div class="card card-primary border-0">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "SRP fleet details" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
<div class="card-body">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
{% if completed == False %}
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
<form role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% translate "Create SRP Fleet" %}</button>
|
||||
|
||||
{% bootstrap_form form %}
|
||||
|
||||
<div class="form-group mt-3 clearfix">
|
||||
{% translate "Create SRP fleet" as button_text %}
|
||||
{% bootstrap_button button_class="btn btn-primary" content=button_text %}
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<div class="alert alert-info" role="alert">{% blocktranslate %}Give this link to the line members{% endblocktranslate %}.</div>
|
||||
<div class="alert alert-info" role="alert">
|
||||
{{ SITE_URL }}{% url 'srp:request' completed_srp_code %}
|
||||
<div class="aa-callout aa-callout-info" role="alert">
|
||||
<p>{% translate "Give this link to the line members." %}</p>
|
||||
<p>{{ SITE_URL }}{% url 'srp:request' completed_srp_code %}</p>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<a href="{% url 'srp:management' %}" class="btn btn-primary btn-lg">{% translate "Continue" %}</a>
|
||||
|
||||
<div class="text-end">
|
||||
<a href="{% url 'srp:management' %}" class="btn btn-primary">{% translate "Continue" %}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$('#id_fleet_time').datetimepicker({
|
||||
setlocale: '{{ LANGUAGE_CODE }}',
|
||||
{% if NIGHT_MODE %}
|
||||
theme: 'dark',
|
||||
{% else %}
|
||||
theme: 'default',
|
||||
{% endif %}
|
||||
mask: true,
|
||||
format: 'Y-m-d H:i',
|
||||
minDate: 0
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -1,12 +1,21 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load humanize %}
|
||||
{% block page_title %}{% translate "Srp Fleet Data" %}{% endblock page_title %}
|
||||
|
||||
{% block page_title %}
|
||||
{% translate "SRP Fleet Data" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Ship Replacement Program" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<h1 class="page-header text-center">{% translate "SRP Fleet Data" %}
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "SRP Fleet Data" %}
|
||||
|
||||
<div class="text-end">
|
||||
{% if perms.auth.srp_management %}
|
||||
{% if fleet_status == "Completed" %}
|
||||
@ -25,62 +34,68 @@
|
||||
{% if srpfleetrequests %}
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
|
||||
<div class="alert alert-info" role="alert">
|
||||
<div class="text-end">
|
||||
<b><span style="padding-right:2.5em">{% translate "Total Losses:" %} {{ srpfleetrequests.count }}</span></b>
|
||||
<b><span style="padding-right:2.5em">{% translate "Total ISK Cost:" %} {{ totalcost | intcomma }}</span></b>
|
||||
|
||||
{% if perms.auth.srp_management %}
|
||||
<button type="submit" title="Approve" class="btn btn-success" formaction="{% url 'srp:request_approve' %}">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
<button type="submit" title="Approve" class="btn btn-success btn-sm m-1" formaction="{% url 'srp:request_approve' %}">
|
||||
<i class="fa-solid fa-thumbs-up"></i>
|
||||
</button>
|
||||
<button type="submit" title="Reject" class="btn btn-warning" formaction="{% url 'srp:request_reject' %}">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
|
||||
<button type="submit" title="Reject" class="btn btn-warning btn-sm m-1" formaction="{% url 'srp:request_reject' %}">
|
||||
<i class="fa-solid fa-thumbs-down"></i>
|
||||
</button>
|
||||
<button type="submit" title="Remove" onclick="return confirm('{% translate "Are you sure you want to delete SRP requests?" %}')" class="btn btn-danger" formaction="{% url 'srp:request_remove' %}">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
|
||||
<button type="submit" title="Remove" onclick="return confirm('{% translate "Are you sure you want to delete SRP requests?" %}')" class="btn btn-danger btn-sm m-1" formaction="{% url 'srp:request_remove' %}">
|
||||
<i class="fa-solid fa-trash-can"></i>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table srplist">
|
||||
<thead>
|
||||
<th class="text-center">{% translate "Pilot Name" %}</th>
|
||||
<th class="text-center">{% translate "Killboard Link" %}</th>
|
||||
<th class="text-center">{% translate "Additional Info" %}</th>
|
||||
<th class="text-center">{% translate "Ship Type" %}</th>
|
||||
<th class="text-center">{% translate "Killboard Loss Amt" %}</th>
|
||||
<th class="text-center">{% translate "SRP ISK Cost" %}
|
||||
<i class="glyphicon glyphicon-question-sign" rel="tooltip" title="{% blocktranslate trimmed %}Click value to edit
|
||||
<th>{% translate "Pilot Name" %}</th>
|
||||
<th>{% translate "Killboard Link" %}</th>
|
||||
<th>{% translate "Additional Info" %}</th>
|
||||
<th>{% translate "Ship Type" %}</th>
|
||||
<th>{% translate "Killboard Loss Amt" %}</th>
|
||||
<th>
|
||||
{% translate "SRP ISK Cost" %}
|
||||
<i class="fa-solid fa-circle-question" rel="tooltip" title="{% blocktranslate trimmed %}Click value to edit
|
||||
Enter to save & next
|
||||
ESC to cancel{% endblocktranslate %}" id="blah"></i></th>
|
||||
<th class="text-center">{% translate "Post Time" %}</th>
|
||||
<th class="text-center">{% translate "Status" %}</th>
|
||||
<th>{% translate "Post Time" %}</th>
|
||||
<th>{% translate "Status" %}</th>
|
||||
{% if perms.auth.srp_management %}
|
||||
<th class="text-center">{% translate "Actions" %}</th>
|
||||
<th>{% translate "Actions" %}</th>
|
||||
{% endif %}
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for srpfleetrequest in srpfleetrequests %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<td>
|
||||
{% if srpfleetrequest.character.alliance.alliance_ticker %}
|
||||
{{ srpfleetrequest.character.alliance.alliance_ticker }}
|
||||
{% endif %}
|
||||
[{{ srpfleetrequest.character.corporation.corporation_ticker }}]
|
||||
{{ srpfleetrequest.character.character_name }} <i class="copy-text-fa-icon far fa-copy" data-clipboard-text="{{ srpfleetrequest.character.character_name }}"></i>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td>
|
||||
<a href="{{ srpfleetrequest.killboard_link }}"
|
||||
target="_blank" class="badge bg-warning">{% translate "Link" %}</a>
|
||||
</td>
|
||||
<td class="text-center">{{ srpfleetrequest.additional_info }}</td>
|
||||
<td class="text-center">{{ srpfleetrequest.srp_ship_name }}</td>
|
||||
<td class="text-center" data-sort="{{ srpfleetrequest.kb_total_loss }}">{{ srpfleetrequest.kb_total_loss | intcomma }} ISK</td>
|
||||
<td class="srp text-center" data-name="srp_total_amount" data-type="number" data-pk="{{srpfleetrequest.id}}" data-url="{% url 'srp:request_update_amount' srpfleetrequest.id %}" data-params="{csrfmiddlewaretoken:'{{csrf_token}}'}" data-sort="{{ srpfleetrequest.srp_total_amount }}">{{ srpfleetrequest.srp_total_amount | intcomma }} ISK</td>
|
||||
<td class="text-center" data-sort="{{ srpfleetrequest.post_time | date:"Y-m-d H:i" }}">{{ srpfleetrequest.post_time | date:"Y-M-d H:i" }}</td>
|
||||
<td class="text-center">
|
||||
<td>{{ srpfleetrequest.additional_info }}</td>
|
||||
<td>{{ srpfleetrequest.srp_ship_name }}</td>
|
||||
<td class="text-end" data-sort="{{ srpfleetrequest.kb_total_loss }}">{{ srpfleetrequest.kb_total_loss | intcomma }} ISK</td>
|
||||
<td class="srp text-end" data-name="srp_total_amount" data-type="number" data-pk="{{srpfleetrequest.id}}" data-url="{% url 'srp:request_update_amount' srpfleetrequest.id %}" data-params="{csrfmiddlewaretoken:'{{csrf_token}}'}" data-sort="{{ srpfleetrequest.srp_total_amount }}">{{ srpfleetrequest.srp_total_amount | intcomma }} ISK</td>
|
||||
<td data-sort="{{ srpfleetrequest.post_time | date:"Y-m-d H:i" }}">{{ srpfleetrequest.post_time | date:"Y-M-d H:i" }}</td>
|
||||
<td>
|
||||
{% if srpfleetrequest.srp_status == "Approved" %}
|
||||
<div class="badge bg-success">
|
||||
{% translate "Approved" %}
|
||||
@ -96,7 +111,7 @@ ESC to cancel{% endblocktranslate %}" id="blah"></i></th>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if perms.auth.srp_management %}
|
||||
<td class="text-center">
|
||||
<td class="text-end">
|
||||
<div class="checkbox">
|
||||
<label style="font-size: 1.5em">
|
||||
<input type="checkbox" name="{{srpfleetrequest.id}}">
|
||||
@ -108,22 +123,25 @@ ESC to cancel{% endblocktranslate %}" id="blah"></i></th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-info" role="alert">
|
||||
<div class="text-end">
|
||||
<b><span style="padding-right:2.5em">{% translate "Total Losses:" %} {{ srpfleetrequests.count }}</span></b>
|
||||
<b><span style="padding-right:2.5em">{% translate "Total ISK Cost:" %} {{ totalcost | intcomma }}</span></b>
|
||||
|
||||
{% if perms.auth.srp_management %}
|
||||
<button type="submit" title="Approve" class="btn btn-success" formaction="{% url 'srp:request_approve' %}">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
<button type="submit" title="Approve" class="btn btn-success btn-sm m-1" formaction="{% url 'srp:request_approve' %}">
|
||||
<i class="fa-solid fa-thumbs-up"></i>
|
||||
</button>
|
||||
<button type="submit" title="Reject" class="btn btn-warning" formaction="{% url 'srp:request_reject' %}">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
|
||||
<button type="submit" title="Reject" class="btn btn-warning btn-sm m-1" formaction="{% url 'srp:request_reject' %}">
|
||||
<i class="fa-solid fa-thumbs-down"></i>
|
||||
</button>
|
||||
<button type="submit" title="Remove" onclick="return confirm('{% translate "Are you sure you want to delete SRP requests?" %}')" class="btn btn-danger" formaction="{% url 'srp:request_remove' %}">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
|
||||
<button type="submit" title="Remove" onclick="return confirm('{% translate "Are you sure you want to delete SRP requests?" %}')" class="btn btn-danger btn-sm m-1" formaction="{% url 'srp:request_remove' %}">
|
||||
<i class="fa-solid fa-trash-can"></i>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
@ -135,7 +153,6 @@ ESC to cancel{% endblocktranslate %}" id="blah"></i></th>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
@ -146,7 +163,8 @@ ESC to cancel{% endblocktranslate %}" id="blah"></i></th>
|
||||
|
||||
<script>
|
||||
const clipboard = new ClipboardJS('.copy-text-fa-icon');
|
||||
clipboard.on('success', function (e) {
|
||||
|
||||
clipboard.on('success', (e) => {
|
||||
console.info('Action:', e.action);
|
||||
console.info('Text:', e.text);
|
||||
console.info('Trigger:', e.trigger);
|
||||
@ -154,45 +172,45 @@ ESC to cancel{% endblocktranslate %}" id="blah"></i></th>
|
||||
e.clearSelection();
|
||||
});
|
||||
|
||||
clipboard.on('error', function (e) {
|
||||
clipboard.on('error', (e) => {
|
||||
console.error('Action:', e.action);
|
||||
console.error('Trigger:', e.trigger);
|
||||
});
|
||||
</script>
|
||||
{% endblock extra_javascript %}
|
||||
|
||||
{% block extra_script %}
|
||||
$(document).ready(function() {
|
||||
$(document).ready(() => {
|
||||
const elementEditableSrpAmount = $('.srp');
|
||||
const elementTableSrpList = $('table.srplist');
|
||||
|
||||
$.fn.editable.defaults.mode = 'inline';
|
||||
$.fn.editable.defaults.showbuttons = false;
|
||||
$.fn.editable.defaults.highlight = "#AAFF80";
|
||||
$.fn.editable.defaults.highlight = "rgb(170 255 128)";
|
||||
|
||||
$.fn.dataTable.moment = function(format, locale) {
|
||||
let types = $.fn.dataTable.ext.type;
|
||||
$.fn.dataTable.moment = (format, locale) => {
|
||||
const types = $.fn.dataTable.ext.type;
|
||||
|
||||
// Add type detection
|
||||
types.detect.unshift(function(d) {
|
||||
types.detect.unshift((d) => {
|
||||
return moment(d, format, locale, true).isValid() ?
|
||||
'moment-' + format :
|
||||
null;
|
||||
});
|
||||
|
||||
// Add sorting method - use an integer for the sorting
|
||||
types.order[ 'moment-' + format+'-pre' ] = function(d) {
|
||||
types.order[ 'moment-' + format+'-pre' ] = (d) => {
|
||||
return moment(d, format, locale, true).unix();
|
||||
};
|
||||
};
|
||||
$.fn.dataTable.moment('YYYY-MMM-D, HH:mm');
|
||||
|
||||
$('.srp').editable({
|
||||
display: function(value, response) {
|
||||
elementEditableSrpAmount.editable({
|
||||
display: (value, response) => {
|
||||
return false;
|
||||
},
|
||||
success: function(response, newValue) {
|
||||
newValue = parseInt(newValue);
|
||||
let newValueOutput = newValue.toLocaleString() + " ISK";
|
||||
const newValueOutput = `${newValue.toLocaleString()} ISK`;
|
||||
|
||||
$(this).html(newValueOutput.bold());
|
||||
$(this).html(`<b>${newValueOutput}</b>`);
|
||||
},
|
||||
validate: function(value) {
|
||||
if (value === null || value === '') {
|
||||
@ -201,17 +219,17 @@ ESC to cancel{% endblocktranslate %}" id="blah"></i></th>
|
||||
}
|
||||
});
|
||||
|
||||
$('.srp').on('hidden', function(e, reason){
|
||||
if(reason === 'save' || reason === 'nochange') {
|
||||
let $next = $(this).closest('tr').next().find('.editable');
|
||||
elementEditableSrpAmount.on('hidden', function(e, reason) {
|
||||
if (reason === 'save' || reason === 'nochange') {
|
||||
const next_editable_element = $(this).closest('tr').next().find('.editable');
|
||||
|
||||
setTimeout(function() {
|
||||
$next.editable('show');
|
||||
setTimeout(() => {
|
||||
next_editable_element.editable('show');
|
||||
}, 400);
|
||||
}
|
||||
});
|
||||
|
||||
$('table.srplist').DataTable({
|
||||
elementTableSrpList.DataTable({
|
||||
"order": [[ 6, "asc" ]],
|
||||
"paging": false,
|
||||
"columnDefs": [
|
||||
@ -231,12 +249,14 @@ ESC to cancel{% endblocktranslate %}" id="blah"></i></th>
|
||||
// tooltip
|
||||
$("[rel=tooltip]").tooltip({ placement: 'top'});
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
</script>
|
||||
{% endblock extra_javascript %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% include "bundles/datatables-css-bs5.html" %}
|
||||
{% include "bundles/x-editable.css.html" %}
|
||||
{% include "bundles/checkbox-css.html" %}
|
||||
|
||||
<style>
|
||||
.copy-text-fa-icon:hover {
|
||||
cursor: pointer;
|
||||
|
@ -1,68 +1,74 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load humanize %}
|
||||
|
||||
{% block page_title %}{% translate "Srp Management" %}{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
{% block page_title %}
|
||||
{% translate "SRP Management" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Ship Replacement Program" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<h1 class="page-header text-center">{% translate "SRP Management" %}
|
||||
<div class="text-end">
|
||||
<div>
|
||||
<div class="text-end mb-3">
|
||||
{% if perms.auth.srp_management %}
|
||||
<a href="{% url 'srp:all' %}" class="btn btn-primary">
|
||||
{% translate "View All" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.srp.add_srpfleetmain or perms.auth.srp_management %}
|
||||
<a href="{% url 'srp:add' %}" class="btn btn-success">
|
||||
{% translate "Add SRP Fleet" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</h1>
|
||||
|
||||
<div class="alert alert-info" role="alert">
|
||||
<div class="text-end">
|
||||
<b>{% translate "Total ISK Cost:" %} {{ totalcost | intcomma }}</b>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if srpfleets %}
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% translate "Fleet Name" %}</th>
|
||||
<th class="text-center">{% translate "Fleet Time" %}</th>
|
||||
<th class="text-center">{% translate "Fleet Doctrine" %}</th>
|
||||
<th class="text-center">{% translate "Fleet Commander" %}</th>
|
||||
<th class="text-center">{% translate "Fleet AAR" %}</th>
|
||||
<th class="text-center">{% translate "Fleet SRP Code" %}</th>
|
||||
<th class="text-center">{% translate "Fleet ISK Cost" %}</th>
|
||||
<th class="text-center">{% translate "SRP Status" %}</th>
|
||||
<th class="text-center">{% translate "Pending Requests" %}</th>
|
||||
<th class="text-center" style="width: 100px;">{% translate "Actions" %}</th>
|
||||
<th>{% translate "Fleet Name" %}</th>
|
||||
<th>{% translate "Fleet Time" %}</th>
|
||||
<th>{% translate "Fleet Doctrine" %}</th>
|
||||
<th>{% translate "Fleet Commander" %}</th>
|
||||
<th>{% translate "Fleet AAR" %}</th>
|
||||
<th>{% translate "Fleet SRP Code" %}</th>
|
||||
<th>{% translate "Fleet ISK Cost" %}</th>
|
||||
<th>{% translate "SRP Status" %}</th>
|
||||
<th>{% translate "Pending Requests" %}</th>
|
||||
<th style="width: 110px;">{% translate "Actions" %}</th>
|
||||
</tr>
|
||||
|
||||
{% for srpfleet in srpfleets %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<td>
|
||||
<div class="badge bg-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">
|
||||
<td>{{ srpfleet.fleet_time | date:"Y-m-d H:i" }}</td>
|
||||
<td>{{ srpfleet.fleet_doctrine }}</td>
|
||||
<td>
|
||||
<div class="badge bg-success">
|
||||
{{ srpfleet.fleet_commander.character_name }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td>
|
||||
{% if srpfleet.fleet_srp_aar_link %}
|
||||
<a href="{{ srpfleet.fleet_srp_aar_link }}" target="_blank" class="badge bg-primary">{% translate "Link" %}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td>
|
||||
{% if srpfleet.fleet_srp_code %}
|
||||
<a class="badge bg-warning" href="{% url 'srp:request' srpfleet.fleet_srp_code %}">{{ srpfleet.fleet_srp_code }}</a>
|
||||
{% else %}
|
||||
@ -71,9 +77,9 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">ISK: {{ srpfleet.total_cost | intcomma }}</td>
|
||||
<td class="text-end">{{ srpfleet.total_cost | intcomma }} ISK</td>
|
||||
|
||||
<td class="text-center">
|
||||
<td>
|
||||
{% if srpfleet.fleet_srp_status == "" %}
|
||||
<div class="badge bg-warning">
|
||||
{% translate "Pending" %}
|
||||
@ -84,33 +90,32 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td>
|
||||
<div class="badge bg-warning">{{ srpfleet.pending_requests }}</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
|
||||
<a href="{% url 'srp:fleet' srpfleet.id %}" class="btn btn-primary" title="View">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
<td class="text-end">
|
||||
<a href="{% url 'srp:fleet' srpfleet.id %}" class="btn btn-primary btn-sm m-1" title="View">
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
|
||||
{% if perms.auth.srp_management %}
|
||||
<a href="{% url 'srp:edit' srpfleet.id %}" class="btn btn-info" title="Edit">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
<a href="{% url 'srp:edit' srpfleet.id %}" class="btn btn-info btn-sm m-1" title="Edit">
|
||||
<i class="fa-solid fa-pen-to-square fa-fw"></i>
|
||||
</a>
|
||||
|
||||
<a href="{% url 'srp:remove' srpfleet.id %}" onclick="return confirm('{% translate "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 href="{% url 'srp:remove' srpfleet.id %}" onclick="return confirm('{% translate "Are you sure you want to delete this SRP code and its contents?" %}')" class="btn btn-danger btn-sm m-1" title="Remove">
|
||||
<i class="fa-solid fa-trash-can fa-fw"></i>
|
||||
</a>
|
||||
|
||||
{% if srpfleet.fleet_srp_code %}
|
||||
<a href="{% url 'srp:disable' srpfleet.id %}" class="btn btn-warning" title="Disable">
|
||||
<span class="glyphicon glyphicon-remove-sign"></span>
|
||||
<a href="{% url 'srp:disable' srpfleet.id %}" class="btn btn-warning btn-sm m-1" title="Disable">
|
||||
<i class="fa-solid fa-ban fa-fw"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'srp:enable' srpfleet.id %}" class="btn btn-success" title="Enable">
|
||||
<span class="glyphicon glyphicon-ok-sign"></span>
|
||||
<a href="{% url 'srp:enable' srpfleet.id %}" class="btn btn-success btn-sm m-1" title="Enable">
|
||||
<i class="fa-solid fa-check fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@ -123,6 +128,4 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
@ -1,28 +1,45 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
{% load bootstrap %}
|
||||
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "SRP Request" %}{% endblock page_title %}
|
||||
{% block page_title %}
|
||||
{% translate "SRP Request" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Ship Replacement Program" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "Create SRP Request" %}
|
||||
</h1>
|
||||
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Create SRP Request" %}</h1>
|
||||
<div class="card card-primary border-0">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "Your SRP request" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<div class="card-body">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<form role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% translate "Create SRP Request" %}
|
||||
</button>
|
||||
|
||||
{% bootstrap_form form %}
|
||||
|
||||
<div class="form-group mt-3 clearfix">
|
||||
{% translate "Create SRP request" as button_text %}
|
||||
{% bootstrap_button button_class="btn btn-primary" content=button_text %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@ -1,31 +1,51 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
{% load bootstrap %}
|
||||
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}{% translate "Update AAR Link" %}{% endblock page_title %}
|
||||
{% block page_title %}
|
||||
{% translate "Update AAR Link" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Ship Replacement Program" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% translate "Update AAR Link" %}
|
||||
</h1>
|
||||
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Update AAR Link" %}</h1>
|
||||
<div class="card card-primary border-0">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "After Action Report" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
<div class="card-body">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
{% if no_fleet_id %}
|
||||
<div class="alert alert-danger" role="alert">{% translate "SRP Fleet Does Not Exist" %}</div>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{% translate "SRP Fleet Does Not Exist" %}
|
||||
</div>
|
||||
{% else %}
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
<form role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% translate "Update AAR Link" %}
|
||||
</button>
|
||||
|
||||
{% bootstrap_form form %}
|
||||
|
||||
<div class="form-group mt-3 clearfix">
|
||||
{% translate "Update AAR link" as button_text %}
|
||||
{% bootstrap_button button_class="btn btn-primary" content=button_text %}
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@ -1,20 +1,22 @@
|
||||
$(document).ready(function () {
|
||||
$(document).ready(() => {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* render a JS clock for Eve Time
|
||||
* Render the current EVE time in the top menu bar
|
||||
* @param element
|
||||
*/
|
||||
const renderClock = function (element) {
|
||||
const renderClock = (element) => {
|
||||
const datetimeNow = new Date();
|
||||
const h = String(datetimeNow.getUTCHours()).padStart(2, '0');
|
||||
const m = String(datetimeNow.getUTCMinutes()).padStart(2, '0');
|
||||
|
||||
element.html(h + ':' + m);
|
||||
element.html(`${h}:${m}`);
|
||||
};
|
||||
|
||||
// Start the Eve time clock in the top menu bar
|
||||
setInterval(function () {
|
||||
/**
|
||||
* Start the Eve time clock in the top menu bar
|
||||
*/
|
||||
setInterval(() => {
|
||||
renderClock($('.eve-time-wrapper .eve-time-clock'));
|
||||
}, 500);
|
||||
});
|
||||
|
@ -5,21 +5,21 @@
|
||||
* on a regular basis so to keep the user apprised about newly arrived
|
||||
* notifications without having to reload the page.
|
||||
*
|
||||
* The refresh rate can be changes via the Django setting NOTIFICATIONS_REFRESH_TIME.
|
||||
* The refresh rate can be changed via the Django setting NOTIFICATIONS_REFRESH_TIME.
|
||||
* See documentation for details.
|
||||
*/
|
||||
$(() => {
|
||||
'use strict';
|
||||
|
||||
const notificationsRefreshTime = notificationUpdateSettings.refreshTime;
|
||||
const userNotificationsCountViewUrl = notificationUpdateSettings.userNotificationsCountViewUrl;
|
||||
const notificationRefreshTime = notificationUpdateSettings.refreshTime;
|
||||
const userNotificationCountViewUrl = notificationUpdateSettings.userNotificationsCountViewUrl;
|
||||
const elementNotificationIcon = $('#menu_item_notifications .fa-bell');
|
||||
|
||||
/**
|
||||
* Update the notification icon in the top menu
|
||||
*/
|
||||
const updateNotificationIcon = () => {
|
||||
fetch(userNotificationsCountViewUrl)
|
||||
fetch(userNotificationCountViewUrl)
|
||||
.then((response) => {
|
||||
if (response.ok) {
|
||||
return response.json();
|
||||
@ -47,9 +47,9 @@ $(() => {
|
||||
* Activate automatic refresh every x seconds
|
||||
*/
|
||||
const activateIconUpdate = () => {
|
||||
if (notificationsRefreshTime > 0) {
|
||||
if (notificationRefreshTime > 0) {
|
||||
myInterval = setInterval(
|
||||
updateNotificationIcon, notificationsRefreshTime * 1000
|
||||
updateNotificationIcon, notificationRefreshTime * 1000
|
||||
);
|
||||
}
|
||||
};
|
||||
@ -58,7 +58,7 @@ $(() => {
|
||||
* Deactivate automatic refresh
|
||||
*/
|
||||
const deactivateIconUpdate = () => {
|
||||
if ((notificationsRefreshTime > 0) && (typeof myInterval !== 'undefined')) {
|
||||
if ((notificationRefreshTime > 0) && (typeof myInterval !== 'undefined')) {
|
||||
clearInterval(myInterval);
|
||||
}
|
||||
};
|
||||
|
@ -1,37 +1,39 @@
|
||||
/* global notificationUPdateSettings */
|
||||
/* global notificationUPdateSettings, xhr */
|
||||
|
||||
/*
|
||||
This script refreshed the unread notification count in the top menu
|
||||
on a regular basis so to keep the user apprised about newly arrived
|
||||
notifications without having to reload the page.
|
||||
|
||||
The refresh rate can be changes via the Django setting NOTIFICATIONS_REFRESH_TIME.
|
||||
See documentation for details.
|
||||
*/
|
||||
$(function () {
|
||||
/**
|
||||
* This script refreshed the unread notification count in the top menu
|
||||
* on a regular basis so to keep the user apprized about newly arrived
|
||||
* notifications without having to reload the page.
|
||||
*
|
||||
* The refresh rate can be changed via the Django setting NOTIFICATIONS_REFRESH_TIME.
|
||||
* See documentation for details.
|
||||
*/
|
||||
$(document).ready(() => {
|
||||
'use strict';
|
||||
|
||||
let notificationsListViewUrl = notificationUPdateSettings.notificationsListViewUrl;
|
||||
let notificationsRefreshTime = notificationUPdateSettings.notificationsRefreshTime;
|
||||
let userNotificationsCountViewUrl = notificationUPdateSettings.userNotificationsCountViewUrl;
|
||||
const notificationListViewUrl = notificationUPdateSettings.notificationsListViewUrl;
|
||||
const notificationRefreshTime = notificationUPdateSettings.notificationsRefreshTime;
|
||||
const userNotificationCountViewUrl = notificationUPdateSettings.userNotificationsCountViewUrl;
|
||||
|
||||
// update the notification unread count in the top menu
|
||||
let updateNotifications = function () {
|
||||
$.getJSON(userNotificationsCountViewUrl, function (data, status) {
|
||||
/**
|
||||
* Update the notification item in the top menu with the current unread count
|
||||
*/
|
||||
const updateNotifications = () => {
|
||||
$.getJSON(userNotificationCountViewUrl, (data, status) => {
|
||||
if (status === 'success') {
|
||||
let innerHtml = '';
|
||||
let unreadCount = data.unread_count;
|
||||
let innerHtml;
|
||||
const unreadCount = data.unread_count;
|
||||
|
||||
if (unreadCount > 0) {
|
||||
innerHtml = (
|
||||
`Notifications <span class="badge">${unreadCount}</span>`
|
||||
);
|
||||
} else {
|
||||
innerHtml = '<i class="far fa-bell"></i>';
|
||||
innerHtml = '<i class="fa-solid fa-bell"></i>';
|
||||
}
|
||||
|
||||
$('#menu_item_notifications').html(
|
||||
`<a href="${notificationsListViewUrl}">${innerHtml}</a>`
|
||||
`<a href="${notificationListViewUrl}">${innerHtml}</a>`
|
||||
);
|
||||
} else {
|
||||
console.error(
|
||||
@ -43,32 +45,41 @@ $(function () {
|
||||
|
||||
let myInterval;
|
||||
|
||||
// activate automatic refreshing every x seconds
|
||||
let activateRefreshing = function () {
|
||||
if (notificationsRefreshTime > 0) {
|
||||
/**
|
||||
* Activate automatic refreshing of notifications
|
||||
*/
|
||||
const activateRefreshing = () => {
|
||||
if (notificationRefreshTime > 0) {
|
||||
myInterval = setInterval(
|
||||
updateNotifications, notificationsRefreshTime * 1000
|
||||
updateNotifications, notificationRefreshTime * 1000
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
// deactivate automatic refreshing
|
||||
let deactivateRefreshing = function () {
|
||||
if ((notificationsRefreshTime > 0) && (typeof myInterval !== 'undefined')) {
|
||||
/**
|
||||
* Deactivate automatic refreshing of notifications
|
||||
*/
|
||||
const deactivateRefreshing = () => {
|
||||
if ((notificationRefreshTime > 0) && (typeof myInterval !== 'undefined')) {
|
||||
clearInterval(myInterval);
|
||||
}
|
||||
};
|
||||
|
||||
// refreshing only happens on active browser tab
|
||||
/**
|
||||
* Activate refreshing when the browser tab is active
|
||||
* and deactivate it when it is not
|
||||
*/
|
||||
$(document).on({
|
||||
'show': function () {
|
||||
'show': () => {
|
||||
activateRefreshing();
|
||||
},
|
||||
'hide': function () {
|
||||
'hide': () => {
|
||||
deactivateRefreshing();
|
||||
}
|
||||
});
|
||||
|
||||
// Initial start of refreshing on script loading
|
||||
/**
|
||||
* Initial start of refreshing on script loading
|
||||
*/
|
||||
activateRefreshing();
|
||||
});
|
||||
|
@ -7,24 +7,24 @@
|
||||
* @param duration
|
||||
* @returns {string}
|
||||
*/
|
||||
let getDurationString = function (duration) {
|
||||
const getDurationString = (duration) => { // eslint-disable-line no-unused-vars
|
||||
'use strict';
|
||||
|
||||
let out = '';
|
||||
|
||||
if (duration.years()) {
|
||||
out += duration.years() + 'y ';
|
||||
out += `${duration.years()}y `;
|
||||
}
|
||||
|
||||
if (duration.months()) {
|
||||
out += duration.months() + 'm ';
|
||||
out += `${duration.months()}m `;
|
||||
}
|
||||
|
||||
if (duration.days()) {
|
||||
out += duration.days() + 'd ';
|
||||
out += `${duration.days()}d `;
|
||||
}
|
||||
|
||||
return out + duration.hours() + 'h ' + duration.minutes() + 'm ' + duration.seconds() + 's';
|
||||
return `${out + duration.hours()}h ${duration.minutes()}m ${duration.seconds()}s`;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -32,11 +32,11 @@ let getDurationString = function (duration) {
|
||||
*
|
||||
* condition:
|
||||
* only if moment.js is loaded before,
|
||||
* if not this function returns an empty string to avoid JS errors from happening.
|
||||
* if not, this function returns an empty string to avoid JS errors from happening.
|
||||
*
|
||||
* @returns {string}
|
||||
*/
|
||||
let getCurrentEveTimeString = function () {
|
||||
const getCurrentEveTimeString = () => { // eslint-disable-line no-unused-vars
|
||||
'use strict';
|
||||
|
||||
let returnValue = '';
|
||||
|
@ -51,7 +51,7 @@
|
||||
<div class="container-fluid justify-content-start">
|
||||
{% if user.is_authenticated %}
|
||||
<a class="navbar-brand" data-bs-toggle="collapse" data-bs-target="#sidebar" role="button">
|
||||
<i class="fas fa-solid fa-bars ms-2 me-2"></i>
|
||||
<i class="fa-solid fa-bars ms-2 me-2"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
@ -74,7 +74,7 @@
|
||||
</div>
|
||||
|
||||
<a class="navbar-toggler navbar-brand border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#navbarexpand" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation" style="margin-left: auto;">
|
||||
<i class="fas fa-solid fa-chevron-up"></i>
|
||||
<i class="fa-solid fa-chevron-up"></i>
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
@ -1,10 +1,13 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% block page_title %}
|
||||
{{ error_title }}
|
||||
{{ error_title }}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{{ error_title }}</h1>
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center mb-3">{{ error_title }}</h1>
|
||||
|
||||
<div class="text-center">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@ -22,6 +25,7 @@
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<p class="text-center">{{ error_message }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@ -7,6 +7,7 @@
|
||||
<link rel="manifest" href="{% static 'allianceauth/icons/site.webmanifest' %}">
|
||||
<link rel="mask-icon" href="{% static 'allianceauth/icons/safari-pinned-tab.svg' %}" color="#5bbad5">
|
||||
<link rel="shortcut icon" type="image/png" href="{% static 'allianceauth/icons/favicon.ico' %}">
|
||||
|
||||
<meta name="msapplication-TileColor" content="#2d89ef">
|
||||
<meta name="msapplication-config" content="{% static 'allianceauth/icons/browserconfig.xml' %}">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
@ -1,17 +1,17 @@
|
||||
{% if messages %}
|
||||
<br>
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-{{ message.level_tag }} alert-dismissible d-flex align-items-center fade show" role="alert">
|
||||
{% load i18n %}
|
||||
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-{{ message.level_tag }} alert-dismissible d-flex fade show" role="alert">
|
||||
<div>
|
||||
{% if message.level_tag == "info" %}
|
||||
<i class="fas fa-info-circle"></i>
|
||||
<i class="fa-solid fa-info-circle fa-xl"></i>
|
||||
{% elif message.level_tag == "success" %}
|
||||
<i class="fas fa-check-circle"></i>
|
||||
<i class="fa-solid fa-check-circle fa-xl"></i>
|
||||
{% elif message.level_tag == "warning" %}
|
||||
<i class="fas fa-exclamation-circle"></i>
|
||||
<i class="fa-solid fa-exclamation-circle fa-xl"></i>
|
||||
{% elif "danger" in message.level_tag %}
|
||||
<i class="fas fa-exclamation-triangle"></i>
|
||||
<i class="fa-solid fa-exclamation-triangle fa-xl"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
{{ message }}
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="{% translate 'Close' %}"></button>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
@ -1,20 +1,21 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% if messages %}
|
||||
<br>
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-{{ message.level_tag }} alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{% translate 'Close' %}">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
|
||||
<div class="message-icon pull-left" style="margin-right: 0.5rem;">
|
||||
{% if message.level_tag == "info" %}
|
||||
<i class="fas fa-info-circle"></i>
|
||||
<i class="fa-solid fa-info-circle"></i>
|
||||
{% elif message.level_tag == "success" %}
|
||||
<i class="fas fa-check-circle"></i>
|
||||
<i class="fa-solid fa-check-circle"></i>
|
||||
{% elif message.level_tag == "warning" %}
|
||||
<i class="fas fa-exclamation-circle"></i>
|
||||
<i class="fa-solid fa-exclamation-circle"></i>
|
||||
{% elif "danger" in message.level_tag %}
|
||||
<i class="fas fa-exclamation-triangle"></i>
|
||||
<i class="fa-solid fa-exclamation-triangle"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<li>
|
||||
<a href="{% url 'nightmode' %}?next={{ request.path|urlencode }}">
|
||||
<i class="fas {% if NIGHT_MODE %}fa-toggle-on{% else %}fa-toggle-off{% endif %}" aria-hidden="true"></i>
|
||||
<i class="fa-solid {% if NIGHT_MODE %}fa-toggle-on{% else %}fa-toggle-off{% endif %}" aria-hidden="true"></i>
|
||||
{% translate "Night Mode" %}
|
||||
</a>
|
||||
</li>
|
||||
|
@ -8,7 +8,7 @@
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'notifications:list' %}">
|
||||
<i class="far fa-bell"></i>
|
||||
<i class="fa-solid fa-bell"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
@ -7,12 +7,12 @@
|
||||
<ul class="nav nav-pills nav-stacked gray-icon-color" id="side-menu">
|
||||
<li>
|
||||
<a class="{% navactive request 'authentication:dashboard' %}" href="{% url 'authentication:dashboard' %}">
|
||||
<i class="fas fa-tachometer-alt fa-fw"></i> {% translate "Dashboard" %}
|
||||
<i class="fa-solid fa-gauge-high fa-fw"></i> {% translate "Dashboard" %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="{% navactive request 'groupmanagement:groups' %}" href="{% url 'groupmanagement:groups' %}">
|
||||
<i class="fas fa-users fa-fw"></i> {% translate "Groups" %}
|
||||
<i class="fa-solid fa-users fa-fw"></i> {% translate "Groups" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
{% if user.is_staff %}
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="{% url 'admin:index' %}" target="_blank" rel="noopener noreferer">
|
||||
<i class="fas fa-user-shield"></i>
|
||||
<i class="fa-solid fa-user-shield fa-fw"></i>
|
||||
{% translate "Admin" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@ -15,14 +15,14 @@
|
||||
<li role="separator" class="divider"></li>
|
||||
<li>
|
||||
<a href="https://allianceauth.readthedocs.io/" target="_blank" rel="noopener noreferer">
|
||||
<i class="fas fa-question-circle fa-fw"></i>
|
||||
<i class="fa-solid fa-question-circle fa-fw"></i>
|
||||
{% translate "AA Documentation" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="https://discord.gg/fjnHAmk" target="_blank" rel="noopener noreferer">
|
||||
<i class="fab fa-discord fa-fw"></i>
|
||||
<i class="fa-brands fa-discord fa-fw"></i>
|
||||
{% translate "AA Support Discord" %}
|
||||
</a>
|
||||
</li>
|
||||
|
@ -1,8 +1,14 @@
|
||||
{% load i18n %}
|
||||
|
||||
<li class="nav-item active">
|
||||
<a href="{% url 'authentication:add_character' %}" class="nav-link" title="{% translate 'Add Character' %}"><i class="fas fa-plus"></i><span class="d-lg-none d-md-inline m-2">{% translate "Add Character" %}</span></a>
|
||||
<a href="{% url 'authentication:add_character' %}" class="nav-link" title="{% translate 'Add Character' %}">
|
||||
<i class="fa-solid fa-plus"></i>
|
||||
<span class="d-lg-none d-md-inline m-2">{% translate "Add Character" %}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{% url 'authentication:change_main_character' %}" class="nav-link" title="{% translate 'Change Main' %}"><i class="fas fa-random"></i><span class="d-lg-none d-md-inline m-2">{% translate "Change Main" %}</span></a>
|
||||
<a href="{% url 'authentication:change_main_character' %}" class="nav-link" title="{% translate 'Change Main' %}">
|
||||
<i class="fa-solid fa-shuffle"></i>
|
||||
<span class="d-lg-none d-md-inline m-2">{% translate "Change Main" %}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -58,7 +58,7 @@
|
||||
{% if user.is_authenticated %}
|
||||
<li>
|
||||
<a href="{% url 'authentication:token_management' %}">
|
||||
<i class="fas fa-user-lock"></i>
|
||||
<i class="fa-solid fa-user-lock"></i>
|
||||
{% translate "Token Management" %}
|
||||
</a>
|
||||
</li>
|
||||
|
4
allianceauth/templates/bundles/bootstrap-css-bs5.html
Normal file
4
allianceauth/templates/bundles/bootstrap-css-bs5.html
Normal file
@ -0,0 +1,4 @@
|
||||
{% load static %}
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||
<!-- End Bootstrap CSS -->
|
4
allianceauth/templates/bundles/bootstrap-js-bs5.html
Normal file
4
allianceauth/templates/bundles/bootstrap-js-bs5.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!-- Start Bootstrap + jQuery js from cdnjs -->
|
||||
{#<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>#}
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<!-- End Bootstrap + jQuery js from cdnjs -->
|
@ -1,7 +1,7 @@
|
||||
{% load i18n %}
|
||||
{% load evelinks %}
|
||||
|
||||
<div class="col-12 col-l-6 align-self-stretch p-2">
|
||||
<div class="col-12 align-self-stretch py-2">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title text-center">{% translate "Upcoming Timers" %}</h4>
|
||||
@ -17,6 +17,7 @@
|
||||
<th class="text-center">{% translate "Eve Time" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for timer in timers %}
|
||||
<tr>
|
||||
@ -48,7 +49,6 @@
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-center" nowrap>{{ timer.eve_time | date:"Y-m-d H:i" }}</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
@ -1,50 +1,64 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
{% load bootstrap %}
|
||||
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Structure Timers" %}
|
||||
{% 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">
|
||||
{% block page_header %}
|
||||
{% endblock page_header %}
|
||||
{% include "timerboard/index_button.html" %}
|
||||
</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
<form id="add-timer-form" class="form-signin" role="form" action="" method="POST">
|
||||
|
||||
<div class="card card-primary border-0">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "Structure Timer Details" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<form id="add-timer-form" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">
|
||||
|
||||
{% bootstrap_form form %}
|
||||
|
||||
<div class="form-group mt-3 clearfix">
|
||||
<button class="btn btn-primary" type="submit">
|
||||
{% block submit_button_text %}
|
||||
{% endblock submit_button_text %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% endblock %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
|
||||
{% block extra_script %}
|
||||
$('#id_start').datetimepicker({
|
||||
setlocale: '{{ LANGUAGE_CODE }}',
|
||||
{% if NIGHT_MODE %}
|
||||
theme: 'dark',
|
||||
{% else %}
|
||||
theme: 'default',
|
||||
{% endif %}
|
||||
mask: true,
|
||||
format: 'Y-m-d H:i',
|
||||
minDate: 0
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$('#id_start').datetimepicker({
|
||||
setlocale: '{{ LANGUAGE_CODE }}',
|
||||
mask: true,
|
||||
format: 'Y-m-d H:i',
|
||||
minDate: 0
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -1,4 +1,5 @@
|
||||
{% load i18n %}
|
||||
|
||||
<div class="text-end">
|
||||
<a href="{% url 'timerboard:view' %}" class="btn btn-default">{% translate "Back" %}</a>
|
||||
<a href="{% url 'timerboard:view' %}" class="btn btn-secondary">{% translate "Back" %}</a>
|
||||
</div>
|
||||
|
@ -1,22 +1,30 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
{% translate "Delete Timer" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Structure Timers" %}
|
||||
{% 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">
|
||||
{% translate "Delete Timer" %}
|
||||
{% include "timerboard/index_button.html" %}
|
||||
</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-2 col-md-offset-5">
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-2">
|
||||
<div class="row">
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
<p>{% blocktranslate %}Are you sure you want to delete timer "{{ object }}"?{% endblocktranslate %}</p>
|
||||
|
||||
<input class="btn btn-danger btn-block" type="submit" value="Confirm">
|
||||
</form>
|
||||
</div>
|
||||
|
@ -14,17 +14,18 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/timerboard-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-css.html' %}
|
||||
{% endblock %}
|
||||
{% include 'bundles/timerboard-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-css.html' %}
|
||||
|
||||
{% block extra_script %}
|
||||
$('input#id_absolute_time').datetimepicker({
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$('input#id_absolute_time').datetimepicker({
|
||||
setlocale: '{{ LANGUAGE_CODE }}',
|
||||
theme: {% if NIGHT_MODE %}'dark'{% else %}'default'{% endif %},
|
||||
format: 'Y-m-d H:i',
|
||||
minDate: 0,
|
||||
defaultDate: null
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -14,21 +14,18 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/timerboard-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-css.html' %}
|
||||
{% endblock %}
|
||||
{% include 'bundles/timerboard-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-css.html' %}
|
||||
|
||||
{% block extra_script %}
|
||||
$('input#id_absolute_time').datetimepicker({
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$('input#id_absolute_time').datetimepicker({
|
||||
setlocale: '{{ LANGUAGE_CODE }}',
|
||||
{% if NIGHT_MODE %}
|
||||
theme: 'dark',
|
||||
{% else %}
|
||||
theme: 'default',
|
||||
{% endif %}
|
||||
mask: true,
|
||||
format: 'Y-m-d H:i',
|
||||
defaultDate: null
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
203
allianceauth/timerboard/templates/timerboard/timertable.html
Normal file
203
allianceauth/timerboard/templates/timerboard/timertable.html
Normal file
@ -0,0 +1,203 @@
|
||||
{% load evelinks %}
|
||||
{% load i18n %}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th class="text-center">{% translate "Details" %}</th>
|
||||
<th class="text-center">{% translate "Objective" %}</th>
|
||||
<th class="text-center">{% translate "System" %}</th>
|
||||
<th class="text-center">{% translate "Structure" %}</th>
|
||||
<th class="text-center">{% translate "Eve Time" %}</th>
|
||||
<th class="text-center">{% translate "Local Time" %}</th>
|
||||
<th class="text-center">{% translate "Creator" %}</th>
|
||||
|
||||
{% if perms.auth.timer_management %}
|
||||
<th class="text-center">{% translate "Action" %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
|
||||
{% for timer in timers %}
|
||||
{% if timer.important == True %}
|
||||
<tr class="danger">
|
||||
{% else %}
|
||||
<tr class="info">
|
||||
{% endif %}
|
||||
|
||||
<td style="width: 150px;" class="text-center">
|
||||
{{ timer.details }}
|
||||
|
||||
{% if timer.timer_type != 'UNSPECIFIED' %}
|
||||
<br>({{ timer.get_timer_type_display }})
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
{% if timer.objective == "Hostile" %}
|
||||
<div class="badge bg-danger">
|
||||
{% translate "Hostile" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.objective == "Friendly" %}
|
||||
<div class="badge bg-primary">
|
||||
{% translate "Friendly" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.objective == "Neutral" %}
|
||||
<div class="badge bg-default">
|
||||
{% translate "Neutral" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
<a href="{{ timer.system|dotlan_solar_system_url }}">
|
||||
{{ timer.system }} {{ timer.planet_moon }}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
{% if timer.structure == "POCO" %}
|
||||
<div class="badge bg-info">
|
||||
{% translate "POCO" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "I-HUB" %}
|
||||
<div class="badge bg-warning">
|
||||
{% translate "I-HUB" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "TCU" %}
|
||||
<div class="badge bg-danger">
|
||||
{% translate "TCU" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "POS[S]" %}
|
||||
<div class="badge bg-info">
|
||||
{% translate "POS [S]" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "POS[M]" %}
|
||||
<div class="badge bg-info">
|
||||
{% translate "POS [M]" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "POS[L]" %}
|
||||
<div class="badge bg-info">
|
||||
{% translate "POS [L]" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "Citadel[M]" or timer.structure == "Astrahus" %}
|
||||
<div class="badge bg-danger">
|
||||
{% translate "Astrahus" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "Citadel[L]" or timer.structure == "Fortizar" %}
|
||||
<div class="badge bg-danger">
|
||||
{% translate "Fortizar" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "Citadel[XL]" or timer.structure == "Keepstar" %}
|
||||
<div class="badge bg-danger">
|
||||
{% translate "Keepstar" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "Engineering Complex[M]" or timer.structure == "Raitaru" %}
|
||||
<div class="badge bg-warning">
|
||||
{% translate "Raitaru" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "Engineering Complex[L]" or timer.structure == "Azbel" %}
|
||||
<div class="badge bg-warning">
|
||||
{% translate "Azbel" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "Engineering Complex[XL]" or timer.structure == "Sotiyo" %}
|
||||
<div class="badge bg-warning">
|
||||
{% translate "Sotiyo" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "Refinery[M]" or timer.structure == "Athanor" %}
|
||||
<div class="badge bg-warning">
|
||||
{% translate "Athanor" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "Refinery[L]" or timer.structure == "Tatara"%}
|
||||
<div class="badge bg-warning">
|
||||
{% translate "Tatara" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "Cyno Beacon" or timer.structure == "Pharolux Cyno Beacon" %}
|
||||
<div class="badge bg-warning">
|
||||
{% translate "Cyno Beacon" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "Cyno Jammer" or timer.structure == "Tenebrex Cyno Jammer" %}
|
||||
<div class="badge bg-warning">
|
||||
{% translate "Cyno Jammer" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "Jump Gate" or timer.structure == "Ansiblex Jump Gate" %}
|
||||
<div class="badge bg-warning">
|
||||
{% translate "Ansiblex Jump Gate" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "Moon Mining Cycle" %}
|
||||
<div class="badge bg-success">
|
||||
{% translate "Moon Mining Cycle" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if timer.structure == "Other" %}
|
||||
<div class="badge bg-default">
|
||||
{% translate "Other" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</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 'timerboard:delete' timer.id %}" class="btn btn-danger">
|
||||
<i class="fa-solid fa-trash-can fa-fw"></i>
|
||||
</a>
|
||||
<a href="{% url 'timerboard:edit' timer.id %}" class="btn btn-info">
|
||||
<i class="fa-solid fa-pen-to-square fa-fw"></i>
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
@ -1,546 +1,93 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
{% load evelinks %}
|
||||
|
||||
{% block page_title %}{% translate "Structure Timer Management" %}{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
|
||||
{% block page_title %}
|
||||
{% translate "Structure Timer Management" %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Structure Timers" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">{% translate "Structure Timers" %}
|
||||
<div class="text-end">
|
||||
<div>
|
||||
<div class="text-end mb-3">
|
||||
{% if perms.auth.timer_management %}
|
||||
<a href="{% url 'timerboard:add' %}" class="btn btn-success">
|
||||
{% translate "Create Structure Timer" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</h1>
|
||||
<div class="col-lg-12 text-center">
|
||||
|
||||
<div class="col-lg-12 text-center mb-3">
|
||||
<div class="badge bg-info text-start">
|
||||
<b>{% translate "Current Eve Time:" %} </b>
|
||||
<span>{% translate "Current Eve Time:" %}</span>
|
||||
<span id="current-time"></span>
|
||||
</div>
|
||||
<strong class="badge bg-info text-start" id="current-time"></strong>
|
||||
</div>
|
||||
|
||||
{% if corp_timers %}
|
||||
<h4><b>{% translate "Corp Timers" %}</b></h4>
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th style="width:150px" class="text-center">{% translate "Details" %}</th>
|
||||
<th class="text-center">{% translate "Objective" %}</th>
|
||||
<th class="text-center">{% translate "System" %}</th>
|
||||
<th class="text-center">{% translate "Structure" %}</th>
|
||||
<th class="text-center">{% translate "Eve Time" %}</th>
|
||||
<th class="text-center">{% translate "Local Time" %}</th>
|
||||
<th class="text-center">{% translate "Creator" %}</th>
|
||||
{% if perms.auth.timer_management %}
|
||||
<th class="text-center">{% translate "Action" %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% for timer in corp_timers %}
|
||||
{% if timer.important == True %}
|
||||
<tr class="danger">
|
||||
{% else %}
|
||||
<tr class="info">
|
||||
{% endif %}
|
||||
<td style="width:150px" class="text-center">
|
||||
{{ timer.details }}
|
||||
{% if timer.timer_type != 'UNSPECIFIED' %}
|
||||
<br>({{ timer.get_timer_type_display }})
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if timer.objective == "Hostile" %}
|
||||
<div class="badge bg-danger">
|
||||
{% translate "Hostile" %}
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "Corporation Timers" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{% include "timerboard/timertable.html" with timers=corp_timers %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.objective == "Friendly" %}
|
||||
<div class="badge bg-primary">
|
||||
{% translate "Friendly" %}
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "Upcoming Timers" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.objective == "Neutral" %}
|
||||
<div class="badge bg-default">
|
||||
{% translate "Neutral" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center"><a href="{{ timer.system|dotlan_solar_system_url }}">
|
||||
{{ timer.system }} {{ timer.planet_moon }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if timer.structure == "POCO" %}
|
||||
<div class="badge bg-info">
|
||||
POCO
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "I-HUB" %}
|
||||
<div class="badge bg-warning">
|
||||
I-HUB
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "TCU" %}
|
||||
<div class="badge bg-danger">
|
||||
TCU
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "POS[S]" %}
|
||||
<div class="badge bg-info">
|
||||
POS [S]
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "POS[M]" %}
|
||||
<div class="badge bg-info">
|
||||
POS [M]
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "POS[L]" %}
|
||||
<div class="badge bg-info">
|
||||
POS [L]
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Citadel[M]" or timer.structure == "Astrahus" %}
|
||||
<div class="badge bg-danger">
|
||||
Astrahus
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Citadel[L]" or timer.structure == "Fortizar" %}
|
||||
<div class="badge bg-danger">
|
||||
Fortizar
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Citadel[XL]" or timer.structure == "Keepstar" %}
|
||||
<div class="badge bg-danger">
|
||||
Keepstar
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Engineering Complex[M]" or timer.structure == "Raitaru" %}
|
||||
<div class="badge bg-warning">
|
||||
Raitaru
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Engineering Complex[L]" or timer.structure == "Azbel" %}
|
||||
<div class="badge bg-warning">
|
||||
Azbel
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Engineering Complex[XL]" or timer.structure == "Sotiyo" %}
|
||||
<div class="badge bg-warning">
|
||||
Sotiyo
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Refinery[M]" or timer.structure == "Athanor" %}
|
||||
<div class="badge bg-warning">
|
||||
Athanor
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Refinery[L]" or timer.structure == "Tatara"%}
|
||||
<div class="badge bg-warning">
|
||||
Tatara
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Cyno Beacon" or timer.structure == "Pharolux Cyno Beacon" %}
|
||||
<div class="badge bg-warning">
|
||||
Cyno Beacon
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Cyno Jammer" or timer.structure == "Tenebrex Cyno Jammer" %}
|
||||
<div class="badge bg-warning">
|
||||
Tenebrex Cyno Jammer
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Jump Gate" or timer.structure == "Ansiblex Jump Gate" %}
|
||||
<div class="badge bg-warning">
|
||||
Ansiblex Jump Gate
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Moon Mining Cycle" %}
|
||||
<div class="badge bg-success">
|
||||
Moon Mining Cycle
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Other" %}
|
||||
<div class="badge bg-default">
|
||||
Other
|
||||
</div>
|
||||
{% endif %}
|
||||
</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 'timerboard:delete' timer.id %}" class="btn btn-danger">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
<a href="{% url 'timerboard:edit' timer.id %}" class="btn btn-info">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
<h4><b>{% translate "Next Timers" %}</b></h4>
|
||||
|
||||
<div class="card-body">
|
||||
{% if future_timers %}
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th style="width:150px" class="text-center">{% translate "Details" %}</th>
|
||||
<th class="text-center">{% translate "Objective" %}</th>
|
||||
<th class="text-center">{% translate "System" %}</th>
|
||||
<th class="text-center">{% translate "Structure" %}</th>
|
||||
<th class="text-center">{% translate "Eve Time" %}</th>
|
||||
<th class="text-center">{% translate "Local Time" %}</th>
|
||||
<th class="text-center">{% translate "Creator" %}</th>
|
||||
{% if perms.auth.timer_management %}
|
||||
<th class="text-center">{% translate "Action" %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% for timer in future_timers %}
|
||||
{% if timer.important == True %}
|
||||
<tr class="danger">
|
||||
{% else %}
|
||||
<tr class="info">
|
||||
{% endif %}
|
||||
<td style="width:150px" class="text-center">
|
||||
{{ timer.details }}
|
||||
{% if timer.timer_type != 'UNSPECIFIED' %}
|
||||
<br>({{ timer.get_timer_type_display }})
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if timer.objective == "Hostile" %}
|
||||
<div class="badge bg-danger">
|
||||
{% translate "Hostile" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.objective == "Friendly" %}
|
||||
<div class="badge bg-primary">
|
||||
{% translate "Friendly" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.objective == "Neutral" %}
|
||||
<div class="badge bg-default">
|
||||
{% translate "Neutral" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{{ timer.system|dotlan_solar_system_url }}">
|
||||
{{ timer.system }} {{ timer.planet_moon }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if timer.structure == "POCO" %}
|
||||
<div class="badge bg-info">
|
||||
POCO
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "I-HUB" %}
|
||||
<div class="badge bg-warning">
|
||||
I-HUB
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "TCU" %}
|
||||
<div class="badge bg-danger">
|
||||
TCU
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "POS[S]" %}
|
||||
<div class="badge bg-info">
|
||||
POS [S]
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "POS[M]" %}
|
||||
<div class="badge bg-info">
|
||||
POS [M]
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "POS[L]" %}
|
||||
<div class="badge bg-info">
|
||||
POS [L]
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Citadel[M]" or timer.structure == "Astrahus" %}
|
||||
<div class="badge bg-danger">
|
||||
Astrahus
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Citadel[L]" or timer.structure == "Fortizar" %}
|
||||
<div class="badge bg-danger">
|
||||
Fortizar
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Citadel[XL]" or timer.structure == "Keepstar" %}
|
||||
<div class="badge bg-danger">
|
||||
Keepstar
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Engineering Complex[M]" or timer.structure == "Raitaru" %}
|
||||
<div class="badge bg-warning">
|
||||
Raitaru
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Engineering Complex[L]" or timer.structure == "Azbel" %}
|
||||
<div class="badge bg-warning">
|
||||
Azbel
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Engineering Complex[XL]" or timer.structure == "Sotiyo" %}
|
||||
<div class="badge bg-warning">
|
||||
Sotiyo
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Refinery[M]" or timer.structure == "Athanor" %}
|
||||
<div class="badge bg-warning">
|
||||
Athanor
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Refinery[L]" or timer.structure == "Tatara" %}
|
||||
<div class="badge bg-warning">
|
||||
Tatara
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Cyno Beacon" or timer.structure == "Pharolux Cyno Beacon" %}
|
||||
<div class="badge bg-warning">
|
||||
Pharolux Cyno Beacon
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Cyno Jammer" or timer.structure == "Tenebrex Cyno Jammer" %}
|
||||
<div class="badge bg-warning">
|
||||
Tenebrex Cyno Jammer
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Jump Gate" or timer.structure == "Ansiblex Jump Gate" %}
|
||||
<div class="badge bg-warning">
|
||||
Ansiblex Jump Gate
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Moon Mining Cycle" %}
|
||||
<div class="badge bg-success">
|
||||
Moon Mining Cycle
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Other" %}
|
||||
<div class="badge bg-default">
|
||||
Other
|
||||
</div>
|
||||
{% endif %}
|
||||
</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 'timerboard:delete' timer.id %}" class="btn btn-danger">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
<a href="{% url 'timerboard:edit' timer.id %}" class="btn btn-info">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% include "timerboard/timertable.html" with timers=future_timers %}
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">
|
||||
{% translate "No upcoming timers." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4><b>{% translate "Past Timers" %}</b></h4>
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "Past Timers" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{% if past_timers %}
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th style="width:150px" class="text-center">{% translate "Details" %}</th>
|
||||
<th class="text-center">{% translate "Objective" %}</th>
|
||||
<th class="text-center">{% translate "System" %}</th>
|
||||
<th class="text-center">{% translate "Structure" %}</th>
|
||||
<th class="text-center">{% translate "Eve Time" %}</th>
|
||||
<th class="text-center">{% translate "Local Time" %}</th>
|
||||
<th class="text-center">{% translate "Creator" %}</th>
|
||||
{% if perms.auth.timer_management %}
|
||||
<th class="text-center">{% translate "Action" %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% for timer in past_timers %}
|
||||
{% if timer.important == True %}
|
||||
<tr class="danger">
|
||||
{% else %}
|
||||
<tr class="info">
|
||||
{% endif %}
|
||||
<td style="width:150px" class="text-center">
|
||||
{{ timer.details }}
|
||||
{% if timer.timer_type != 'UNSPECIFIED' %}
|
||||
<br>({{ timer.get_timer_type_display }})
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if timer.objective == "Hostile" %}
|
||||
<div class="badge bg-danger">
|
||||
{% translate "Hostile" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.objective == "Friendly" %}
|
||||
<div class="badge bg-primary">
|
||||
{% translate "Friendly" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.objective == "Neutral" %}
|
||||
<div class="badge bg-default">
|
||||
{% translate "Neutral" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{{ timer.system|dotlan_solar_system_url }}">
|
||||
{{ timer.system }} {{ timer.planet_moon }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if timer.structure == "POCO" %}
|
||||
<div class="badge bg-info">
|
||||
POCO
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "I-HUB" %}
|
||||
<div class="badge bg-warning">
|
||||
I-HUB
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "TCU" %}
|
||||
<div class="badge bg-danger">
|
||||
TCU
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "POS[S]" %}
|
||||
<div class="badge bg-info">
|
||||
POS [S]
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "POS[M]" %}
|
||||
<div class="badge bg-info">
|
||||
POS [M]
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "POS[L]" %}
|
||||
<div class="badge bg-info">
|
||||
POS [L]
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Citadel[M]" or timer.structure == "Astrahus" %}
|
||||
<div class="badge bg-danger">
|
||||
Astrahus
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Citadel[L]" or timer.structure == "Fortizar" %}
|
||||
<div class="badge bg-danger">
|
||||
Fortizar
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Citadel[XL]" or timer.structure == "Keepstar" %}
|
||||
<div class="badge bg-danger">
|
||||
Keepstar
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Engineering Complex[M]" or timer.structure == "Raitaru" %}
|
||||
<div class="badge bg-warning">
|
||||
Raitaru
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Engineering Complex[L]" or timer.structure == "Azbel" %}
|
||||
<div class="badge bg-warning">
|
||||
Azbel
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Engineering Complex[XL]" or timer.structure == "Sotiyo" %}
|
||||
<div class="badge bg-warning">
|
||||
Sotiyo
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Refinery[M]" or timer.structure == "Athanor" %}
|
||||
<div class="badge bg-warning">
|
||||
Athanor
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Refinery[L]" or timer.structure == "Tatara" %}
|
||||
<div class="badge bg-warning">
|
||||
Tatara
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Cyno Beacon" or timer.structure == "Pharolux Cyno Beacon" %}
|
||||
<div class="badge bg-warning">
|
||||
Pharolux Cyno Beacon
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Cyno Jammer" or timer.structure == "Tenebrex Cyno Jammer" %}
|
||||
<div class="badge bg-warning">
|
||||
Tenebrex Cyno Jammer
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Jump Gate" or timer.structure == "Ansiblex Jump Gate" %}
|
||||
<div class="badge bg-warning">
|
||||
Ansiblex Jump Gate
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Moon Mining Cycle" %}
|
||||
<div class="badge bg-success">
|
||||
Moon Mining Cycle
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.structure == "Other" %}
|
||||
<div class="badge bg-default">
|
||||
Other
|
||||
</div>
|
||||
{% endif %}
|
||||
</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 'timerboard:delete' timer.id %}" class="btn btn-danger">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
<a href="{% url 'timerboard:edit' timer.id %}" class="btn btn-info">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% include "timerboard/timertable.html" with timers=past_timers %}
|
||||
{% else %}
|
||||
<div class="alert alert-warning text-center">
|
||||
{% translate "No past timers." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include "bundles/moment-js.html" with locale=True %}
|
||||
{% include "bundles/timers-js.html" %}
|
||||
|
||||
<script>
|
||||
let timers = [
|
||||
const timers = [
|
||||
{% for timer in timers %}
|
||||
{
|
||||
'id': {{ timer.id }},
|
||||
@ -548,6 +95,7 @@
|
||||
'expired': false
|
||||
},
|
||||
{% endfor %}
|
||||
|
||||
{% for timer in corp_timers %}
|
||||
{
|
||||
'id': {{ timer.id }},
|
||||
@ -561,9 +109,9 @@
|
||||
* Update a timer
|
||||
* @param timer Timer information
|
||||
*/
|
||||
let updateTimer = function (timer) {
|
||||
const updateTimer = (timer) => {
|
||||
if (timer.targetDate.isAfter(Date.now())) {
|
||||
let duration = moment.duration(timer.targetDate - moment(), 'milliseconds');
|
||||
const duration = moment.duration(timer.targetDate - moment(), 'milliseconds');
|
||||
|
||||
document.getElementById("countdown" + timer.id).innerHTML = getDurationString(duration);
|
||||
} else {
|
||||
@ -573,8 +121,8 @@
|
||||
}
|
||||
};
|
||||
|
||||
let updateAllTimers = function () {
|
||||
let l = timers.length;
|
||||
const updateAllTimers = () => {
|
||||
const l = timers.length;
|
||||
|
||||
for (let i=0; i < l; ++i) {
|
||||
if (timers[i].expired) continue;
|
||||
@ -583,33 +131,34 @@
|
||||
}
|
||||
};
|
||||
|
||||
function timedUpdate() {
|
||||
updateClock();
|
||||
updateAllTimers();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the local time info for the timer
|
||||
* @param timer Timer information
|
||||
*/
|
||||
let setLocalTime = function (timer) {
|
||||
const setLocalTime = (timer) => {
|
||||
document.getElementById("localtime" + timer.id).innerHTML = timer.targetDate.format("ddd @ LT");
|
||||
};
|
||||
|
||||
/**
|
||||
* Set all local time fields
|
||||
*/
|
||||
let setAllLocalTimes = function () {
|
||||
let l = timers.length;
|
||||
const setAllLocalTimes = () => {
|
||||
const l = timers.length;
|
||||
|
||||
for (let i=0; i < l; ++i) {
|
||||
setLocalTime(timers[i]);
|
||||
}
|
||||
};
|
||||
|
||||
let updateClock = function () {
|
||||
const updateClock = () => {
|
||||
document.getElementById("current-time").innerHTML = getCurrentEveTimeString();
|
||||
};
|
||||
|
||||
const timedUpdate = () => {
|
||||
updateClock();
|
||||
updateAllTimers();
|
||||
}
|
||||
|
||||
// Set initial values
|
||||
setAllLocalTimes();
|
||||
timedUpdate();
|
||||
@ -617,4 +166,4 @@
|
||||
// Start timed updates
|
||||
setInterval(timedUpdate, 1000);
|
||||
</script>
|
||||
{% endblock content %}
|
||||
{% endblock extra_javascript %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user