mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-04 14:16:21 +01:00
Compare commits
178 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd17b95cac | ||
|
|
4ed1c5b7c4 | ||
|
|
271fd8e8c4 | ||
|
|
9b4321281a | ||
|
|
052c35c8e5 | ||
|
|
0fcb517b0b | ||
|
|
dcfddf0add | ||
|
|
4a4258d0e6 | ||
|
|
dd15a221aa | ||
|
|
737e02293a | ||
|
|
c34efebacf | ||
|
|
4602097399 | ||
|
|
7051e06564 | ||
|
|
9767ce79d8 | ||
|
|
0c090f1486 | ||
|
|
618ee81f9b | ||
|
|
98efb9f887 | ||
|
|
cbe6c821cc | ||
|
|
de9d2b39a6 | ||
|
|
0d5f22288b | ||
|
|
e0d76dc268 | ||
|
|
ecc9e68330 | ||
|
|
710149ec21 | ||
|
|
3c2c137dad | ||
|
|
a8271c4189 | ||
|
|
3315ae7778 | ||
|
|
d2f048f8fe | ||
|
|
0fe2855faa | ||
|
|
79a1fa3d7c | ||
|
|
96fe88d5c7 | ||
|
|
59391ad3c5 | ||
|
|
94e9c08422 | ||
|
|
acff3695bc | ||
|
|
43ec8514aa | ||
|
|
4c629b193f | ||
|
|
c651da4011 | ||
|
|
da382cffd1 | ||
|
|
4ecfc3afd8 | ||
|
|
4eb7dbbe62 | ||
|
|
c96ba65296 | ||
|
|
ff2f60f7f3 | ||
|
|
3000545c98 | ||
|
|
f3ad092ef2 | ||
|
|
a012e7df2f | ||
|
|
1fa77412c0 | ||
|
|
e56caeb22b | ||
|
|
ceb07ebc67 | ||
|
|
237075d45c | ||
|
|
7099b1946d | ||
|
|
e416ab8ff2 | ||
|
|
2802ed03a5 | ||
|
|
4af73c76fe | ||
|
|
b6149979aa | ||
|
|
cb20288427 | ||
|
|
db6f4c91dc | ||
|
|
57ac7a5277 | ||
|
|
136438f9c2 | ||
|
|
e2be8b3440 | ||
|
|
04f3473ef3 | ||
|
|
255cb0da8d | ||
|
|
069352fb0f | ||
|
|
66e8ddb684 | ||
|
|
179c26975c | ||
|
|
e17f6e799b | ||
|
|
7cd8294104 | ||
|
|
ede5540335 | ||
|
|
747279b773 | ||
|
|
44f8b1c477 | ||
|
|
7c6ebd9bf6 | ||
|
|
430469b708 | ||
|
|
efbb3cee31 | ||
|
|
21094ed4dd | ||
|
|
5f326efc7e | ||
|
|
b6e34ace35 | ||
|
|
fe4a8965e3 | ||
|
|
23371c233d | ||
|
|
7a3bbf0d7f | ||
|
|
89a1bec9c1 | ||
|
|
1c1e70619a | ||
|
|
0ff4374efa | ||
|
|
18d0e58a48 | ||
|
|
84f44338dc | ||
|
|
2ba0412890 | ||
|
|
2326522b29 | ||
|
|
a7cb6ee434 | ||
|
|
2aeef63565 | ||
|
|
3c9e7335ef | ||
|
|
49067de325 | ||
|
|
471e7e29ae | ||
|
|
3ec5775406 | ||
|
|
e804d2b60d | ||
|
|
742438a95d | ||
|
|
5c60086baa | ||
|
|
e49041bb14 | ||
|
|
f3cbe91883 | ||
|
|
ea439a2176 | ||
|
|
56e1e76f11 | ||
|
|
634e7357be | ||
|
|
08dc88da1a | ||
|
|
3d206e445c | ||
|
|
64686cdad1 | ||
|
|
d7fe09bdf1 | ||
|
|
6da50da92f | ||
|
|
51e4dd986f | ||
|
|
bee6522182 | ||
|
|
1711a9dd33 | ||
|
|
3914626379 | ||
|
|
df276cb32d | ||
|
|
daad7d8b10 | ||
|
|
3bf5bc0fe3 | ||
|
|
96abae553a | ||
|
|
f9cbfb1562 | ||
|
|
8eaa94e179 | ||
|
|
4f876b648b | ||
|
|
cd738137c0 | ||
|
|
5605eb129d | ||
|
|
87ef0f21a3 | ||
|
|
a1c7ce827e | ||
|
|
97466bcdfb | ||
|
|
ff3096b106 | ||
|
|
98f0d77f3f | ||
|
|
92548ba402 | ||
|
|
c46741d311 | ||
|
|
7c7c1abf7c | ||
|
|
fc303b1b0a | ||
|
|
4e220a9679 | ||
|
|
b17b1f7504 | ||
|
|
7081fc0e76 | ||
|
|
68e4574f19 | ||
|
|
e6e0a70012 | ||
|
|
13e38da942 | ||
|
|
468c1de26b | ||
|
|
22ef5ac0e5 | ||
|
|
ef2dc08958 | ||
|
|
6b84ffa16c | ||
|
|
d7a1096413 | ||
|
|
93b94a8bc2 | ||
|
|
9a95716105 | ||
|
|
dbfcf5d87a | ||
|
|
105d7d53b3 | ||
|
|
01cefe1457 | ||
|
|
7fe3db8017 | ||
|
|
e0945fac80 | ||
|
|
40fa190820 | ||
|
|
670580f8f3 | ||
|
|
323a0bcf16 | ||
|
|
6e995edd80 | ||
|
|
8d86e45b7a | ||
|
|
2aa6df4461 | ||
|
|
cf6f989502 | ||
|
|
3e1d8ae334 | ||
|
|
bcfe9484b5 | ||
|
|
5e4d1b9cfd | ||
|
|
3b463e7305 | ||
|
|
eedf5082fa | ||
|
|
2ea5b15175 | ||
|
|
7a9808aad3 | ||
|
|
a1d712694c | ||
|
|
ca11c726a3 | ||
|
|
6e0f7a35bd | ||
|
|
7375b001ca | ||
|
|
0287086633 | ||
|
|
9eb2becbb5 | ||
|
|
12f1444fe7 | ||
|
|
d6372bd093 | ||
|
|
f4d8ead54e | ||
|
|
7427e13505 | ||
|
|
445683c3d5 | ||
|
|
677c46c48a | ||
|
|
87b9e3f87a | ||
|
|
da2a5aff2f | ||
|
|
65d77743dc | ||
|
|
9f4bf13cc9 | ||
|
|
51b86f88b9 | ||
|
|
8184461b48 | ||
|
|
ca0cdd6e15 | ||
|
|
036a17ad3b | ||
|
|
2418023ddd |
@@ -25,7 +25,7 @@ before_script:
|
||||
pre-commit-check:
|
||||
<<: *only-default
|
||||
stage: pre-commit
|
||||
image: python:3.11-bullseye
|
||||
image: python:3.11-bookworm
|
||||
# variables:
|
||||
# PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
|
||||
# cache:
|
||||
@@ -53,7 +53,7 @@ secret_detection:
|
||||
|
||||
test-3.8-core:
|
||||
<<: *only-default
|
||||
image: python:3.8-bullseye
|
||||
image: python:3.8-bookworm
|
||||
script:
|
||||
- tox -e py38-core
|
||||
artifacts:
|
||||
@@ -65,7 +65,7 @@ test-3.8-core:
|
||||
|
||||
test-3.9-core:
|
||||
<<: *only-default
|
||||
image: python:3.9-bullseye
|
||||
image: python:3.9-bookworm
|
||||
script:
|
||||
- tox -e py39-core
|
||||
artifacts:
|
||||
@@ -77,7 +77,7 @@ test-3.9-core:
|
||||
|
||||
test-3.10-core:
|
||||
<<: *only-default
|
||||
image: python:3.10-bullseye
|
||||
image: python:3.10-bookworm
|
||||
script:
|
||||
- tox -e py310-core
|
||||
artifacts:
|
||||
@@ -89,7 +89,7 @@ test-3.10-core:
|
||||
|
||||
test-3.11-core:
|
||||
<<: *only-default
|
||||
image: python:3.11-bullseye
|
||||
image: python:3.11-bookworm
|
||||
script:
|
||||
- tox -e py311-core
|
||||
artifacts:
|
||||
@@ -101,7 +101,7 @@ test-3.11-core:
|
||||
|
||||
test-3.12-core:
|
||||
<<: *only-default
|
||||
image: python:3.12-rc-bullseye
|
||||
image: python:3.12-bookworm
|
||||
script:
|
||||
- tox -e py312-core
|
||||
artifacts:
|
||||
@@ -113,7 +113,7 @@ test-3.12-core:
|
||||
|
||||
test-3.8-all:
|
||||
<<: *only-default
|
||||
image: python:3.8-bullseye
|
||||
image: python:3.8-bookworm
|
||||
script:
|
||||
- tox -e py38-all
|
||||
artifacts:
|
||||
@@ -125,7 +125,7 @@ test-3.8-all:
|
||||
|
||||
test-3.9-all:
|
||||
<<: *only-default
|
||||
image: python:3.9-bullseye
|
||||
image: python:3.9-bookworm
|
||||
script:
|
||||
- tox -e py39-all
|
||||
artifacts:
|
||||
@@ -137,7 +137,7 @@ test-3.9-all:
|
||||
|
||||
test-3.10-all:
|
||||
<<: *only-default
|
||||
image: python:3.10-bullseye
|
||||
image: python:3.10-bookworm
|
||||
script:
|
||||
- tox -e py310-all
|
||||
artifacts:
|
||||
@@ -149,7 +149,7 @@ test-3.10-all:
|
||||
|
||||
test-3.11-all:
|
||||
<<: *only-default
|
||||
image: python:3.11-bullseye
|
||||
image: python:3.11-bookworm
|
||||
script:
|
||||
- tox -e py311-all
|
||||
artifacts:
|
||||
@@ -162,7 +162,7 @@ test-3.11-all:
|
||||
|
||||
test-3.12-all:
|
||||
<<: *only-default
|
||||
image: python:3.12-rc-bullseye
|
||||
image: python:3.12-bookworm
|
||||
script:
|
||||
- tox -e py312-all
|
||||
artifacts:
|
||||
@@ -174,7 +174,7 @@ test-3.12-all:
|
||||
|
||||
build-test:
|
||||
stage: test
|
||||
image: python:3.11-bullseye
|
||||
image: python:3.11-bookworm
|
||||
|
||||
before_script:
|
||||
- python -m pip install --upgrade pip
|
||||
@@ -193,13 +193,13 @@ build-test:
|
||||
|
||||
test-docs:
|
||||
<<: *only-default
|
||||
image: python:3.11-bullseye
|
||||
image: python:3.11-bookworm
|
||||
script:
|
||||
- tox -e docs
|
||||
|
||||
deploy_production:
|
||||
stage: deploy
|
||||
image: python:3.11-bullseye
|
||||
image: python:3.11-bookworm
|
||||
|
||||
before_script:
|
||||
- python -m pip install --upgrade pip
|
||||
|
||||
@@ -4,8 +4,21 @@
|
||||
# pre-commit autoupdate
|
||||
|
||||
repos:
|
||||
# Code Upgrades
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v3.15.2
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: [--py38-plus]
|
||||
- repo: https://github.com/adamchainz/django-upgrade
|
||||
rev: 1.17.0
|
||||
hooks:
|
||||
- id: django-upgrade
|
||||
args: [--target-version=4.2]
|
||||
|
||||
# Formatting
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.4.0
|
||||
rev: v4.6.0
|
||||
hooks:
|
||||
# Identify invalid files
|
||||
- id: check-ast
|
||||
@@ -13,27 +26,24 @@ repos:
|
||||
- id: check-json
|
||||
- id: check-toml
|
||||
- id: check-xml
|
||||
|
||||
# git checks
|
||||
- id: check-merge-conflict
|
||||
- id: check-added-large-files
|
||||
args: [ --maxkb=1000 ]
|
||||
args: [--maxkb=1000]
|
||||
- id: detect-private-key
|
||||
- id: check-case-conflict
|
||||
|
||||
# Python checks
|
||||
# - id: check-docstring-first
|
||||
# - id: check-docstring-first
|
||||
- id: debug-statements
|
||||
# - id: requirements-txt-fixer
|
||||
# - id: requirements-txt-fixer
|
||||
- id: fix-encoding-pragma
|
||||
args: [ --remove ]
|
||||
args: [--remove]
|
||||
- id: fix-byte-order-marker
|
||||
|
||||
# General quality checks
|
||||
- id: mixed-line-ending
|
||||
args: [ --fix=lf ]
|
||||
args: [--fix=lf]
|
||||
- id: trailing-whitespace
|
||||
args: [ --markdown-linebreak-ext=md ]
|
||||
args: [--markdown-linebreak-ext=md]
|
||||
exclude: |
|
||||
(?x)(
|
||||
\.min\.css|
|
||||
@@ -52,9 +62,8 @@ repos:
|
||||
\.mo|
|
||||
swagger\.json
|
||||
)
|
||||
|
||||
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
|
||||
rev: 2.7.2
|
||||
rev: 2.7.3
|
||||
hooks:
|
||||
- id: editorconfig-checker
|
||||
exclude: |
|
||||
@@ -65,21 +74,26 @@ repos:
|
||||
\.mo|
|
||||
swagger\.json
|
||||
)
|
||||
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v3.10.1
|
||||
- repo: https://github.com/igorshubovych/markdownlint-cli
|
||||
rev: v0.41.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: [ --py38-plus ]
|
||||
|
||||
- repo: https://github.com/adamchainz/django-upgrade
|
||||
rev: 1.14.0
|
||||
- id: markdownlint
|
||||
args:
|
||||
- --disable=MD013
|
||||
# Infrastructure
|
||||
- repo: https://github.com/tox-dev/pyproject-fmt
|
||||
rev: 2.1.3
|
||||
hooks:
|
||||
- id: django-upgrade
|
||||
args: [--target-version=4.2]
|
||||
|
||||
- repo: https://github.com/asottile/setup-cfg-fmt
|
||||
rev: v2.3.0
|
||||
- id: pyproject-fmt
|
||||
name: pyproject.toml formatter
|
||||
description: "Format the pyproject.toml file."
|
||||
args:
|
||||
- --indent=4
|
||||
additional_dependencies:
|
||||
- tox==4.15.0 # https://github.com/tox-dev/tox/releases/latest
|
||||
- repo: https://github.com/abravalheri/validate-pyproject
|
||||
rev: v0.18
|
||||
hooks:
|
||||
- id: setup-cfg-fmt
|
||||
args: [ --include-version-classifiers ]
|
||||
- id: validate-pyproject
|
||||
name: Validate pyproject.toml
|
||||
description: "Validate the pyproject.toml file."
|
||||
|
||||
10
.tx/config
10
.tx/config
@@ -1,10 +0,0 @@
|
||||
[main]
|
||||
host = https://app.transifex.com
|
||||
lang_map = zh-Hans: zh_Hans
|
||||
|
||||
[o:alliance-auth:p:alliance-auth:r:django-po]
|
||||
file_filter = allianceauth/locale/<lang>/LC_MESSAGES/django.po
|
||||
source_file = allianceauth/locale/en/LC_MESSAGES/django.po
|
||||
source_lang = en
|
||||
type = PO
|
||||
minimum_perc = 0
|
||||
@@ -5,7 +5,7 @@ manage online service access.
|
||||
# This will make sure the app is always imported when
|
||||
# Django starts so that shared_task will use this app.
|
||||
|
||||
__version__ = '4.0.0b2'
|
||||
__version__ = '4.3.0'
|
||||
__title__ = 'Alliance Auth'
|
||||
__url__ = 'https://gitlab.com/allianceauth/allianceauth'
|
||||
NAME = f'{__title__} v{__version__}'
|
||||
|
||||
@@ -9,6 +9,8 @@ from .utils import (
|
||||
install_stat_tokens,
|
||||
install_stat_users)
|
||||
|
||||
from allianceauth import __version__
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
BASE_URL = "https://www.google-analytics.com"
|
||||
@@ -99,11 +101,38 @@ def analytics_daily_stats():
|
||||
event_type='Stats')
|
||||
|
||||
for appconfig in apps.get_app_configs():
|
||||
analytics_event(namespace='allianceauth.analytics',
|
||||
task='send_extension_stats',
|
||||
label=appconfig.label,
|
||||
value=1,
|
||||
event_type='Stats')
|
||||
if appconfig.label in [
|
||||
"django_celery_beat",
|
||||
"bootstrapform",
|
||||
"messages",
|
||||
"sessions",
|
||||
"auth",
|
||||
"staticfiles",
|
||||
"users",
|
||||
"addons",
|
||||
"admin",
|
||||
"humanize",
|
||||
"contenttypes",
|
||||
"sortedm2m",
|
||||
"django_bootstrap5",
|
||||
"tokens",
|
||||
"authentication",
|
||||
"services",
|
||||
"framework",
|
||||
"notifications"
|
||||
"eveonline",
|
||||
"navhelper",
|
||||
"analytics",
|
||||
"menu",
|
||||
"theme"
|
||||
]:
|
||||
pass
|
||||
else:
|
||||
analytics_event(namespace='allianceauth.analytics',
|
||||
task='send_extension_stats',
|
||||
label=appconfig.label,
|
||||
value=1,
|
||||
event_type='Stats')
|
||||
|
||||
|
||||
@shared_task()
|
||||
@@ -139,7 +168,7 @@ def send_ga_tracking_celery_event(
|
||||
'client_id': AnalyticsIdentifier.objects.get(id=1).identifier.hex,
|
||||
"user_properties": {
|
||||
"allianceauth_version": {
|
||||
"value": "allianceauth_version"
|
||||
"value": __version__
|
||||
}
|
||||
},
|
||||
'non_personalized_ads': True,
|
||||
|
||||
@@ -5,26 +5,5 @@ from django.core.checks import Warning, Error, register
|
||||
class AllianceAuthConfig(AppConfig):
|
||||
name = 'allianceauth'
|
||||
|
||||
|
||||
@register()
|
||||
def check_settings(app_configs, **kwargs):
|
||||
from django.conf import settings
|
||||
|
||||
errors = []
|
||||
if hasattr(settings, "SITE_URL"):
|
||||
if settings.SITE_URL[-1] == "/":
|
||||
errors.append(Warning(
|
||||
"'SITE_URL' Has a trailing slash. This may lead to incorrect links being generated by Auth."))
|
||||
else:
|
||||
errors.append(Error(
|
||||
"No 'SITE_URL' found is settings. This may lead to incorrect links being generated by Auth or Errors in 3rd party modules."))
|
||||
if hasattr(settings, "CSRF_TRUSTED_ORIGINS"):
|
||||
if hasattr(settings, "SITE_URL"):
|
||||
if settings.SITE_URL not in settings.CSRF_TRUSTED_ORIGINS:
|
||||
errors.append(Warning(
|
||||
"'SITE_URL' not found in 'CSRF_TRUSTED_ORIGINS'. Auth may not load pages correctly until this is rectified."))
|
||||
else:
|
||||
errors.append(Error(
|
||||
"No 'CSRF_TRUSTED_ORIGINS' found is settings, Auth may not load pages correctly until this is rectified"))
|
||||
|
||||
return errors
|
||||
def ready(self) -> None:
|
||||
import allianceauth.checks # noqa
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.2.13 on 2024-05-12 09:44
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authentication', '0022_userprofile_theme'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='userprofile',
|
||||
name='language',
|
||||
field=models.CharField(blank=True, choices=[('en', 'English'), ('de', 'German'), ('es', 'Spanish'), ('zh-hans', 'Chinese Simplified'), ('ru', 'Russian'), ('ko', 'Korean'), ('fr', 'French'), ('ja', 'Japanese'), ('it', 'Italian'), ('uk', 'Ukrainian'), ('pl', 'Polish')], default='', max_length=10, verbose_name='Language'),
|
||||
),
|
||||
]
|
||||
@@ -78,6 +78,7 @@ class UserProfile(models.Model):
|
||||
JAPANESE = 'ja', _('Japanese')
|
||||
ITALIAN = 'it', _('Italian')
|
||||
UKRAINIAN = 'uk', _('Ukrainian')
|
||||
POLISH = 'pl', _("Polish")
|
||||
|
||||
user = models.OneToOneField(
|
||||
User,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{% translate "Dashboard" %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="d-flex justify-content-around align-self-center flex-wrap">
|
||||
<div class="row">
|
||||
{% for dash in views %}
|
||||
{{ dash | safe }}
|
||||
{% endfor %}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
{% load i18n %}
|
||||
<div id="aa-dashboard-panel-characters" 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 id="aa-dashboard-panel-characters" class="col-12 col-xl-8 mb-3">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-center">
|
||||
<h4 class="ms-auto me-auto">
|
||||
{% translate "Characters" %}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% translate "Characters" as widget_title %}
|
||||
{% include "framework/dashboard/widget-title.html" with title=widget_title %}
|
||||
|
||||
<div>
|
||||
<div style="height: 300px; overflow-y:auto;">
|
||||
<div class="d-flex">
|
||||
<a href="{% url 'authentication:add_character' %}" class="btn btn-primary flex-fill m-1" title="{% translate 'Add Character' %}">
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{% load i18n %}
|
||||
<div id="aa-dashboard-panel-membership" class="col-12 col-xl-4 align-self-stretch py-2 ps-xl-2">
|
||||
<div id="aa-dashboard-panel-membership" class="col-12 col-xl-4 mb-3">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title text-center">{% translate "Membership" %}</h4>
|
||||
<div class="card-body">
|
||||
{% translate "Membership" as widget_title %}
|
||||
{% include "framework/dashboard/widget-title.html" with title=widget_title %}
|
||||
|
||||
<div>
|
||||
<div style="height: 300px; overflow-y:auto;">
|
||||
<h5 class="text-center">{% translate "State:" %} {{ request.user.profile.state }}</h5>
|
||||
<table class="table">
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{% load theme_tags %}
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
@@ -16,7 +17,7 @@
|
||||
|
||||
<title>{% block title %}{% block page_title %}{% endblock page_title %} - {{ SITE_NAME }}{% endblock title %}</title>
|
||||
|
||||
{% include 'bundles/bootstrap-css-bs5.html' %}
|
||||
{% theme_css %}
|
||||
{% include 'bundles/fontawesome.html' %}
|
||||
|
||||
{% block extra_include %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-{{ message.level_tag}}">{{ message }}</div>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<div class="card card-login border-secondary p-3">
|
||||
<div class="card-body">
|
||||
<form method="POST">
|
||||
|
||||
187
allianceauth/checks.py
Normal file
187
allianceauth/checks.py
Normal file
@@ -0,0 +1,187 @@
|
||||
from typing import List
|
||||
from django import db
|
||||
from django.core.checks import CheckMessage, Error, register, Warning
|
||||
from allianceauth.utils.cache import get_redis_client
|
||||
from django.utils import timezone
|
||||
from packaging.version import InvalidVersion, Version as Pep440Version
|
||||
from celery import current_app
|
||||
from django.conf import settings
|
||||
from sqlite3.dbapi2 import sqlite_version_info
|
||||
|
||||
"""
|
||||
A = System Packages
|
||||
B = Configuration
|
||||
"""
|
||||
|
||||
|
||||
@register()
|
||||
def django_settings(app_configs, **kwargs) -> List[CheckMessage]:
|
||||
errors: List[CheckMessage] = []
|
||||
if hasattr(settings, "SITE_URL"):
|
||||
if settings.SITE_URL[-1] == "/":
|
||||
errors.append(Warning("'SITE_URL' Has a trailing slash. This may lead to incorrect links being generated by Auth.", hint="", id="allianceauth.checks.B005"))
|
||||
else:
|
||||
errors.append(Error("No 'SITE_URL' found is settings. This may lead to incorrect links being generated by Auth or Errors in 3rd party modules.", hint="", id="allianceauth.checks.B006"))
|
||||
|
||||
if hasattr(settings, "CSRF_TRUSTED_ORIGINS") and hasattr(settings, "SITE_URL"):
|
||||
if settings.SITE_URL not in settings.CSRF_TRUSTED_ORIGINS:
|
||||
errors.append(Warning("'SITE_URL' not found in 'CSRF_TRUSTED_ORIGINS'. Auth may not load pages correctly until this is rectified.", hint="", id="allianceauth.checks.B007"))
|
||||
else:
|
||||
errors.append(Error("No 'CSRF_TRUSTED_ORIGINS' found is settings, Auth may not load pages correctly until this is rectified", hint="", id="allianceauth.checks.B008"))
|
||||
|
||||
return errors
|
||||
|
||||
|
||||
@register()
|
||||
def system_package_redis(app_configs, **kwargs) -> List[CheckMessage]:
|
||||
errors: List[CheckMessage] = []
|
||||
try:
|
||||
redis_version = Pep440Version(get_redis_client().info()['redis_version'])
|
||||
except InvalidVersion:
|
||||
errors.append(Warning("Unable to confirm Redis Version"))
|
||||
return errors
|
||||
|
||||
if redis_version.major == 7 and redis_version.minor == 2 and timezone.now() > timezone.datetime(year=2025, month=8, day=31, tzinfo=timezone.utc):
|
||||
errors.append(Error(f"Redis {redis_version.public} in Security Support only, Updating Suggested", hint="https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html#redis-and-other-tools", id="allianceauth.checks.A001"))
|
||||
elif redis_version.major == 7 and redis_version.minor == 0:
|
||||
errors.append(Warning(f"Redis {redis_version.public} in Security Support only, Updating Suggested", hint="https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html#redis-and-other-tools", id="allianceauth.checks.A002"))
|
||||
elif redis_version.major == 6 and redis_version.minor == 2:
|
||||
errors.append(Warning(f"Redis {redis_version.public} in Security Support only, Updating Suggested", hint="https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html#redis-and-other-tools", id="allianceauth.checks.A018"))
|
||||
elif redis_version.major in [6, 5]:
|
||||
errors.append(Error(f"Redis {redis_version.public} EOL", hint="https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html#redis-and-other-tools", id="allianceauth.checks.A003"))
|
||||
|
||||
return errors
|
||||
|
||||
|
||||
@register()
|
||||
def system_package_mysql(app_configs, **kwargs) -> List[CheckMessage]:
|
||||
errors: List[CheckMessage] = []
|
||||
|
||||
for connection in db.connections.all():
|
||||
if connection.vendor == "mysql":
|
||||
try:
|
||||
mysql_version = Pep440Version(".".join(str(i) for i in connection.mysql_version))
|
||||
except InvalidVersion:
|
||||
errors.append(Warning("Unable to confirm MySQL Version"))
|
||||
return errors
|
||||
|
||||
# MySQL 8
|
||||
if mysql_version.major == 8 and mysql_version.minor == 4 and timezone.now() > timezone.datetime(year=2032, month=4, day=30, tzinfo=timezone.utc):
|
||||
errors.append(Error(f"MySQL {mysql_version.public} EOL", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A004"))
|
||||
elif mysql_version.major == 8 and mysql_version.minor == 3:
|
||||
errors.append(Warning(f"MySQL {mysql_version.public} Non LTS", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A005"))
|
||||
elif mysql_version.major == 8 and mysql_version.minor == 2:
|
||||
errors.append(Warning(f"MySQL {mysql_version.public} Non LTS", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A006"))
|
||||
elif mysql_version.major == 8 and mysql_version.minor == 1:
|
||||
errors.append(Error(f"MySQL {mysql_version.public} EOL", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A007"))
|
||||
elif mysql_version.major == 8 and mysql_version.minor == 0 and timezone.now() > timezone.datetime(year=2026, month=4, day=30, tzinfo=timezone.utc):
|
||||
errors.append(Error(f"MySQL {mysql_version.public} EOL", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A008"))
|
||||
elif mysql_version.major < 8: # This will also catch Mariadb 5.x
|
||||
errors.append(Error(f"MySQL or MariaDB {mysql_version.public} EOL", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A009"))
|
||||
return errors
|
||||
|
||||
|
||||
@register()
|
||||
def system_package_mariadb(app_configs, **kwargs) -> List[CheckMessage]:
|
||||
errors: List[CheckMessage] = []
|
||||
|
||||
for connection in db.connections.all():
|
||||
if connection.vendor == "mysql": # Still to find a way to determine MySQL vs MariaDB
|
||||
try:
|
||||
mariadb_version = Pep440Version(".".join(str(i) for i in connection.mysql_version))
|
||||
except InvalidVersion:
|
||||
errors.append(Warning("Unable to confirm MariaDB Version"))
|
||||
return errors
|
||||
|
||||
# MariaDB 11
|
||||
if mariadb_version.major == 11 and mariadb_version.minor == 4 and timezone.now() > timezone.datetime(year=2029, month=5, day=19, tzinfo=timezone.utc):
|
||||
errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A010"))
|
||||
elif mariadb_version.major == 11 and mariadb_version.minor == 2:
|
||||
errors.append(Warning(f"MariaDB {mariadb_version.public} Non LTS", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A018"))
|
||||
if timezone.now() > timezone.datetime(year=2024, month=11, day=21, tzinfo=timezone.utc):
|
||||
errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A011"))
|
||||
elif mariadb_version.major == 11 and mariadb_version.minor == 1:
|
||||
errors.append(Warning(f"MariaDB {mariadb_version.public} Non LTS", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A019"))
|
||||
if timezone.now() > timezone.datetime(year=2024, month=8, day=21, tzinfo=timezone.utc):
|
||||
errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A012"))
|
||||
elif mariadb_version.major == 11 and mariadb_version.minor in [0, 3]: # Demote versions down here once EOL
|
||||
errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config.", id="allianceauth.checks.A013"))
|
||||
|
||||
# MariaDB 10
|
||||
elif mariadb_version.major == 10 and mariadb_version.minor == 11 and timezone.now() > timezone.datetime(year=2028, month=2, day=10, tzinfo=timezone.utc):
|
||||
errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config.", id="allianceauth.checks.A014"))
|
||||
elif mariadb_version.major == 10 and mariadb_version.minor == 6 and timezone.now() > timezone.datetime(year=2026, month=7, day=6, tzinfo=timezone.utc):
|
||||
errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A0015"))
|
||||
elif mariadb_version.major == 10 and mariadb_version.minor == 5 and timezone.now() > timezone.datetime(year=2025, month=6, day=24, tzinfo=timezone.utc):
|
||||
errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A016"))
|
||||
elif mariadb_version.major == 10 and mariadb_version.minor in [0, 1, 2, 3, 4, 7, 9, 10]: # Demote versions down here once EOL
|
||||
errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A017"))
|
||||
|
||||
return errors
|
||||
|
||||
|
||||
@register()
|
||||
def system_package_sqlite(app_configs, **kwargs) -> List[CheckMessage]:
|
||||
errors: List[CheckMessage] = []
|
||||
for connection in db.connections.all():
|
||||
if connection.vendor == "sqlite":
|
||||
try:
|
||||
sqlite_version = Pep440Version(".".join(str(i) for i in sqlite_version_info))
|
||||
except InvalidVersion:
|
||||
errors.append(Warning("Unable to confirm SQLite Version"))
|
||||
return errors
|
||||
if sqlite_version.major == 3 and sqlite_version.minor < 27:
|
||||
errors.append(Error(f"SQLite {sqlite_version.public} Unsupported by Django", hint="https://pkgs.org/download/sqlite3", id="allianceauth.checks.A020"))
|
||||
return errors
|
||||
|
||||
|
||||
@register()
|
||||
def sql_settings(app_configs, **kwargs) -> List[CheckMessage]:
|
||||
errors: List[CheckMessage] = []
|
||||
for connection in db.connections.all():
|
||||
if connection.vendor == "mysql":
|
||||
try:
|
||||
if connection.settings_dict["OPTIONS"]["charset"] != "utf8mb4":
|
||||
errors.append(Error(f"SQL Charset is not set to utf8mb4 DB:{connection.alias}", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8", id="allianceauth.checks.B001"))
|
||||
except KeyError:
|
||||
errors.append(Error(f"SQL Charset is not set to utf8mb4 DB:{connection.alias}", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8", id="allianceauth.checks.B001"))
|
||||
|
||||
# This hasn't actually been set on AA yet
|
||||
# try:
|
||||
# if connection.settings_dict["OPTIONS"]["collation"] != "utf8mb4_unicode_ci":
|
||||
# errors.append(Error(f"SQL Collation is not set to utf8mb4_unicode_ci DB:{connection.alias}", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8", id="allianceauth.checks.B001"))
|
||||
# except KeyError:
|
||||
# errors.append(Error(f"SQL Collation is not set to utf8mb4_unicode_ci DB:{connection.alias}", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8", id="allianceauth.checks.B001"))
|
||||
|
||||
# if connection.vendor == "sqlite":
|
||||
|
||||
return errors
|
||||
|
||||
|
||||
@register()
|
||||
def celery_settings(app_configs, **kwargs) -> List[CheckMessage]:
|
||||
errors: List[CheckMessage] = []
|
||||
|
||||
try:
|
||||
if current_app.conf.broker_transport_options != {'priority_steps': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 'queue_order_strategy': 'priority'}:
|
||||
errors.append(Error("Celery Priorities are not set correctly", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/8861ec0a61790eca0261f1adc1cc04ca5f243cbc", id="allianceauth.checks.B003"))
|
||||
except KeyError:
|
||||
errors.append(Error("Celery Priorities are not set", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/8861ec0a61790eca0261f1adc1cc04ca5f243cbc", id="allianceauth.checks.B003"))
|
||||
|
||||
try:
|
||||
if current_app.conf.broker_connection_retry_on_startup != True:
|
||||
errors.append(Error("Celery broker_connection_retry_on_startup not set correctly", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/380c41400b535447839e5552df2410af35a75280", id="allianceauth.checks.B004"))
|
||||
except KeyError:
|
||||
errors.append(Error("Celery broker_connection_retry_on_startup not set", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/380c41400b535447839e5552df2410af35a75280", id="allianceauth.checks.B004"))
|
||||
|
||||
return errors
|
||||
|
||||
|
||||
# IDEAS
|
||||
|
||||
# Any other celery things weve manually changed over the years
|
||||
# I'd be happy to add Community App checks, old versions the owners dont want to support etc.
|
||||
|
||||
|
||||
# Check Default Collation on DB
|
||||
# Check Charset Collation on all tables
|
||||
3
allianceauth/custom_css/__init__.py
Normal file
3
allianceauth/custom_css/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""
|
||||
Initializes the custom_css module.
|
||||
"""
|
||||
25
allianceauth/custom_css/admin.py
Normal file
25
allianceauth/custom_css/admin.py
Normal file
@@ -0,0 +1,25 @@
|
||||
"""
|
||||
Admin classes for custom_css app
|
||||
"""
|
||||
|
||||
# Django
|
||||
from django.contrib import admin
|
||||
|
||||
# Django Solos
|
||||
from solo.admin import SingletonModelAdmin
|
||||
|
||||
# Alliance Auth Custom CSS
|
||||
from allianceauth.custom_css.models import CustomCSS
|
||||
from allianceauth.custom_css.forms import CustomCSSAdminForm
|
||||
|
||||
|
||||
@admin.register(CustomCSS)
|
||||
class CustomCSSAdmin(SingletonModelAdmin):
|
||||
"""
|
||||
Custom CSS Admin
|
||||
"""
|
||||
|
||||
form = CustomCSSAdminForm
|
||||
|
||||
# Leave this here for when we decide to add syntax highlighting to the CSS editor
|
||||
# change_form_template = 'custom_css/admin/change_form.html'
|
||||
13
allianceauth/custom_css/apps.py
Normal file
13
allianceauth/custom_css/apps.py
Normal file
@@ -0,0 +1,13 @@
|
||||
"""
|
||||
Django app configuration for custom_css
|
||||
"""
|
||||
|
||||
# Django
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class CustomCSSConfig(AppConfig):
|
||||
name = "allianceauth.custom_css"
|
||||
label = "custom_css"
|
||||
verbose_name = _("Custom CSS")
|
||||
29
allianceauth/custom_css/forms.py
Normal file
29
allianceauth/custom_css/forms.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""
|
||||
Forms for custom_css app
|
||||
"""
|
||||
|
||||
# Alliance Auth Custom CSS
|
||||
from allianceauth.custom_css.models import CustomCSS
|
||||
from allianceauth.custom_css.widgets import CssEditorWidget
|
||||
|
||||
# Django
|
||||
from django import forms
|
||||
|
||||
|
||||
class CustomCSSAdminForm(forms.ModelForm):
|
||||
"""
|
||||
Form for editing custom CSS
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
model = CustomCSS
|
||||
fields = ("css",)
|
||||
widgets = {
|
||||
"css": CssEditorWidget(
|
||||
attrs={
|
||||
"style": "width: 90%; height: 100%;",
|
||||
"data-editor": "code-highlight",
|
||||
"data-language": "css",
|
||||
}
|
||||
)
|
||||
}
|
||||
42
allianceauth/custom_css/migrations/0001_initial.py
Normal file
42
allianceauth/custom_css/migrations/0001_initial.py
Normal file
@@ -0,0 +1,42 @@
|
||||
# Generated by Django 4.2.15 on 2024-08-14 11:25
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="CustomCSS",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.AutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
(
|
||||
"css",
|
||||
models.TextField(
|
||||
blank=True,
|
||||
help_text="This CSS will be added to the site after the default CSS.",
|
||||
null=True,
|
||||
verbose_name="Your custom CSS",
|
||||
),
|
||||
),
|
||||
("timestamp", models.DateTimeField(auto_now=True)),
|
||||
],
|
||||
options={
|
||||
"verbose_name": "Custom CSS",
|
||||
"verbose_name_plural": "Custom CSS",
|
||||
"default_permissions": (),
|
||||
},
|
||||
),
|
||||
]
|
||||
0
allianceauth/custom_css/migrations/__init__.py
Normal file
0
allianceauth/custom_css/migrations/__init__.py
Normal file
143
allianceauth/custom_css/models.py
Normal file
143
allianceauth/custom_css/models.py
Normal file
@@ -0,0 +1,143 @@
|
||||
"""
|
||||
Models for the custom_css app
|
||||
"""
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
# Django Solo
|
||||
from solo.models import SingletonModel
|
||||
|
||||
# Django
|
||||
from django.conf import settings
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class CustomCSS(SingletonModel):
|
||||
"""
|
||||
Model for storing custom CSS for the site
|
||||
"""
|
||||
|
||||
css = models.TextField(
|
||||
blank=True,
|
||||
null=True,
|
||||
verbose_name=_("Your custom CSS"),
|
||||
help_text=_("This CSS will be added to the site after the default CSS."),
|
||||
)
|
||||
timestamp = models.DateTimeField(auto_now=True)
|
||||
|
||||
class Meta:
|
||||
"""
|
||||
Meta for CustomCSS
|
||||
"""
|
||||
|
||||
default_permissions = ()
|
||||
verbose_name = _("Custom CSS")
|
||||
verbose_name_plural = _("Custom CSS")
|
||||
|
||||
def __str__(self) -> str:
|
||||
"""
|
||||
String representation of CustomCSS
|
||||
|
||||
:return:
|
||||
:rtype:
|
||||
"""
|
||||
|
||||
return str(_("Custom CSS"))
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
"""
|
||||
Save method for CustomCSS
|
||||
|
||||
:param args:
|
||||
:type args:
|
||||
:param kwargs:
|
||||
:type kwargs:
|
||||
:return:
|
||||
:rtype:
|
||||
"""
|
||||
|
||||
self.pk = 1
|
||||
|
||||
if self.css and len(self.css.replace(" ", "")) > 0:
|
||||
# Write the custom CSS to a file
|
||||
custom_css_file = open(
|
||||
f"{settings.STATIC_ROOT}allianceauth/custom-styles.css", "w+"
|
||||
)
|
||||
custom_css_file.write(self.compress_css())
|
||||
custom_css_file.close()
|
||||
else:
|
||||
# Remove the custom CSS file
|
||||
try:
|
||||
os.remove(f"{settings.STATIC_ROOT}allianceauth/custom-styles.css")
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
def compress_css(self) -> str:
|
||||
"""
|
||||
Compress CSS
|
||||
|
||||
:return:
|
||||
:rtype:
|
||||
"""
|
||||
|
||||
css = self.css
|
||||
new_css = ""
|
||||
|
||||
# Remove comments
|
||||
css = re.sub(pattern=r"\s*/\*\s*\*/", repl="$$HACK1$$", string=css)
|
||||
css = re.sub(pattern=r"/\*[\s\S]*?\*/", repl="", string=css)
|
||||
css = css.replace("$$HACK1$$", "/**/")
|
||||
|
||||
# url() doesn't need quotes
|
||||
css = re.sub(pattern=r'url\((["\'])([^)]*)\1\)', repl=r"url(\2)", string=css)
|
||||
|
||||
# Spaces may be safely collapsed as generated content will collapse them anyway.
|
||||
css = re.sub(pattern=r"\s+", repl=" ", string=css)
|
||||
|
||||
# Shorten collapsable colors: #aabbcc to #abc
|
||||
css = re.sub(
|
||||
pattern=r"#([0-9a-f])\1([0-9a-f])\2([0-9a-f])\3(\s|;)",
|
||||
repl=r"#\1\2\3\4",
|
||||
string=css,
|
||||
)
|
||||
|
||||
# Fragment values can loose zeros
|
||||
css = re.sub(
|
||||
pattern=r":\s*0(\.\d+([cm]m|e[mx]|in|p[ctx]))\s*;", repl=r":\1;", string=css
|
||||
)
|
||||
|
||||
for rule in re.findall(pattern=r"([^{]+){([^}]*)}", string=css):
|
||||
# We don't need spaces around operators
|
||||
selectors = [
|
||||
re.sub(
|
||||
pattern=r"(?<=[\[\(>+=])\s+|\s+(?=[=~^$*|>+\]\)])",
|
||||
repl=r"",
|
||||
string=selector.strip(),
|
||||
)
|
||||
for selector in rule[0].split(",")
|
||||
]
|
||||
|
||||
# Order is important, but we still want to discard repetitions
|
||||
properties = {}
|
||||
porder = []
|
||||
|
||||
for prop in re.findall(pattern="(.*?):(.*?)(;|$)", string=rule[1]):
|
||||
key = prop[0].strip().lower()
|
||||
|
||||
if key not in porder:
|
||||
porder.append(key)
|
||||
|
||||
properties[key] = prop[1].strip()
|
||||
|
||||
# output rule if it contains any declarations
|
||||
if properties:
|
||||
new_css += "{}{{{}}}".format(
|
||||
",".join(selectors),
|
||||
"".join([f"{key}:{properties[key]};" for key in porder])[:-1],
|
||||
)
|
||||
|
||||
return new_css
|
||||
@@ -0,0 +1,48 @@
|
||||
{% extends "admin/change_form.html" %}
|
||||
|
||||
{% block field_sets %}
|
||||
{% for fieldset in adminform %}
|
||||
<fieldset class="module aligned {{ fieldset.classes }}">
|
||||
{% if fieldset.name %}<h2>{{ fieldset.name }}</h2>{% endif %}
|
||||
|
||||
{% if fieldset.description %}
|
||||
<div class="description">{{ fieldset.description|safe }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% for line in fieldset %}
|
||||
<div class="form-row{% if line.fields|length == 1 and line.errors %} errors{% endif %}{% if not line.has_visible_field %} hidden{% endif %}{% for field in line %}{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% endfor %}">
|
||||
{% if line.fields|length == 1 %}{{ line.errors }}{% else %}<div class="flex-container form-multiline">{% endif %}
|
||||
|
||||
{% for field in line %}
|
||||
<div>
|
||||
{% if not line.fields|length == 1 and not field.is_readonly %}{{ field.errors }}{% endif %}
|
||||
|
||||
<div class="flex-container{% if not line.fields|length == 1 %} fieldBox{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}{% elif field.is_checkbox %} checkbox-row{% endif %}">
|
||||
{% if field.is_checkbox %}
|
||||
{{ field.field }}{{ field.label_tag }}
|
||||
{% else %}
|
||||
{{ field.label_tag }}
|
||||
{% if field.is_readonly %}
|
||||
<div class="readonly">{{ field.contents }}</div>
|
||||
{% else %}
|
||||
{{ field.field }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if field.field.help_text %}
|
||||
<div class="help"{% if field.field.id_for_label %} id="{{ field.field.id_for_label }}_helptext"{% endif %}>
|
||||
<div>{{ field.field.help_text|safe }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if not line.fields|length == 1 %}</div>{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block after_field_sets %}{% endblock %}
|
||||
@@ -0,0 +1,3 @@
|
||||
{% load custom_css %}
|
||||
|
||||
{% custom_css_static 'allianceauth/custom-styles.css' %}
|
||||
3
allianceauth/custom_css/templatetags/__init__.py
Normal file
3
allianceauth/custom_css/templatetags/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""
|
||||
Init file for custom_css templatetags
|
||||
"""
|
||||
48
allianceauth/custom_css/templatetags/custom_css.py
Normal file
48
allianceauth/custom_css/templatetags/custom_css.py
Normal file
@@ -0,0 +1,48 @@
|
||||
"""
|
||||
Custom template tags for custom_css app
|
||||
"""
|
||||
|
||||
# Alliance Auth Custom CSS
|
||||
from allianceauth.custom_css.models import CustomCSS
|
||||
|
||||
# Django
|
||||
from django.conf import settings
|
||||
from django.template.defaulttags import register
|
||||
from django.templatetags.static import static
|
||||
from django.utils.safestring import mark_safe
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def custom_css_static(path: str) -> str:
|
||||
"""
|
||||
Versioned static URL
|
||||
This is to make sure to break the browser cache on CSS updates.
|
||||
|
||||
Example: /static/allianceauth/custom-styles.css?v=1234567890
|
||||
|
||||
:param path:
|
||||
:type path:
|
||||
:return:
|
||||
:rtype:
|
||||
"""
|
||||
|
||||
try:
|
||||
Path(f"{settings.STATIC_ROOT}{path}").resolve(strict=True)
|
||||
except FileNotFoundError:
|
||||
return ""
|
||||
else:
|
||||
try:
|
||||
custom_css = CustomCSS.objects.get(pk=1)
|
||||
except CustomCSS.DoesNotExist:
|
||||
return ""
|
||||
else:
|
||||
custom_css_changed = custom_css.timestamp.timestamp()
|
||||
custom_css_version = (
|
||||
str(custom_css_changed).replace(" ", "").replace(":", "").replace("-", "")
|
||||
) # remove spaces, colons, and dashes
|
||||
static_url = static(path)
|
||||
versioned_url = static_url + "?v=" + custom_css_version
|
||||
|
||||
return mark_safe(f'<link rel="stylesheet" href="{versioned_url}">')
|
||||
38
allianceauth/custom_css/widgets.py
Normal file
38
allianceauth/custom_css/widgets.py
Normal file
@@ -0,0 +1,38 @@
|
||||
"""
|
||||
Form widgets for custom_css app
|
||||
"""
|
||||
|
||||
# Django
|
||||
from django import forms
|
||||
|
||||
# Alliance Auth
|
||||
from allianceauth.custom_css.models import CustomCSS
|
||||
|
||||
|
||||
class CssEditorWidget(forms.Textarea):
|
||||
"""
|
||||
Widget for editing CSS
|
||||
"""
|
||||
|
||||
def __init__(self, attrs=None):
|
||||
default_attrs = {"class": "custom-css-editor"}
|
||||
|
||||
if attrs:
|
||||
default_attrs.update(attrs)
|
||||
|
||||
super().__init__(default_attrs)
|
||||
|
||||
# For when we want to add some sort of syntax highlight to it, which is not that
|
||||
# easy to do on a textarea field though.
|
||||
# `highlight.js` is just used as an example here, and doesn't work on a textarea field.
|
||||
# class Media:
|
||||
# css = {
|
||||
# "all": (
|
||||
# "/static/custom_css/libs/highlight.js/11.10.0/styles/github.min.css",
|
||||
# )
|
||||
# }
|
||||
# js = (
|
||||
# "/static/custom_css/libs/highlight.js/11.10.0/highlight.min.js",
|
||||
# "/static/custom_css/libs/highlight.js/11.10.0/languages/css.min.js",
|
||||
# "/static/custom_css/javascript/custom-css.min.js",
|
||||
# )
|
||||
@@ -0,0 +1,8 @@
|
||||
{#Usage:#}
|
||||
{# {% include "framework/dashboard/widget-title.html" with title="Foobar" %}#}
|
||||
|
||||
<div class="text-center">
|
||||
<h4 class="ms-auto me-auto mb-3">
|
||||
{{ title }}
|
||||
</h4>
|
||||
</div>
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
{% if subtitle %}
|
||||
<br>
|
||||
<small>{{ subtitle }}</small>
|
||||
<small class="text-muted">{{ subtitle }}</small>
|
||||
{% endif %}
|
||||
</h1>
|
||||
{% endif %}
|
||||
|
||||
@@ -92,6 +92,9 @@
|
||||
<a href="{% url 'groupmanagement:accept_request' acceptrequest.id %}" class="btn btn-success">
|
||||
{% translate "Accept" %}
|
||||
</a>
|
||||
<a href="{% url 'groupmanagement:reject_request' acceptrequest.id %}" class="btn btn-danger">
|
||||
{% translate "Reject" %}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
BIN
allianceauth/locale/cs/LC_MESSAGES/django.mo
Normal file
BIN
allianceauth/locale/cs/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
2776
allianceauth/locale/cs/LC_MESSAGES/django.po
Normal file
2776
allianceauth/locale/cs/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-02-17 20:02+1000\n"
|
||||
"POT-Creation-Date: 2024-09-09 13:05+1000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -26,6 +26,15 @@ msgstr ""
|
||||
msgid "Google Analytics V4"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/constants.py:6
|
||||
msgid ""
|
||||
"This software has exceeded the error limit for ESI. If you are a user, "
|
||||
"please contact the maintainer of this software. If you are a developer/"
|
||||
"maintainer, please make a greater effort in the future to receive valid "
|
||||
"responses. For tips on how, come have a chat with us in ##3rd-party-dev-and-"
|
||||
"esi on the EVE Online Discord. https://www.eveonline.com/discord"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/decorators.py:52
|
||||
msgid "A main character is required to perform that action. Add one below."
|
||||
msgstr ""
|
||||
@@ -79,52 +88,63 @@ msgstr ""
|
||||
msgid "Ukrainian"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/models.py:96
|
||||
#: allianceauth/authentication/models.py:81
|
||||
msgid "Polish"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/models.py:97
|
||||
#: allianceauth/menu/templates/menu/menu-user.html:42
|
||||
msgid "Language"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/models.py:101
|
||||
#: allianceauth/authentication/models.py:102
|
||||
#: allianceauth/templates/allianceauth/night-toggle.html:6
|
||||
msgid "Night Mode"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/models.py:105
|
||||
#: allianceauth/authentication/models.py:106
|
||||
#: allianceauth/menu/templates/menu/menu-user.html:46
|
||||
msgid "Theme"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/models.py:122
|
||||
#: allianceauth/authentication/models.py:123
|
||||
#, python-format
|
||||
msgid "State changed to: %s"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/models.py:123
|
||||
#: allianceauth/authentication/models.py:124
|
||||
#, python-format
|
||||
msgid "Your user's state is now: %(state)s"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/templates/authentication/dashboard.characters.html:7
|
||||
#: allianceauth/authentication/templates/authentication/dashboard.html:5
|
||||
#: allianceauth/authentication/templates/authentication/dashboard.html:7
|
||||
#: allianceauth/menu/templates/menu/sortable-side-menu.html:14
|
||||
#: allianceauth/templates/allianceauth/side-menu.html:10
|
||||
msgid "Dashboard"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/templates/authentication/dashboard_characters.html:5
|
||||
#: allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkstatisticscorpview.html:33
|
||||
#: allianceauth/hrapplications/templates/hrapplications/view.html:54
|
||||
msgid "Characters"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/templates/authentication/dashboard.characters.html:13
|
||||
#: allianceauth/authentication/templates/authentication/dashboard.characters.html:14
|
||||
#: allianceauth/authentication/templates/authentication/dashboard_characters.html:11
|
||||
#: allianceauth/authentication/templates/authentication/dashboard_characters.html:12
|
||||
#: allianceauth/templates/allianceauth/top-menu-rh-default.html:4
|
||||
#: allianceauth/templates/allianceauth/top-menu-rh-default.html:6
|
||||
msgid "Add Character"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/templates/authentication/dashboard.characters.html:16
|
||||
#: allianceauth/authentication/templates/authentication/dashboard.characters.html:17
|
||||
#: allianceauth/authentication/templates/authentication/dashboard_characters.html:14
|
||||
#: allianceauth/authentication/templates/authentication/dashboard_characters.html:15
|
||||
#: allianceauth/templates/allianceauth/top-menu-rh-default.html:10
|
||||
#: allianceauth/templates/allianceauth/top-menu-rh-default.html:12
|
||||
msgid "Change Main"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/templates/authentication/dashboard.characters.html:24
|
||||
#: allianceauth/authentication/templates/authentication/dashboard_characters.html:22
|
||||
#: allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkview.html:89
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/groupmembership.html:23
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/groups.html:31
|
||||
@@ -133,32 +153,25 @@ msgstr ""
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/templates/authentication/dashboard.characters.html:25
|
||||
#: allianceauth/authentication/templates/authentication/dashboard_characters.html:23
|
||||
#: allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkstatisticsview.html:33
|
||||
msgid "Corp"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/templates/authentication/dashboard.characters.html:26
|
||||
#: allianceauth/authentication/templates/authentication/dashboard_characters.html:24
|
||||
#: allianceauth/corputils/templates/corputils/corpstats.html:125
|
||||
#: allianceauth/hrapplications/templates/hrapplications/view.html:63
|
||||
msgid "Alliance"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/templates/authentication/dashboard.groups.html:5
|
||||
#: allianceauth/authentication/templates/authentication/dashboard_groups.html:5
|
||||
msgid "Membership"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/templates/authentication/dashboard.groups.html:8
|
||||
#: allianceauth/authentication/templates/authentication/dashboard_groups.html:10
|
||||
msgid "State:"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/templates/authentication/dashboard.html:5
|
||||
#: allianceauth/authentication/templates/authentication/dashboard.html:7
|
||||
#: allianceauth/menu/templates/menu/sortable-side-menu.html:14
|
||||
#: allianceauth/templates/allianceauth/side-menu.html:10
|
||||
msgid "Dashboard"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/templates/authentication/tokens.html:6
|
||||
#: allianceauth/authentication/templates/authentication/tokens.html:10
|
||||
#: allianceauth/templates/allianceauth/top-menu-user-dropdown.html:62
|
||||
@@ -197,7 +210,7 @@ msgstr ""
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/audit.html:29
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html:28
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:55
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:115
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:118
|
||||
msgid "Character"
|
||||
msgstr ""
|
||||
|
||||
@@ -234,49 +247,49 @@ msgstr ""
|
||||
msgid "Invalid or expired activation link."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/views.py:147
|
||||
#: allianceauth/authentication/views.py:158
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Cannot change main character to %(char)s: character owned by a different "
|
||||
"account."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/views.py:153
|
||||
#: allianceauth/authentication/views.py:165
|
||||
#, python-format
|
||||
msgid "Changed main character to %(char)s"
|
||||
msgid "Changed main character to %s"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/views.py:162
|
||||
#: allianceauth/authentication/views.py:179
|
||||
#, python-format
|
||||
msgid "Added %(name)s to your account."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/views.py:164
|
||||
#: allianceauth/authentication/views.py:181
|
||||
#, python-format
|
||||
msgid "Failed to add %(name)s to your account: they already have an account."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/views.py:207
|
||||
#: allianceauth/authentication/views.py:226
|
||||
msgid ""
|
||||
"Unable to authenticate as the selected character. Please log in with the "
|
||||
"main character associated with this account."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/views.py:273
|
||||
#: allianceauth/authentication/views.py:293
|
||||
msgid "Registration token has expired."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/views.py:331
|
||||
#: allianceauth/authentication/views.py:354
|
||||
msgid ""
|
||||
"Sent confirmation email. Please follow the link to confirm your email "
|
||||
"address."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/views.py:336
|
||||
#: allianceauth/authentication/views.py:360
|
||||
msgid "Confirmed your email address. Please login to continue."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/authentication/views.py:341
|
||||
#: allianceauth/authentication/views.py:366
|
||||
msgid "Registration of new accounts is not allowed at this time."
|
||||
msgstr ""
|
||||
|
||||
@@ -386,6 +399,19 @@ msgstr ""
|
||||
msgid "Failed to gather corporation statistics with selected token."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/custom_css/apps.py:13 allianceauth/custom_css/models.py:36
|
||||
#: allianceauth/custom_css/models.py:37 allianceauth/custom_css/models.py:47
|
||||
msgid "Custom CSS"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/custom_css/models.py:25
|
||||
msgid "Your custom CSS"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/custom_css/models.py:26
|
||||
msgid "This CSS will be added to the site after the default CSS."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/fleetactivitytracking/auth_hooks.py:10
|
||||
#: allianceauth/fleetactivitytracking/templates/fleetactivitytracking/characternotexisting.html:10
|
||||
#: allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkcreate.html:11
|
||||
@@ -478,8 +504,8 @@ msgstr ""
|
||||
|
||||
#: allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkmodify.html:37
|
||||
#: allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkview.html:42
|
||||
#: allianceauth/optimer/form.py:13 allianceauth/timerboard/form.py:59
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:16
|
||||
#: allianceauth/optimer/form.py:13 allianceauth/timerboard/form.py:37
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:17
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:9
|
||||
msgid "System"
|
||||
msgstr ""
|
||||
@@ -495,7 +521,6 @@ msgstr ""
|
||||
#: allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkview.html:44
|
||||
#: allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkview.html:92
|
||||
#: allianceauth/templates/allianceauth/top-menu.html:23
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:17
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:11
|
||||
msgid "Eve Time"
|
||||
msgstr ""
|
||||
@@ -799,7 +824,7 @@ msgstr ""
|
||||
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/audit.html:31
|
||||
#: allianceauth/optimer/templates/optimer/dashboard.ops.html:15
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:15
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:16
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
@@ -833,7 +858,7 @@ msgstr ""
|
||||
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html:29
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:56
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:116
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:119
|
||||
#: allianceauth/permissions_tool/templates/permissions_tool/audit.html:32
|
||||
msgid "Organization"
|
||||
msgstr ""
|
||||
@@ -845,7 +870,7 @@ msgstr ""
|
||||
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html:60
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:85
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:145
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:148
|
||||
#: allianceauth/permissions_tool/templates/permissions_tool/audit_row.html:18
|
||||
msgid "(unknown)"
|
||||
msgstr ""
|
||||
@@ -891,7 +916,7 @@ msgid "Hidden"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/groupmembership.html:45
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:19
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:16
|
||||
msgid "Open"
|
||||
msgstr ""
|
||||
|
||||
@@ -926,7 +951,7 @@ msgstr ""
|
||||
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/groups.html:36
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:57
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:117
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:120
|
||||
#: allianceauth/permissions_tool/templates/permissions_tool/audit.html:29
|
||||
#: allianceauth/services/modules/openfire/forms.py:6
|
||||
msgid "Group"
|
||||
@@ -980,20 +1005,21 @@ msgid "Group Membership"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:93
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:153
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:156
|
||||
msgid "Accept"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:103
|
||||
msgid "No group add requests."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:157
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:96
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:160
|
||||
#: allianceauth/hrapplications/templates/hrapplications/view.html:104
|
||||
msgid "Reject"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:166
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:106
|
||||
msgid "No group add requests."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/groupmanagement/templates/groupmanagement/index.html:169
|
||||
msgid "No group leave requests."
|
||||
msgstr ""
|
||||
|
||||
@@ -1366,16 +1392,18 @@ msgstr ""
|
||||
msgid "Super User"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/menu/templates/menu/menu-user.html:68
|
||||
#: allianceauth/menu/templates/menu/menu-user.html:70
|
||||
#: allianceauth/templates/allianceauth/top-menu-admin.html:9
|
||||
msgid "Admin"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/menu/templates/menu/menu-user.html:80
|
||||
#: allianceauth/menu/templates/menu/menu-user.html:82
|
||||
msgid "Sign Out"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/menu/templates/menu/menu-user.html:84
|
||||
#: allianceauth/menu/templates/menu/menu-user.html:86
|
||||
#: allianceauth/templates/allianceauth/top-menu-rh-default.html:17
|
||||
#: allianceauth/templates/allianceauth/top-menu-rh-default.html:18
|
||||
msgid "Sign In"
|
||||
msgstr ""
|
||||
|
||||
@@ -1458,7 +1486,6 @@ msgid "Doctrine"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/optimer/form.py:14
|
||||
#: allianceauth/optimer/templates/optimer/dashboard.ops.html:17
|
||||
#: allianceauth/optimer/templates/optimer/fleetoptable.html:13
|
||||
msgid "Start Time"
|
||||
msgstr ""
|
||||
@@ -1523,6 +1550,11 @@ msgstr ""
|
||||
msgid "Form Up System"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/optimer/templates/optimer/dashboard.ops.html:17
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:18
|
||||
msgid "EVE Time"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/optimer/templates/optimer/fleetoptable.html:14
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:12
|
||||
msgid "Local Time"
|
||||
@@ -1568,17 +1600,17 @@ msgstr ""
|
||||
msgid "Update fleet operation"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/optimer/views.py:89
|
||||
#: allianceauth/optimer/views.py:91
|
||||
#, python-format
|
||||
msgid "Created operation timer for %(opname)s."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/optimer/views.py:118
|
||||
#: allianceauth/optimer/views.py:120
|
||||
#, python-format
|
||||
msgid "Removed operation timer for %(opname)s."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/optimer/views.py:169
|
||||
#: allianceauth/optimer/views.py:171
|
||||
#, python-format
|
||||
msgid "Saved changes to operation timer for %(opname)s."
|
||||
msgstr ""
|
||||
@@ -1714,17 +1746,17 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/services/modules/discord/templates/services/discord/discord_service_ctrl.html:26
|
||||
#: allianceauth/services/modules/mumble/templates/services/mumble/mumble_service_ctrl.html:20
|
||||
#: allianceauth/services/modules/mumble/templates/services/mumble/mumble_service_ctrl.html:22
|
||||
msgid "Activate"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/services/modules/discord/templates/services/discord/discord_service_ctrl.html:32
|
||||
#: allianceauth/services/modules/mumble/templates/services/mumble/mumble_service_ctrl.html:32
|
||||
#: allianceauth/services/modules/mumble/templates/services/mumble/mumble_service_ctrl.html:34
|
||||
msgid "Reset Password"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/services/modules/discord/templates/services/discord/discord_service_ctrl.html:38
|
||||
#: allianceauth/services/modules/mumble/templates/services/mumble/mumble_service_ctrl.html:38
|
||||
#: allianceauth/services/modules/mumble/templates/services/mumble/mumble_service_ctrl.html:40
|
||||
msgid "Deactivate"
|
||||
msgstr ""
|
||||
|
||||
@@ -1804,12 +1836,12 @@ msgstr ""
|
||||
msgid "Deactivated IPSuite4 account."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/services/modules/mumble/templates/services/mumble/mumble_service_ctrl.html:26
|
||||
#: allianceauth/services/modules/mumble/templates/services/mumble/mumble_service_ctrl.html:28
|
||||
#: allianceauth/services/templates/services/service_password.html:26
|
||||
msgid "Set Password"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/services/modules/mumble/templates/services/mumble/mumble_service_ctrl.html:44
|
||||
#: allianceauth/services/modules/mumble/templates/services/mumble/mumble_service_ctrl.html:46
|
||||
msgid "Connect"
|
||||
msgstr ""
|
||||
|
||||
@@ -2367,56 +2399,60 @@ msgstr ""
|
||||
msgid "Saved changes to SRP fleet %(fleetname)s"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:11
|
||||
#: allianceauth/templates/allianceauth/admin-status/esi_check.html:4
|
||||
msgid "Your Server received an ESI error response code of "
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:8
|
||||
msgid "Alliance Auth Notifications"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:21
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:18
|
||||
msgid "Closed"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:27
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:24
|
||||
msgid "No notifications at this time"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:36
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:33
|
||||
msgid "Powered by GitLab"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:42
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:39
|
||||
msgid "Support Discord"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:59
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:63
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:53
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:57
|
||||
msgid "Software Version"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:66
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:60
|
||||
msgid "Current"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:73
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:67
|
||||
msgid "Latest Stable"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:78
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:72
|
||||
msgid "Update available"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:86
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:80
|
||||
msgid "Latest Pre-Release"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:91
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:85
|
||||
msgid "Pre-Release available"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:102
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:95
|
||||
msgid "Task Queue"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:107
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:100
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
@@ -2425,11 +2461,11 @@ msgid ""
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:123
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:116
|
||||
msgid "running"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:124
|
||||
#: allianceauth/templates/allianceauth/admin-status/overview.html:117
|
||||
msgid "queued"
|
||||
msgstr ""
|
||||
|
||||
@@ -2458,105 +2494,203 @@ msgstr ""
|
||||
msgid "Select Theme"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:53
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:172
|
||||
msgid "Other"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:54
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:38
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:44
|
||||
msgid "Friendly"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:55
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:33
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:38
|
||||
msgid "Hostile"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:56
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:43
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:50
|
||||
msgid "Neutral"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:58
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:13
|
||||
#: allianceauth/timerboard/form.py:36
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:14
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:7
|
||||
msgid "Details"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:60
|
||||
#: allianceauth/timerboard/form.py:38
|
||||
msgid "Planet/Moon"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:61
|
||||
#: allianceauth/timerboard/form.py:39
|
||||
msgid "Structure Type"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:62
|
||||
#: allianceauth/timerboard/form.py:40
|
||||
msgid "Timer Type"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:63
|
||||
#: allianceauth/timerboard/form.py:41
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:8
|
||||
msgid "Objective"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:64
|
||||
#: allianceauth/timerboard/form.py:42
|
||||
msgid "Absolute Timer"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:65
|
||||
#: allianceauth/timerboard/form.py:43
|
||||
msgid "Date and Time"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:66
|
||||
#: allianceauth/timerboard/form.py:44
|
||||
msgid "Days Remaining"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:67
|
||||
#: allianceauth/timerboard/form.py:45
|
||||
msgid "Hours Remaining"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:69
|
||||
#: allianceauth/timerboard/form.py:47
|
||||
msgid "Minutes Remaining"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:71
|
||||
#: allianceauth/timerboard/form.py:48
|
||||
msgid "Important"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/form.py:72
|
||||
#: allianceauth/timerboard/form.py:49
|
||||
msgid "Corp-Restricted"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:13
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:39
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:36
|
||||
msgid "Friendly"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:14
|
||||
msgid "Not Specified"
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:34
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:34
|
||||
msgid "Hostile"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:15
|
||||
msgid "Shield"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:16
|
||||
msgid "Armor"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:17
|
||||
msgid "Hull"
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:44
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:38
|
||||
msgid "Neutral"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:18
|
||||
msgid "Final"
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:48
|
||||
msgid "POCO"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:19
|
||||
msgid "Anchoring"
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:50
|
||||
msgid "Orbital Skyhook"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:20
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:52
|
||||
msgid "I-HUB"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:21
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:54
|
||||
msgid "TCU"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:22
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:56
|
||||
msgid "POS [S]"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:23
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:58
|
||||
msgid "POS [M]"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:24
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:60
|
||||
msgid "POS [L]"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:25
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:62
|
||||
msgid "Astrahus"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:26
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:64
|
||||
msgid "Fortizar"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:27
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:66
|
||||
msgid "Keepstar"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:28
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:68
|
||||
msgid "Raitaru"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:29
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:70
|
||||
msgid "Azbel"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:30
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:72
|
||||
msgid "Sotiyo"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:31
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:74
|
||||
msgid "Athanor"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:32
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:76
|
||||
msgid "Tatara"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:33
|
||||
msgid "Pharolux Cyno Beacon"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:34
|
||||
msgid "Tenebrex Cyno Jammer"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:35
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:82
|
||||
msgid "Ansiblex Jump Gate"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:36
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:84
|
||||
msgid "Moon Mining Cycle"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:37
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:86
|
||||
msgid "Metenox Moon Drill"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:38
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:88
|
||||
msgid "Other"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:45
|
||||
msgid "Not Specified"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:46
|
||||
msgid "Shield"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:47
|
||||
msgid "Armor"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:48
|
||||
msgid "Hull"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:49
|
||||
msgid "Final"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:50
|
||||
msgid "Anchoring"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/models.py:51
|
||||
msgid "Unanchoring"
|
||||
msgstr ""
|
||||
|
||||
@@ -2565,7 +2699,7 @@ msgstr ""
|
||||
msgid "Upcoming Timers"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:14
|
||||
#: allianceauth/timerboard/templates/timerboard/dashboard.timers.html:15
|
||||
msgid "Timer"
|
||||
msgstr ""
|
||||
|
||||
@@ -2609,78 +2743,14 @@ msgstr ""
|
||||
msgid "Structure"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:64
|
||||
msgid "POCO"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:70
|
||||
msgid "I-HUB"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:76
|
||||
msgid "TCU"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:82
|
||||
msgid "POS [S]"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:88
|
||||
msgid "POS [M]"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:94
|
||||
msgid "POS [L]"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:100
|
||||
msgid "Astrahus"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:106
|
||||
msgid "Fortizar"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:112
|
||||
msgid "Keepstar"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:118
|
||||
msgid "Raitaru"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:124
|
||||
msgid "Azbel"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:130
|
||||
msgid "Sotiyo"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:136
|
||||
msgid "Athanor"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:142
|
||||
msgid "Tatara"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:148
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:78
|
||||
msgid "Cyno Beacon"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:154
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:80
|
||||
msgid "Cyno Jammer"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:160
|
||||
msgid "Ansiblex Jump Gate"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/timertable.html:166
|
||||
msgid "Moon Mining Cycle"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/templates/timerboard/view.html:9
|
||||
msgid "Structure Timer Management"
|
||||
msgstr ""
|
||||
@@ -2693,12 +2763,12 @@ msgstr ""
|
||||
msgid "Past Timers"
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/views.py:78
|
||||
#: allianceauth/timerboard/views.py:85
|
||||
#, python-format
|
||||
msgid "Added new timer in %(system)s at %(time)s."
|
||||
msgstr ""
|
||||
|
||||
#: allianceauth/timerboard/views.py:87
|
||||
#: allianceauth/timerboard/views.py:95
|
||||
msgid "Saved changes to the timer."
|
||||
msgstr ""
|
||||
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
allianceauth/locale/nl/LC_MESSAGES/django.mo
Normal file
BIN
allianceauth/locale/nl/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
2789
allianceauth/locale/nl/LC_MESSAGES/django.po
Normal file
2789
allianceauth/locale/nl/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load Diff
BIN
allianceauth/locale/pl_PL/LC_MESSAGES/django.mo
Normal file
BIN
allianceauth/locale/pl_PL/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
2848
allianceauth/locale/pl_PL/LC_MESSAGES/django.po
Normal file
2848
allianceauth/locale/pl_PL/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@
|
||||
{% endif %}>
|
||||
</i>
|
||||
<a
|
||||
class="nav-link flex-fill align-self-center me-auto"
|
||||
class="nav-link flex-fill align-self-center me-auto {% if item.navactive %}{% navactive request item.navactive|join:' ' %}{% endif %}"
|
||||
{% if item.is_folder %}
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
|
||||
@@ -60,15 +60,17 @@
|
||||
<li>
|
||||
<a class="dropdown-item" href="https://discord.gg/fjnHAmk" title="Alliance Auth Discord"><i class="fa-brands fa-discord fa-fw"></i> Alliance Auth Discord</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="https://gitlab.com/allianceauth/allianceauth" title="Alliance Auth Git"><i class="fa-brands fa-gitlab fa-fw"></i> Alliance Auth Git</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="{% url 'admin:index' %}">
|
||||
<i class="fa-solid fa-gear fa-fw"></i> {% translate "Admin" %}
|
||||
</a>
|
||||
<a class="dropdown-item" href="https://gitlab.com/allianceauth/allianceauth" title="Alliance Auth Git"><i class="fa-brands fa-gitlab fa-fw"></i> Alliance Auth Git</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if user.is_staff %}
|
||||
<li>
|
||||
<a class="dropdown-item" href="{% url 'admin:index' %}">
|
||||
<i class="fa-solid fa-gear fa-fw"></i> {% translate "Admin" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
{% if user.is_authenticated %}
|
||||
<li>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<ul 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">
|
||||
<i class="nav-link fas fa-tachometer-alt fa-fw align-self-center me-3 {% navactive request 'authentication:dashboard' %}"></i>
|
||||
<a class="nav-link flex-fill align-self-center" href="{% url 'authentication:dashboard' %}">
|
||||
<a class="nav-link flex-fill align-self-center {% navactive request 'authentication:dashboard' %}" href="{% url 'authentication:dashboard' %}">
|
||||
{% translate "Dashboard" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -98,6 +98,10 @@ def render_menu(request: HttpRequest) -> List[RenderedMenuItem]:
|
||||
|
||||
if item.is_app_item:
|
||||
rendered_item = _render_app_item(request, hook_items, item, bs5_template)
|
||||
if rendered_item.html == "":
|
||||
# If there is no content dont render it.
|
||||
# This item has probably been hidden by permissions
|
||||
continue
|
||||
elif item.is_link_item:
|
||||
rendered_item = _render_link_item(request, item, bs5_template)
|
||||
elif item.is_folder:
|
||||
|
||||
@@ -19,6 +19,11 @@ def create_user(permissions=None, **kwargs) -> User:
|
||||
return user
|
||||
|
||||
|
||||
def create_menu_item_hook_class(**kwargs) -> MenuItemHook:
|
||||
num = next(counter_menu_item_hook)
|
||||
return type(f"GeneratedMenuItem{num}", (MenuItemHook,), {})
|
||||
|
||||
|
||||
def create_menu_item_hook(**kwargs) -> MenuItemHook:
|
||||
num = next(counter_menu_item_hook)
|
||||
new_class = type(f"GeneratedMenuItem{num}", (MenuItemHook,), {})
|
||||
|
||||
@@ -14,6 +14,7 @@ from allianceauth.menu.tests.factories import (
|
||||
create_folder_menu_item,
|
||||
create_link_menu_item,
|
||||
create_menu_item_from_hook,
|
||||
create_menu_item_hook_class,
|
||||
create_menu_item_hook_function,
|
||||
create_rendered_menu_item,
|
||||
)
|
||||
@@ -177,6 +178,44 @@ class TestRenderDefaultMenu(TestCase):
|
||||
self.assertEqual(menu[0].menu_item.text, "Alpha")
|
||||
self.assertEqual(menu[1].menu_item.text, "Bravo")
|
||||
|
||||
def test_should_remove_empty_folders_with_items_hidden(self, mock_get_hooks):
|
||||
# given
|
||||
|
||||
class TestHook(create_menu_item_hook_class()):
|
||||
text = "Dummy App No Data"
|
||||
classes = "fa-solid fa-users-gear"
|
||||
url_name = "groupmanagement:management"
|
||||
|
||||
def render(Self, request):
|
||||
# simulate no perms
|
||||
return ""
|
||||
|
||||
params = {
|
||||
"text": "Alpha",
|
||||
"classes": "fa-solid fa-users-gear",
|
||||
"url_name": "groupmanagement:management",
|
||||
}
|
||||
|
||||
alpha = TestHook(**params)
|
||||
|
||||
hooks = [lambda: alpha]
|
||||
|
||||
mock_get_hooks.return_value = hooks
|
||||
|
||||
folder = create_folder_menu_item(text="Folder", order=2)
|
||||
create_menu_item_from_hook(hooks[0], parent=folder)
|
||||
create_link_menu_item(text="Bravo", order=3) # this is all that should show
|
||||
|
||||
request = self.factory.get("/")
|
||||
|
||||
# when
|
||||
result = render_menu(request)
|
||||
|
||||
# then
|
||||
menu = list(result)
|
||||
self.assertEqual(len(menu), 1)
|
||||
self.assertEqual(menu[0].menu_item.text, "Bravo")
|
||||
|
||||
def test_should_not_include_hidden_items(self, mock_get_hooks):
|
||||
# given
|
||||
mock_get_hooks.return_value = []
|
||||
@@ -196,7 +235,6 @@ class TestRenderDefaultMenu(TestCase):
|
||||
self.assertEqual(menu[1].menu_item.text, "Charlie")
|
||||
|
||||
def test_should_not_render_hidden_folders(self, mock_get_hooks):
|
||||
# given
|
||||
# given
|
||||
menu = [
|
||||
create_menu_item_hook_function(text="Charlie", count=42),
|
||||
|
||||
@@ -1,41 +1,40 @@
|
||||
{% load i18n %}
|
||||
{% load evelinks %}
|
||||
|
||||
<div class="col-12 align-self-stretch py-2">
|
||||
<div class="col-12 mb-3">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title text-center">{% translate "Upcoming Fleets" %}</h4>
|
||||
{% translate "Upcoming Fleets" as widget_title %}
|
||||
{% include "framework/dashboard/widget-title.html" with title=widget_title %}
|
||||
|
||||
<div class="card-body">
|
||||
<div style="height: 300px; overflow-y:auto;">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">{% translate "Operation" %}</th>
|
||||
<th class="text-center">{% translate "Type" %}</th>
|
||||
<th class="text-center">{% translate "Form Up System" %}</th>
|
||||
<th class="text-center">{% translate "EVE Time" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for ops in timers %}
|
||||
<tr>
|
||||
<th class="text-center">{% translate "Operation" %}</th>
|
||||
<th class="text-center">{% translate "Type" %}</th>
|
||||
<th class="text-center">{% translate "Form Up System" %}</th>
|
||||
<th class="text-center">{% translate "Start Time" %}</th>
|
||||
<td class="text-center">
|
||||
{{ ops.operation_name }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ ops.type }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{{ ops.system|dotlan_solar_system_url }}">{{ ops.system }}</a>
|
||||
</td>
|
||||
<td class="text-center" nowrap>{{ ops.start | date:"Y-m-d H:i" }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for ops in timers %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{{ ops.operation_name }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ ops.type }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{{ ops.system|dotlan_solar_system_url }}">{{ ops.system }}</a>
|
||||
</td>
|
||||
<td class="text-center" nowrap>{{ ops.start | date:"Y-m-d H:i" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,9 +14,11 @@ from .models import OpTimer, OpTimerType
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
OPS_VIEW_PERMISSION = 'auth.optimer_view'
|
||||
OPS_MANAGE_PERMISSION = 'auth.optimer_management'
|
||||
|
||||
@login_required
|
||||
@permission_required('auth.optimer_view')
|
||||
@permission_required(OPS_VIEW_PERMISSION)
|
||||
def optimer_view(request):
|
||||
"""
|
||||
View for the optimer management page
|
||||
@@ -39,7 +41,7 @@ def optimer_view(request):
|
||||
|
||||
|
||||
@login_required
|
||||
@permission_required('auth.optimer_management')
|
||||
@permission_required(OPS_MANAGE_PERMISSION)
|
||||
def add_optimer_view(request):
|
||||
"""
|
||||
View for the add optimer page
|
||||
@@ -98,7 +100,7 @@ def add_optimer_view(request):
|
||||
|
||||
|
||||
@login_required
|
||||
@permission_required('auth.optimer_management')
|
||||
@permission_required(OPS_MANAGE_PERMISSION)
|
||||
def remove_optimer(request, optimer_id):
|
||||
"""
|
||||
Remove optimer
|
||||
@@ -121,7 +123,7 @@ def remove_optimer(request, optimer_id):
|
||||
|
||||
|
||||
@login_required
|
||||
@permission_required('auth.optimer_management')
|
||||
@permission_required(OPS_MANAGE_PERMISSION)
|
||||
def edit_optimer(request, optimer_id):
|
||||
"""
|
||||
Edit optimer
|
||||
@@ -192,14 +194,22 @@ def dashboard_ops(request):
|
||||
:return:
|
||||
:rtype:
|
||||
"""
|
||||
if request.user.has_perm(OPS_VIEW_PERMISSION):
|
||||
base_query = OpTimer.objects.select_related('eve_character', 'type')
|
||||
timers = base_query.filter(
|
||||
start__gte=timezone.now()
|
||||
)[:5]
|
||||
|
||||
base_query = OpTimer.objects.select_related('eve_character', 'type')
|
||||
timers = base_query.filter(start__gte=timezone.now())[:5]
|
||||
|
||||
if timers.count():
|
||||
context = {
|
||||
'timers': timers,
|
||||
}
|
||||
return render_to_string('optimer/dashboard.ops.html', context=context, request=request)
|
||||
if timers.count():
|
||||
context = {
|
||||
'timers': timers,
|
||||
}
|
||||
return render_to_string(
|
||||
'optimer/dashboard.ops.html',
|
||||
context=context,
|
||||
request=request
|
||||
)
|
||||
else:
|
||||
return ""
|
||||
else:
|
||||
return ""
|
||||
|
||||
@@ -22,6 +22,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.staticfiles',
|
||||
'django.contrib.humanize',
|
||||
'django_celery_beat',
|
||||
'solo',
|
||||
'bootstrapform',
|
||||
'django_bootstrap5', # https://github.com/zostera/django-bootstrap5
|
||||
'sortedm2m',
|
||||
@@ -39,6 +40,7 @@ INSTALLED_APPS = [
|
||||
'allianceauth.theme.darkly',
|
||||
'allianceauth.theme.flatly',
|
||||
'allianceauth.theme.materia',
|
||||
"allianceauth.custom_css",
|
||||
]
|
||||
|
||||
SECRET_KEY = "wow I'm a really bad default secret key"
|
||||
@@ -102,6 +104,7 @@ LANGUAGES = (
|
||||
("ja", "Japanese"),
|
||||
("it", "Italian"),
|
||||
("uk", "Ukrainian"),
|
||||
("pl", "Polish"),
|
||||
)
|
||||
|
||||
TEMPLATES = [
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block url %}
|
||||
<a href="{{ service_url }}">{{ service_url }}</a>
|
||||
{% if username != '' %}
|
||||
<a href="mumble://{{ connect_url }}">{{ service_url }}</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block user %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% load i18n %}
|
||||
<div id="esi-alert" class="col-12 align-self-stretch py-2 collapse">
|
||||
<div id="esi-alert" class="col-12 collapse">
|
||||
<div class="alert alert-warning">
|
||||
<p class="text-center ">{% translate 'Your Server received an ESI error response code of ' %}<b id="esi-code">?</b></p>
|
||||
<hr>
|
||||
@@ -23,7 +23,7 @@
|
||||
console.log("ESI Check: ", JSON.stringify(responseJson, null, 2));
|
||||
|
||||
const status = responseJson.status;
|
||||
if (status != 200) {
|
||||
if (status !== 200) {
|
||||
elemCode.textContent = status
|
||||
elemMessage.textContent = responseJson.data.error;
|
||||
new bootstrap.Collapse(elemCard, {
|
||||
|
||||
@@ -2,48 +2,43 @@
|
||||
{% load humanize %}
|
||||
|
||||
{% if notifications %}
|
||||
<div id="aa-dashboard-panel-admin-notifications" class="col-12 align-self-stretch pb-2">
|
||||
<div id="aa-dashboard-panel-admin-notifications" class="col-12 mb-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="w-100 align-self-stretch">
|
||||
<h4 class="ms-auto me-auto text-center">
|
||||
{% translate "Alliance Auth Notifications" %}
|
||||
</h4>
|
||||
{% translate "Alliance Auth Notifications" as widget_title %}
|
||||
{% include "framework/dashboard/widget-title.html" with title=widget_title %}
|
||||
|
||||
<div class="card-body">
|
||||
<ul class="list-group">
|
||||
{% for notif in notifications %}
|
||||
<li class="list-group-item">
|
||||
{% if notif.state == 'opened' %}
|
||||
<span class="badge bg-success">{% translate "Open" %}</span>
|
||||
{% else %}
|
||||
<span class="badge bg-danger">{% translate "Closed" %}</span>
|
||||
{% endif %}
|
||||
<a href="{{ notif.web_url }}" target="_blank">#{{ notif.iid }} {{ notif.title }}</a>
|
||||
</li>
|
||||
{% empty %}
|
||||
<div class="alert alert-primary" role="alert">
|
||||
{% translate "No notifications at this time" %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<div class="text-end">
|
||||
<a href="https://gitlab.com/allianceauth/allianceauth/issues" target="_blank" class="me-1">
|
||||
<span class="badge" style="background-color: rgb(230 83 40);">
|
||||
<i class="fab fa-gitlab" aria-hidden="true"></i>
|
||||
{% translate 'Powered by GitLab' %}
|
||||
</span>
|
||||
</a>
|
||||
<a href="https://discord.com/invite/fjnHAmk" target="_blank">
|
||||
<span class="badge" style="background-color: rgb(110 133 211);">
|
||||
<i class="fab fa-discord" aria-hidden="true"></i>
|
||||
{% translate 'Support Discord' %}
|
||||
</span>
|
||||
</a>
|
||||
<div>
|
||||
<ul class="list-group">
|
||||
{% for notif in notifications %}
|
||||
<li class="list-group-item">
|
||||
{% if notif.state == 'opened' %}
|
||||
<span class="badge bg-success me-2">{% translate "Open" %}</span>
|
||||
{% else %}
|
||||
<span class="badge bg-danger me-2">{% translate "Closed" %}</span>
|
||||
{% endif %}
|
||||
<a href="{{ notif.web_url }}" target="_blank">#{{ notif.iid }} {{ notif.title }}</a>
|
||||
</li>
|
||||
{% empty %}
|
||||
<div class="alert alert-primary" role="alert">
|
||||
{% translate "No notifications at this time" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<div class="text-end pt-3">
|
||||
<a href="https://gitlab.com/allianceauth/allianceauth/issues" target="_blank" class="me-1 text-decoration-none">
|
||||
<span class="badge" style="background-color: rgb(230 83 40);">
|
||||
<i class="fab fa-gitlab" aria-hidden="true"></i>
|
||||
{% translate 'Powered by GitLab' %}
|
||||
</span>
|
||||
</a>
|
||||
<a href="https://discord.com/invite/fjnHAmk" target="_blank" class="text-decoration-none">
|
||||
<span class="badge" style="background-color: rgb(110 133 211);">
|
||||
<i class="fab fa-discord" aria-hidden="true"></i>
|
||||
{% translate 'Support Discord' %}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -51,25 +46,24 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="col-12 align-self-stretch pb-2">
|
||||
<div class="col-12 mb-3">
|
||||
<div class="card">
|
||||
<div class="card-body d-flex flex-row flex-wrap">
|
||||
<div class="card-body row">
|
||||
<div id="aa-dashboard-panel-software-version" class="col-xl-6 col-lg-12 col-md-12 col-sm-12">
|
||||
<h4 class="ms-auto me-auto text-center">
|
||||
{% translate "Software Version" %}
|
||||
</h4>
|
||||
{% translate "Software Version" as widget_title %}
|
||||
{% include "framework/dashboard/widget-title.html" with title=widget_title %}
|
||||
|
||||
<div class="card-body">
|
||||
<div>
|
||||
<ul class="list-group list-group-horizontal w-100" role="group" aria-label="{% translate 'Software Version' %}">
|
||||
<li class="list-group-item w-100">
|
||||
<div class="btn w-100 cursor-default">
|
||||
<div class="btn h-100 w-100 cursor-default">
|
||||
<h5 class="list-group-item-heading">{% translate "Current" %}</h5>
|
||||
<p class="list-group-item-text">{{ current_version }}</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="list-group-item bg-{% if latest_patch %}success{% elif latest_minor %}warning{% else %}danger{% endif %} w-100">
|
||||
<a class="btn w-100" href="https://gitlab.com/allianceauth/allianceauth/-/releases/v{{ latest_patch_version }}">
|
||||
<a class="btn h-100 w-100" href="https://gitlab.com/allianceauth/allianceauth/-/releases/v{{ latest_patch_version }}">
|
||||
<h5 class="list-group-item-heading">{% translate "Latest Stable" %}</h5>
|
||||
|
||||
<p class="list-group-item-text">
|
||||
@@ -82,7 +76,7 @@
|
||||
|
||||
{% if latest_beta %}
|
||||
<li class="list-group-item bg-info w-100">
|
||||
<a class="btn w-100" href="https://gitlab.com/allianceauth/allianceauth/-/releases/v{{ latest_beta_version }}">
|
||||
<a class="btn h-100 w-100" href="https://gitlab.com/allianceauth/allianceauth/-/releases/v{{ latest_beta_version }}">
|
||||
<h5 class="list-group-item-heading">{% translate "Latest Pre-Release" %}</h5>
|
||||
|
||||
<p class="list-group-item-text">
|
||||
@@ -98,11 +92,10 @@
|
||||
</div>
|
||||
|
||||
<div id="aa-dashboard-panel-task-queue" class="col-xl-6 col-lg-12 col-md-12 col-sm-12">
|
||||
<h4 class="ms-auto me-auto text-center">
|
||||
{% translate "Task Queue" %}
|
||||
</h4>
|
||||
{% translate "Task Queue" as widget_title %}
|
||||
{% include "framework/dashboard/widget-title.html" with title=widget_title %}
|
||||
|
||||
<div class="card-body">
|
||||
<div>
|
||||
<p>
|
||||
{% blocktranslate with total=tasks_total|intcomma latest=earliest_task|timesince|default:"?" %}
|
||||
Status of {{ total }} processed tasks • last {{ latest }}
|
||||
|
||||
@@ -29,56 +29,55 @@
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
.nav-padding {
|
||||
padding-top: {% header_padding_size %} !important;
|
||||
}
|
||||
{% endif %}
|
||||
.nav-padding {
|
||||
padding-top: {% header_padding_size %} !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% include 'custom_css/bundles/custom-css.html' %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% if user.is_authenticated %}
|
||||
<!-- Top Menu, Blocks don't work in "include" tagged views -->
|
||||
<nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-primary">
|
||||
<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="fa-solid fa-bars ms-2 me-2"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
<!-- Top Menu, Blocks don't work in "include" tagged views -->
|
||||
<nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-primary">
|
||||
<div class="container-fluid justify-content-start">
|
||||
<a class="navbar-brand" data-bs-toggle="collapse" data-bs-target="#sidebar" role="button">
|
||||
<i class="fa-solid fa-bars ms-2 me-2"></i>
|
||||
</a>
|
||||
|
||||
<div class="navbar-brand">
|
||||
{% block header_nav_brand %}{{ SITE_NAME }}{% endblock %}
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse ms-2 px-2" id="navbarexpand">
|
||||
<ul id="nav-left" class="nav navbar-nav me-auto">
|
||||
{% block header_nav_collapse_left %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
|
||||
<ul id="nav-right" class="nav navbar-nav">
|
||||
{% block header_nav_collapse_right %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
|
||||
<ul id="nav-right-character-control" class="nav navbar-nav">
|
||||
{% block header_nav_user_character_control %} <!-- Default to add char and swap main -->
|
||||
{% include 'allianceauth/top-menu-rh-default.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% include 'menu/menu-notification-block.html' %}
|
||||
</ul>
|
||||
</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="fa-solid fa-chevron-up"></i>
|
||||
</a>
|
||||
<div class="navbar-brand">
|
||||
{% block header_nav_brand %}{{ SITE_NAME }}{% endblock %}
|
||||
</div>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
<div class="collapse navbar-collapse ms-2 px-2" id="navbarexpand">
|
||||
<ul id="nav-left" class="nav navbar-nav me-auto">
|
||||
{% block header_nav_collapse_left %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
|
||||
<ul id="nav-right" class="nav navbar-nav">
|
||||
{% block header_nav_collapse_right %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
|
||||
<ul id="nav-right-character-control" class="nav navbar-nav">
|
||||
{% block header_nav_user_character_control %} <!-- Default to add char and swap main -->
|
||||
{% include 'allianceauth/top-menu-rh-default.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
{% include 'menu/menu-notification-block.html' %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</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="fa-solid fa-chevron-up"></i>
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
<!-- End Top Menu -->
|
||||
|
||||
<!-- Body -->
|
||||
@@ -98,23 +97,27 @@
|
||||
|
||||
<script>
|
||||
(() => {
|
||||
// TODO Extend this to the groups in the sidebar too.
|
||||
// TODO Move to own JS file
|
||||
const sidebar = document.getElementById('sidebar');
|
||||
|
||||
sidebar.addEventListener("shown.bs.collapse", () => {
|
||||
localStorage.removeItem("sidebar_" + sidebar.id);
|
||||
sidebar.addEventListener('shown.bs.collapse', () => {
|
||||
localStorage.removeItem('sidebar_' + sidebar.id);
|
||||
});
|
||||
|
||||
sidebar.addEventListener("hidden.bs.collapse", () => {
|
||||
localStorage.setItem("sidebar_" + sidebar.id, true);
|
||||
sidebar.addEventListener('hidden.bs.collapse', () => {
|
||||
localStorage.setItem('sidebar_' + sidebar.id, 'closed');
|
||||
});
|
||||
|
||||
if (localStorage.getItem("sidebar_" + sidebar.id) === "true") {
|
||||
sidebar.classList.remove("show")
|
||||
if (localStorage.getItem('sidebar_' + sidebar.id) === 'closed') {
|
||||
sidebar.classList.remove('show')
|
||||
} else {
|
||||
sidebar.classList.add("show")
|
||||
}
|
||||
|
||||
const activeChildMenuItem = document.querySelector('#sidebar-menu li ul li a.active');
|
||||
if (activeChildMenuItem) {
|
||||
activeChildMenuItem.parentElement.parentElement.classList.add('show');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,31 +1,37 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
|
||||
{% load theme_tags %}
|
||||
|
||||
{% block page_title %}
|
||||
{{ error_title }}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
{% include "framework/header/page-header.html" with title=error_title %}
|
||||
<div class="d-flex flex-column" style="height: calc(100vh - {% header_padding_size %}); margin-top: -1rem; margin-bottom: -1rem;">
|
||||
<div class="d-flex flex-grow-1 justify-content-center align-items-center">
|
||||
<div>
|
||||
{% include "framework/header/page-header.html" with title=error_title %}
|
||||
|
||||
<div class="text-center">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="150"
|
||||
height="150"
|
||||
fill="currentColor"
|
||||
class="bi bi-exclamation-triangle"
|
||||
viewBox="0 0 16 16"
|
||||
>
|
||||
<path
|
||||
d="M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017.163.163 0 0 1-.054-.06.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z"
|
||||
/>
|
||||
<path
|
||||
d="M7.002 12a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995z"
|
||||
/>
|
||||
</svg>
|
||||
<div class="text-center">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="150"
|
||||
height="150"
|
||||
fill="currentColor"
|
||||
class="bi bi-exclamation-triangle"
|
||||
viewBox="0 0 16 16"
|
||||
>
|
||||
<path
|
||||
d="M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017.163.163 0 0 1-.054-.06.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z"
|
||||
/>
|
||||
<path
|
||||
d="M7.002 12a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995z"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<p class="text-center">{{ error_message }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="text-center">{{ error_message }}</p>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
<a href="{% url 'authentication:add_character' %}" class="nav-link" title="{% translate 'Add Character' %}">
|
||||
<i class="fa-solid fa-plus"></i>
|
||||
@@ -12,3 +12,10 @@
|
||||
<span class="d-lg-none d-md-inline m-2">{% translate "Change Main" %}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="nav-item">
|
||||
<a href="{% url 'authentication:login' %}" class="nav-link" title="{% translate 'Sign In' %}">
|
||||
<i class="fa-solid fa-right-to-bracket fa-fw "></i> {% translate "Sign In" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
@@ -4,7 +4,7 @@ from django.apps import AppConfig
|
||||
class BootstrapThemeConfig(AppConfig):
|
||||
name = "allianceauth.theme.bootstrap"
|
||||
label = "bootstrap"
|
||||
version = "5.3.0"
|
||||
version = "5.3.3"
|
||||
verbose_name = f"Bootstrap v{version}"
|
||||
|
||||
def ready(self):
|
||||
|
||||
@@ -3,16 +3,16 @@ from allianceauth.theme.hooks import ThemeHook
|
||||
|
||||
|
||||
CSS_STATICS = [{
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/css/bootstrap.min.css",
|
||||
"integrity": "sha512-b2QcS5SsA8tZodcDtGRELiGv5SaKSk1vDHDaQRda0htPYWZ6046lr3kJ5bAAQdpV2mmA/4v0wQF9MyU6/pDIAg=="
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css",
|
||||
"integrity": "sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg=="
|
||||
}]
|
||||
|
||||
JS_STATICS = [{
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.8/umd/popper.min.js",
|
||||
"integrity": "sha512-TPh2Oxlg1zp+kz3nFA0C5vVC6leG/6mm1z9+mA81MI5eaUVqasPLO8Cuk4gMF4gUfP5etR73rgU/8PNMsSesoQ=="
|
||||
}, {
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/js/bootstrap.min.js",
|
||||
"integrity": "sha512-WW8/jxkELe2CAiE4LvQfwm1rajOS8PHasCCx+knHG0gBHt8EXxS6T6tJRTGuDQVnluuAvMxWF4j8SNFDKceLFg=="
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.min.js",
|
||||
"integrity": "sha512-ykZ1QQr0Jy/4ZkvKuqWn4iF3lqPZyij9iRv6sGqLRdTPkY69YX6+7wvVGmsdBbiIfN/8OdsI7HABjvEok6ZopQ=="
|
||||
}]
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ class BootstrapThemeHook(ThemeHook):
|
||||
self,
|
||||
"Bootstrap",
|
||||
"Powerful, extensible, and feature-packed frontend toolkit.",
|
||||
html_tags={"data-theme": "bootstrap"},
|
||||
css=CSS_STATICS,
|
||||
js=JS_STATICS,
|
||||
header_padding="3.5em"
|
||||
@@ -44,9 +45,9 @@ class BootstrapDarkThemeHook(ThemeHook):
|
||||
self,
|
||||
"Bootstrap Dark",
|
||||
"Powerful, extensible, and feature-packed frontend toolkit.",
|
||||
html_tags={"data-theme": "bootstrap-dark"},
|
||||
css=CSS_STATICS,
|
||||
js=JS_STATICS,
|
||||
html_tags="data-bs-theme=dark",
|
||||
header_padding="3.5em"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ from django.apps import AppConfig
|
||||
class DarklyThemeConfig(AppConfig):
|
||||
name = "allianceauth.theme.darkly"
|
||||
label = "darkly"
|
||||
version = "5.3.0"
|
||||
version = "5.3.3"
|
||||
verbose_name = f"Bootswatch Darkly v{version}"
|
||||
|
||||
def ready(self):
|
||||
|
||||
@@ -13,16 +13,17 @@ class DarklyThemeHook(ThemeHook):
|
||||
self,
|
||||
"Darkly",
|
||||
"Flatly in night mode!",
|
||||
html_tags={"data-theme": "darkly"},
|
||||
css=[{
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.2.3/darkly/bootstrap.min.css",
|
||||
"integrity": "sha512-YRcmztDXzJQCCBk2YUiEAY+r74gu/c9UULMPTeLsAp/Tw5eXiGkYMPC4tc4Kp1jx/V9xjEOCVpBe4r6Lx6n5dA=="
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.3.3/darkly/bootstrap.min.css",
|
||||
"integrity": "sha512-HDszXqSUU0om4Yj5dZOUNmtwXGWDa5ppESlX98yzbBS+z+3HQ8a/7kcdI1dv+jKq+1V5b01eYurE7+yFjw6Rdg=="
|
||||
}],
|
||||
js=[{
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.8/umd/popper.min.js",
|
||||
"integrity": "sha512-TPh2Oxlg1zp+kz3nFA0C5vVC6leG/6mm1z9+mA81MI5eaUVqasPLO8Cuk4gMF4gUfP5etR73rgU/8PNMsSesoQ=="
|
||||
}, {
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.3/js/bootstrap.min.js",
|
||||
"integrity": "sha512-1/RvZTcCDEUjY/CypiMz+iqqtaoQfAITmNSJY17Myp4Ms5mdxPS5UV7iOfdZoxcGhzFbOm6sntTKJppjvuhg4g=="
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.min.js",
|
||||
"integrity": "sha512-ykZ1QQr0Jy/4ZkvKuqWn4iF3lqPZyij9iRv6sGqLRdTPkY69YX6+7wvVGmsdBbiIfN/8OdsI7HABjvEok6ZopQ=="
|
||||
}],
|
||||
header_padding="4.5em"
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ from django.apps import AppConfig
|
||||
class FlatlyThemeConfig(AppConfig):
|
||||
name = "allianceauth.theme.flatly"
|
||||
label = "flatly"
|
||||
version = "5.3.0"
|
||||
version = "5.3.3"
|
||||
verbose_name = f"Bootswatch Flatly v{version}"
|
||||
|
||||
def ready(self):
|
||||
|
||||
@@ -13,16 +13,17 @@ class FlatlyThemeHook(ThemeHook):
|
||||
self,
|
||||
"Flatly",
|
||||
"Flat and modern!",
|
||||
html_tags={"data-theme": "flatly"},
|
||||
css=[{
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.3.2/flatly/bootstrap.min.css",
|
||||
"integrity": "sha512-rx+BMEjKes84XHg1erhvtq7Mqxm/lm6w4WMoCtDAaTMtUzT5iK5hNTu8mc2+yPNSldAX5hheN/ZhtNQjjYy5nA=="
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.3.3/flatly/bootstrap.min.css",
|
||||
"integrity": "sha512-qoT4KwnRpAQ9uczPsw7GunsNmhRnYwSlE2KRCUPRQHSkDuLulCtDXuC2P/P6oqr3M5hoGagUG9pgHDPkD2zCDA=="
|
||||
}],
|
||||
js=[{
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.8/umd/popper.min.js",
|
||||
"integrity": "sha512-TPh2Oxlg1zp+kz3nFA0C5vVC6leG/6mm1z9+mA81MI5eaUVqasPLO8Cuk4gMF4gUfP5etR73rgU/8PNMsSesoQ=="
|
||||
}, {
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/js/bootstrap.min.js",
|
||||
"integrity": "sha512-WW8/jxkELe2CAiE4LvQfwm1rajOS8PHasCCx+knHG0gBHt8EXxS6T6tJRTGuDQVnluuAvMxWF4j8SNFDKceLFg=="
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.min.js",
|
||||
"integrity": "sha512-ykZ1QQr0Jy/4ZkvKuqWn4iF3lqPZyij9iRv6sGqLRdTPkY69YX6+7wvVGmsdBbiIfN/8OdsI7HABjvEok6ZopQ=="
|
||||
}],
|
||||
header_padding="4.5em"
|
||||
)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from typing import List, Optional
|
||||
from typing import List, Optional, Union
|
||||
|
||||
|
||||
class ThemeHook:
|
||||
"""
|
||||
Theme hook for injecting a Bootstrap 5 Theme and associated JS into alliance auth.
|
||||
these can be local or CDN delivered
|
||||
Theme hook for injecting a Bootstrap 5 Theme and associated JS into alliance auth.
|
||||
These can be local or CDN delivered.
|
||||
"""
|
||||
|
||||
def __init__(self,
|
||||
@@ -14,7 +14,7 @@ class ThemeHook:
|
||||
js: List[dict],
|
||||
css_template: Optional[str] = None,
|
||||
js_template: Optional[str] = None,
|
||||
html_tags: Optional[str] = "",
|
||||
html_tags: Optional[Union[dict, str]] = None,
|
||||
header_padding: Optional[str] = "4em"):
|
||||
"""
|
||||
:param name: Theme python name
|
||||
@@ -29,6 +29,10 @@ class ThemeHook:
|
||||
:type css_template: Optional[str], optional
|
||||
:param js_template: _description_, defaults to None
|
||||
:type js_template: Optional[str], optional
|
||||
:param html_tags: Attributes added to the `<html>` tag, defaults to None
|
||||
:type html_tags: Optional[dict|str], optional
|
||||
:param header_padding: Top padding, defaults to "4em"
|
||||
:type header_padding: Optional[str], optional
|
||||
"""
|
||||
self.name = name
|
||||
self.description = description
|
||||
@@ -41,7 +45,11 @@ class ThemeHook:
|
||||
self.css_template = css_template
|
||||
self.js_template = js_template
|
||||
|
||||
self.html_tags = html_tags
|
||||
self.html_tags = (
|
||||
" ".join([f"{key}={value}" for key, value in html_tags.items()])
|
||||
if isinstance(html_tags, dict)
|
||||
else html_tags
|
||||
)
|
||||
self.header_padding = header_padding
|
||||
def get_name(self):
|
||||
return f"{self.__class__.__module__}.{self.__class__.__name__}"
|
||||
|
||||
@@ -4,7 +4,7 @@ from django.apps import AppConfig
|
||||
class MateriaThemeConfig(AppConfig):
|
||||
name = "allianceauth.theme.materia"
|
||||
label = "materia"
|
||||
version = "5.3.0"
|
||||
version = "5.3.3"
|
||||
verbose_name = f"Bootswatch Materia v{version}"
|
||||
|
||||
def ready(self):
|
||||
|
||||
@@ -13,16 +13,17 @@ class MateriaThemeHook(ThemeHook):
|
||||
self,
|
||||
"Materia",
|
||||
"Material is the metaphor",
|
||||
html_tags={"data-theme": "materia"},
|
||||
css=[{
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.3.2/materia/bootstrap.min.css",
|
||||
"integrity": "sha512-4+PCWoNUxEeasuW2ipP8Avsr7X/oS61Kz2CLdwS6ZfHt7jLuzAAcIfPlWLg4aGaDNo0GSmTOmM9biaqnmo6P7g=="
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.3.3/materia/bootstrap.min.css",
|
||||
"integrity": "sha512-2S9Do+uTmZmmJpdmAcOKdUrK/YslcvAuRfIF2ws8+BW9AvZXMRZM+o8Wq+PZrfISD6ZlIaeCWWZAdeprXIoYuQ=="
|
||||
}],
|
||||
js=[{
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.8/umd/popper.min.js",
|
||||
"integrity": "sha512-TPh2Oxlg1zp+kz3nFA0C5vVC6leG/6mm1z9+mA81MI5eaUVqasPLO8Cuk4gMF4gUfP5etR73rgU/8PNMsSesoQ=="
|
||||
}, {
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/js/bootstrap.min.js",
|
||||
"integrity": "sha512-WW8/jxkELe2CAiE4LvQfwm1rajOS8PHasCCx+knHG0gBHt8EXxS6T6tJRTGuDQVnluuAvMxWF4j8SNFDKceLFg=="
|
||||
"url": "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.min.js",
|
||||
"integrity": "sha512-ykZ1QQr0Jy/4ZkvKuqWn4iF3lqPZyij9iRv6sGqLRdTPkY69YX6+7wvVGmsdBbiIfN/8OdsI7HABjvEok6ZopQ=="
|
||||
}],
|
||||
header_padding="5.25em"
|
||||
)
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import logging
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
from django import forms
|
||||
from django.utils import timezone
|
||||
from django.core.validators import MaxValueValidator, MinValueValidator
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from .models import Timer, TimerType
|
||||
from .models import Timer
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -32,54 +33,28 @@ class TimerForm(forms.ModelForm):
|
||||
kwargs.update({'initial': initial})
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
structure_choices = [('POCO', 'POCO'),
|
||||
('I-HUB', 'I-HUB'),
|
||||
('TCU', 'TCU'),
|
||||
('POS[S]', 'POS[S]'),
|
||||
('POS[M]', 'POS[M]'),
|
||||
('POS[L]', 'POS[L]'),
|
||||
('Astrahus', 'Astrahus'),
|
||||
('Fortizar', 'Fortizar'),
|
||||
('Keepstar', 'Keepstar'),
|
||||
('Raitaru', 'Raitaru'),
|
||||
('Azbel', 'Azbel'),
|
||||
('Sotiyo', 'Sotiyo'),
|
||||
('Athanor', 'Athanor'),
|
||||
('Tatara', 'Tatara'),
|
||||
('Pharolux Cyno Beacon', 'Pharolux Cyno Beacon'),
|
||||
('Tenebrex Cyno Jammer', 'Tenebrex Cyno Jammer'),
|
||||
('Ansiblex Jump Gate', 'Ansiblex Jump Gate'),
|
||||
('Moon Mining Cycle', 'Moon Mining Cycle'),
|
||||
(_('Other'), _('Other'))]
|
||||
objective_choices = [('Friendly', _('Friendly')),
|
||||
('Hostile', _('Hostile')),
|
||||
('Neutral', _('Neutral'))]
|
||||
|
||||
details = forms.CharField(max_length=254, required=True, label=_('Details'))
|
||||
system = forms.CharField(max_length=254, required=True, label=_("System"))
|
||||
planet_moon = forms.CharField(max_length=254, label=_("Planet/Moon"), required=False, initial="")
|
||||
structure = forms.ChoiceField(choices=structure_choices, required=True, label=_("Structure Type"))
|
||||
timer_type = forms.ChoiceField(choices=TimerType.choices, label=_("Timer Type"))
|
||||
objective = forms.ChoiceField(choices=objective_choices, required=True, label=_("Objective"))
|
||||
structure = forms.ChoiceField(choices=Timer.Structure.choices, required=True, label=_("Structure Type"))
|
||||
timer_type = forms.ChoiceField(choices=Timer.TimerType.choices, label=_("Timer Type"))
|
||||
objective = forms.ChoiceField(choices=Timer.Objective.choices, required=True, label=_("Objective"))
|
||||
absolute_checkbox = forms.BooleanField(label=_("Absolute Timer"), required=False, initial=False)
|
||||
absolute_time = forms.CharField(required=False,label=_("Date and Time"))
|
||||
days_left = forms.IntegerField(required=False, label=_("Days Remaining"), validators=[MinValueValidator(0)])
|
||||
hours_left = forms.IntegerField(required=False, label=_("Hours Remaining"),
|
||||
validators=[MinValueValidator(0), MaxValueValidator(23)])
|
||||
minutes_left = forms.IntegerField(required=False, label=_("Minutes Remaining"),
|
||||
validators=[MinValueValidator(0), MaxValueValidator(59)])
|
||||
minutes_left = forms.IntegerField(required=False, label=_("Minutes Remaining"), validators=[MinValueValidator(0), MaxValueValidator(59)])
|
||||
important = forms.BooleanField(label=_("Important"), required=False)
|
||||
corp_timer = forms.BooleanField(label=_("Corp-Restricted"), required=False)
|
||||
|
||||
|
||||
def save(self, commit=True):
|
||||
timer = super().save(commit=False)
|
||||
|
||||
# Get character
|
||||
character = self.user.profile.main_character
|
||||
corporation = character.corporation
|
||||
logger.debug("Determined timer save request on behalf "
|
||||
"of character {} corporation {}".format(character, corporation))
|
||||
logger.debug(f"Determined timer save request on behalf of character {character} corporation {corporation}")
|
||||
|
||||
days_left = self.cleaned_data['days_left']
|
||||
hours_left = self.cleaned_data['hours_left']
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 4.2 on 2024-09-09 03:45
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('timerboard', '0005_alter_timer_planet_moon'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='timer',
|
||||
name='objective',
|
||||
field=models.CharField(choices=[('Friendly', 'Friendly'), ('Hostile', 'Hostile'), ('Neutral', 'Neutral')], default='Neutral', max_length=254),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='timer',
|
||||
name='structure',
|
||||
field=models.CharField(choices=[('POCO', 'POCO'), ('Orbital Skyhook', 'Orbital Skyhook'), ('I-HUB', 'I-HUB'), ('TCU', 'TCU'), ('POS[S]', 'POS [S]'), ('POS[M]', 'POS [M]'), ('POS[L]', 'POS [L]'), ('Astrahus', 'Astrahus'), ('Fortizar', 'Fortizar'), ('Keepstar', 'Keepstar'), ('Raitaru', 'Raitaru'), ('Azbel', 'Azbel'), ('Sotiyo', 'Sotiyo'), ('Athanor', 'Athanor'), ('Tatara', 'Tatara'), ('Pharolux Cyno Beacon', 'Pharolux Cyno Beacon'), ('Tenebrex Cyno Jammer', 'Tenebrex Cyno Jammer'), ('Ansiblex Jump Gate', 'Ansiblex Jump Gate'), ('Moon Mining Cycle', 'Moon Mining Cycle'), ('Metenox Moon Drill', 'Metenox Moon Drill'), ('Other', 'Other')], default='Other', max_length=254),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='timer',
|
||||
name='timer_type',
|
||||
field=models.CharField(choices=[('UNSPECIFIED', 'Not Specified'), ('SHIELD', 'Shield'), ('ARMOR', 'Armor'), ('HULL', 'Hull'), ('FINAL', 'Final'), ('ANCHORING', 'Anchoring'), ('UNANCHORING', 'Unanchoring'), ('ABANDONED', 'Abandoned')], default='UNSPECIFIED', max_length=254),
|
||||
),
|
||||
]
|
||||
@@ -6,34 +6,63 @@ from allianceauth.eveonline.models import EveCharacter
|
||||
from allianceauth.eveonline.models import EveCorporationInfo
|
||||
|
||||
|
||||
class TimerType(models.TextChoices):
|
||||
"""
|
||||
Choices for Timer Type
|
||||
"""
|
||||
|
||||
UNSPECIFIED = "UNSPECIFIED", _("Not Specified")
|
||||
SHIELD = "SHIELD", _("Shield")
|
||||
ARMOR = "ARMOR", _("Armor")
|
||||
HULL = "HULL", _("Hull")
|
||||
FINAL = "FINAL", _("Final")
|
||||
ANCHORING = "ANCHORING", _("Anchoring")
|
||||
UNANCHORING = "UNANCHORING", _("Unanchoring")
|
||||
|
||||
|
||||
class Timer(models.Model):
|
||||
class Meta:
|
||||
ordering = ['eve_time']
|
||||
class Objective(models.TextChoices):
|
||||
"""
|
||||
Choices for Objective Type
|
||||
"""
|
||||
|
||||
FRIENDLY = "Friendly", _("Friendly")
|
||||
HOSTILE = "Hostile", _("Hostile")
|
||||
NEUTRAL = "Neutral", _("Neutral")
|
||||
|
||||
class Structure(models.TextChoices):
|
||||
"""
|
||||
Choices for Structure Type
|
||||
"""
|
||||
|
||||
POCO = "POCO", _("POCO")
|
||||
ORBITALSKYHOOK = "Orbital Skyhook", _("Orbital Skyhook")
|
||||
IHUB = "I-HUB", _("I-HUB")
|
||||
TCU = "TCU", _("TCU") # Pending Remval
|
||||
POSS = "POS[S]", _("POS [S]")
|
||||
POSM = "POS[M]", _("POS [M]")
|
||||
POSL = "POS[L]", _("POS [L]")
|
||||
ASTRAHUS = "Astrahus", _("Astrahus")
|
||||
FORTIZAR = "Fortizar", _("Fortizar")
|
||||
KEEPSTAR = "Keepstar", _("Keepstar")
|
||||
RAITARU = "Raitaru", _("Raitaru")
|
||||
AZBEL = "Azbel", _("Azbel")
|
||||
SOTIYO = "Sotiyo", _("Sotiyo")
|
||||
ATHANOR = "Athanor", _("Athanor")
|
||||
TATARA = "Tatara", _("Tatara")
|
||||
PHAROLUX = "Pharolux Cyno Beacon", _("Pharolux Cyno Beacon")
|
||||
TENEBREX = "Tenebrex Cyno Jammer", _("Tenebrex Cyno Jammer")
|
||||
ANSIBLEX = "Ansiblex Jump Gate", _("Ansiblex Jump Gate")
|
||||
MOONPOP = "Moon Mining Cycle", _("Moon Mining Cycle")
|
||||
METENOX = "Metenox Moon Drill", _("Metenox Moon Drill")
|
||||
OTHER = "Other", _("Other")
|
||||
|
||||
class TimerType(models.TextChoices):
|
||||
"""
|
||||
Choices for Timer Type
|
||||
"""
|
||||
|
||||
UNSPECIFIED = "UNSPECIFIED", _("Not Specified")
|
||||
SHIELD = "SHIELD", _("Shield")
|
||||
ARMOR = "ARMOR", _("Armor")
|
||||
HULL = "HULL", _("Hull")
|
||||
FINAL = "FINAL", _("Final")
|
||||
ANCHORING = "ANCHORING", _("Anchoring")
|
||||
UNANCHORING = "UNANCHORING", _("Unanchoring")
|
||||
ABANDONED = "ABANDONED", _("Abandoned")
|
||||
|
||||
details = models.CharField(max_length=254, default="")
|
||||
system = models.CharField(max_length=254, default="")
|
||||
planet_moon = models.CharField(max_length=254, blank=True, default="")
|
||||
structure = models.CharField(max_length=254, default="")
|
||||
timer_type = models.CharField(
|
||||
max_length=254,
|
||||
choices=TimerType.choices,
|
||||
default=TimerType.UNSPECIFIED,
|
||||
)
|
||||
objective = models.CharField(max_length=254, default="")
|
||||
structure = models.CharField(max_length=254,choices=Structure.choices,default=Structure.OTHER)
|
||||
timer_type = models.CharField(max_length=254,choices=TimerType.choices,default=TimerType.UNSPECIFIED)
|
||||
objective = models.CharField(max_length=254, choices=Objective.choices, default=Objective.NEUTRAL)
|
||||
eve_time = models.DateTimeField()
|
||||
important = models.BooleanField(default=False)
|
||||
eve_character = models.ForeignKey(EveCharacter, null=True, on_delete=models.SET_NULL)
|
||||
@@ -41,5 +70,8 @@ class Timer(models.Model):
|
||||
corp_timer = models.BooleanField(default=False)
|
||||
user = models.ForeignKey(User, null=True, on_delete=models.SET_NULL)
|
||||
|
||||
def __str__(self):
|
||||
def __str__(self) -> str:
|
||||
return str(self.system) + ' ' + str(self.details)
|
||||
|
||||
class Meta:
|
||||
ordering = ['eve_time']
|
||||
|
||||
@@ -1,59 +1,59 @@
|
||||
{% load i18n %}
|
||||
{% load evelinks %}
|
||||
|
||||
<div class="col-12 align-self-stretch py-2">
|
||||
<div class="col-12 mb-3">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title text-center">{% translate "Upcoming Timers" %}</h4>
|
||||
<div class="card-body">
|
||||
<div style="height: 300px; overflow-y:auto;">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">{% translate "Details" %}</th>
|
||||
<th class="text-center">{% translate "Timer" %}</th>
|
||||
<th class="text-center">{% translate "Type" %}</th>
|
||||
<th class="text-center">{% translate "System" %}</th>
|
||||
<th class="text-center">{% translate "Eve Time" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% translate "Upcoming Timers" as widget_title %}
|
||||
{% include "framework/dashboard/widget-title.html" with title=widget_title %}
|
||||
|
||||
<tbody>
|
||||
{% for timer in timers %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{{ timer.details }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ timer.get_timer_type_display }}
|
||||
</td>
|
||||
<td class="text-center" nowrap>
|
||||
{% 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" nowrap>{{ timer.eve_time | date:"Y-m-d H:i" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">{% translate "Details" %}</th>
|
||||
<th class="text-center">{% translate "Timer" %}</th>
|
||||
<th class="text-center">{% translate "Type" %}</th>
|
||||
<th class="text-center">{% translate "System" %}</th>
|
||||
<th class="text-center">{% translate "EVE Time" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for timer in timers %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{{ timer.details }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ timer.get_timer_type_display }}
|
||||
</td>
|
||||
<td class="text-center" nowrap>
|
||||
{% 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-secondary">
|
||||
{% 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" nowrap>{{ timer.eve_time | date:"Y-m-d H:i" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,174 +18,85 @@
|
||||
</tr>
|
||||
|
||||
{% for timer in timers %}
|
||||
{% if timer.important == True %}
|
||||
<tr class="danger">
|
||||
{% else %}
|
||||
<tr class="info">
|
||||
{% endif %}
|
||||
<tr class="{% if timer.important == True %}bg-danger bg-opacity-25{% else %}bg-info bg-opacity-25{% endif %}">
|
||||
|
||||
<td style="width: 150px;" class="text-center">
|
||||
{{ timer.details }}
|
||||
|
||||
{% if timer.timer_type != 'UNSPECIFIED' %}
|
||||
<br>({{ timer.get_timer_type_display }})
|
||||
<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>
|
||||
<div class="badge bg-danger">{% translate "Hostile" %}</div>
|
||||
{% elif timer.objective == "Friendly" %}
|
||||
<div class="badge bg-primary">{% translate "Friendly" %}</div>
|
||||
{% elif timer.objective == "Neutral" %}
|
||||
<div class="badge bg-secondary">{% translate "Neutral" %}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
<a href="{{ timer.system|dotlan_solar_system_url }}">
|
||||
{{ timer.system }} {{ timer.planet_moon }}
|
||||
</a>
|
||||
<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>
|
||||
<div class="badge bg-info">{% translate "POCO" %}</div>
|
||||
{% elif timer.structure == "Orbital Skyhook" %}
|
||||
<div class="badge bg-warning">{% translate "Orbital Skyhook" %}</div>
|
||||
{% elif timer.structure == "I-HUB" %}
|
||||
<div class="badge bg-warning">{% translate "I-HUB" %}</div>
|
||||
{% elif timer.structure == "TCU" %} {% comment %} Pending Removal {% endcomment %}
|
||||
<div class="badge bg-secondary">{% translate "TCU" %}</div>
|
||||
{% elif timer.structure == "POS[S]" %}
|
||||
<div class="badge bg-info">{% translate "POS [S]" %}</div>
|
||||
{% elif timer.structure == "POS[M]" %}
|
||||
<div class="badge bg-info">{% translate "POS [M]" %}</div>
|
||||
{% elif timer.structure == "POS[L]" %}
|
||||
<div class="badge bg-info">{% translate "POS [L]" %}</div>
|
||||
{% elif timer.structure == "Citadel[M]" or timer.structure == "Astrahus" %}
|
||||
<div class="badge bg-danger">{% translate "Astrahus" %}</div>
|
||||
{% elif timer.structure == "Citadel[L]" or timer.structure == "Fortizar" %}
|
||||
<div class="badge bg-danger">{% translate "Fortizar" %}</div>
|
||||
{% elif timer.structure == "Citadel[XL]" or timer.structure == "Keepstar" %}
|
||||
<div class="badge bg-danger">{% translate "Keepstar" %}</div>
|
||||
{% elif timer.structure == "Engineering Complex[M]" or timer.structure == "Raitaru" %}
|
||||
<div class="badge bg-warning">{% translate "Raitaru" %}</div>
|
||||
{% elif timer.structure == "Engineering Complex[L]" or timer.structure == "Azbel" %}
|
||||
<div class="badge bg-warning">{% translate "Azbel" %}</div>
|
||||
{% elif timer.structure == "Engineering Complex[XL]" or timer.structure == "Sotiyo" %}
|
||||
<div class="badge bg-danger">{% translate "Sotiyo" %}</div>
|
||||
{% elif timer.structure == "Refinery[M]" or timer.structure == "Athanor" %}
|
||||
<div class="badge bg-warning">{% translate "Athanor" %}</div>
|
||||
{% elif timer.structure == "Refinery[L]" or timer.structure == "Tatara" %}
|
||||
<div class="badge bg-warning">{% translate "Tatara" %}</div>
|
||||
{% elif timer.structure == "Cyno Beacon" or timer.structure == "Pharolux Cyno Beacon" %}
|
||||
<div class="badge bg-warning">{% translate "Cyno Beacon" %}</div>
|
||||
{% elif timer.structure == "Cyno Jammer" or timer.structure == "Tenebrex Cyno Jammer" %}
|
||||
<div class="badge bg-warning">{% translate "Cyno Jammer" %}</div>
|
||||
{% elif timer.structure == "Jump Gate" or timer.structure == "Ansiblex Jump Gate" %}
|
||||
<div class="badge bg-warning">{% translate "Ansiblex Jump Gate" %}</div>
|
||||
{% elif timer.structure == "Moon Mining Cycle" %}
|
||||
<div class="badge bg-success">{% translate "Moon Mining Cycle" %}</div>
|
||||
{% elif timer.structure == "Metenox Moon Drill" %}
|
||||
<div class="badge bg-warning">{% translate "Metenox Moon Drill" %}</div>
|
||||
{% elif timer.structure == "Other" %}
|
||||
<div class="badge bg-secondary">{% 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>{{ 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>
|
||||
<td class="text-center">{{ timer.eve_character.character_name }}</td>
|
||||
|
||||
{% if perms.auth.timer_management %}
|
||||
<td class="text-center">
|
||||
|
||||
@@ -167,8 +167,8 @@ class TimerboardViewsTestCase(WebTest):
|
||||
form['details'] = 'details'
|
||||
form['system'] = 'jita'
|
||||
form['planet_moon'] = '4-4'
|
||||
form['structure'] = TimerForm.structure_choices[0][0]
|
||||
form['objective'] = TimerForm.objective_choices[0][0]
|
||||
form['structure'] = Timer.Structure.choices[0][0]
|
||||
form['objective'] = Timer.Objective.choices[0][0]
|
||||
form['days_left'] = 1
|
||||
form['hours_left'] = 2
|
||||
form['minutes_left'] = 3
|
||||
@@ -206,8 +206,8 @@ class TimerboardViewsTestCase(WebTest):
|
||||
form['details'] = 'detailsUNIQUE'
|
||||
form['system'] = 'jita'
|
||||
form['planet_moon'] = '4-4'
|
||||
form['structure'] = TimerForm.structure_choices[0][0]
|
||||
form['objective'] = TimerForm.objective_choices[0][0]
|
||||
form['structure'] = Timer.Structure.choices[0][0]
|
||||
form['objective'] = Timer.Objective.choices[0][0]
|
||||
form['days_left'] = 1
|
||||
form['hours_left'] = 2
|
||||
form['minutes_left'] = 3
|
||||
|
||||
@@ -20,6 +20,9 @@ from allianceauth.timerboard.models import Timer
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
TIMER_VIEW_PERMISSION = 'auth.timer_view'
|
||||
TIMER_MANAGE_PERMISSION = 'auth.timer_management'
|
||||
|
||||
|
||||
class BaseTimerView(LoginRequiredMixin, PermissionRequiredMixin, View):
|
||||
pass
|
||||
@@ -27,7 +30,7 @@ class BaseTimerView(LoginRequiredMixin, PermissionRequiredMixin, View):
|
||||
|
||||
class TimerView(BaseTimerView):
|
||||
template_name = 'timerboard/view.html'
|
||||
permission_required = 'auth.timer_view'
|
||||
permission_required = TIMER_VIEW_PERMISSION
|
||||
|
||||
def get(self, request):
|
||||
logger.debug(f"timer_view called by user {request.user}")
|
||||
@@ -48,7 +51,7 @@ class TimerView(BaseTimerView):
|
||||
|
||||
|
||||
class TimerManagementView(BaseTimerView):
|
||||
permission_required = 'auth.timer_management'
|
||||
permission_required = TIMER_MANAGE_PERMISSION
|
||||
index_redirect = 'timerboard:view'
|
||||
success_url = reverse_lazy(index_redirect)
|
||||
model = Timer
|
||||
@@ -74,8 +77,13 @@ class AddTimerView(TimerManagementView, AddUpdateMixin, CreateView):
|
||||
def form_valid(self, form):
|
||||
result = super().form_valid(form)
|
||||
timer = self.object
|
||||
logger.info(f"Created new timer in {timer.system} at {timer.eve_time} by user {self.request.user}")
|
||||
messages.success(self.request, _('Added new timer in %(system)s at %(time)s.') % {"system": timer.system, "time": timer.eve_time})
|
||||
logger.info(
|
||||
f"Created new timer in {timer.system} at {timer.eve_time} by user {self.request.user}"
|
||||
)
|
||||
messages.success(
|
||||
self.request,
|
||||
_('Added new timer in %(system)s at %(time)s.') % {"system": timer.system, "time": timer.eve_time}
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
@@ -89,22 +97,33 @@ class EditTimerView(TimerManagementView, AddUpdateMixin, UpdateView):
|
||||
|
||||
|
||||
class RemoveTimerView(TimerManagementView, DeleteView):
|
||||
form_class = TimerForm
|
||||
pass
|
||||
|
||||
|
||||
def dashboard_timers(request):
|
||||
try:
|
||||
corp = request.user.profile.main_character.corporation
|
||||
except (EveCorporationInfo.DoesNotExist, AttributeError):
|
||||
return ""
|
||||
if request.user.has_perm(TIMER_VIEW_PERMISSION):
|
||||
try:
|
||||
corp = request.user.profile.main_character.corporation
|
||||
except (EveCorporationInfo.DoesNotExist, AttributeError):
|
||||
return ""
|
||||
|
||||
timers = Timer.objects.select_related('eve_character').filter((Q(eve_corp__isnull=True) | Q(eve_corp=corp)) ,eve_time__gte=timezone.now())[:5]
|
||||
timers = Timer.objects.select_related(
|
||||
'eve_character'
|
||||
).filter(
|
||||
(Q(corp_timer=True) & Q(eve_corp=corp)) | Q(corp_timer=False),
|
||||
eve_time__gte=timezone.now()
|
||||
)[:5]
|
||||
|
||||
if timers.count():
|
||||
context = {
|
||||
'timers': timers,
|
||||
}
|
||||
if timers.count():
|
||||
context = {
|
||||
'timers': timers,
|
||||
}
|
||||
|
||||
return render_to_string(template_name='timerboard/dashboard.timers.html', context=context, request=request)
|
||||
return render_to_string(
|
||||
template_name='timerboard/dashboard.timers.html',
|
||||
context=context, request=request
|
||||
)
|
||||
else:
|
||||
return ""
|
||||
else:
|
||||
return ""
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
PROTOCOL=https://
|
||||
AUTH_SUBDOMAIN=%AUTH_SUBDOMAIN%
|
||||
DOMAIN=%DOMAIN%
|
||||
AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v4.0.0b2
|
||||
AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v4.3.0
|
||||
|
||||
# Nginx Proxy Manager
|
||||
PROXY_HTTP_PORT=80
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FROM python:3.11-slim
|
||||
ARG AUTH_VERSION=v4.0.0b2
|
||||
ARG AUTH_VERSION=v4.3.0
|
||||
ARG AUTH_PACKAGE=allianceauth==${AUTH_VERSION}
|
||||
ENV AUTH_USER=allianceauth
|
||||
ENV AUTH_GROUP=allianceauth
|
||||
@@ -9,21 +9,21 @@ ENV AUTH_HOME=/home/allianceauth
|
||||
|
||||
# Setup user and directory permissions
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN groupadd -g 61000 ${AUTH_GROUP}
|
||||
RUN useradd -g 61000 -l -M -s /bin/false -u 61000 ${AUTH_USER}
|
||||
RUN mkdir -p ${STATIC_BASE} \
|
||||
&& chown ${AUTH_USERGROUP} ${STATIC_BASE} \
|
||||
&& mkdir -p ${AUTH_HOME} \
|
||||
&& chown ${AUTH_USERGROUP} ${AUTH_HOME}
|
||||
RUN groupadd -g 61000 ${AUTH_GROUP} && \
|
||||
useradd -g 61000 -l -m -s /bin/false -u 61000 ${AUTH_USER}
|
||||
|
||||
# Install build dependencies
|
||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
||||
libmariadb-dev gcc git pkg-config
|
||||
RUN mkdir -p ${STATIC_BASE}/myauth/static \
|
||||
&& chown ${AUTH_USERGROUP} ${STATIC_BASE}/myauth/static
|
||||
|
||||
# Install python dependencies
|
||||
RUN pip install --upgrade pip
|
||||
RUN pip install wheel gunicorn
|
||||
RUN pip install ${AUTH_PACKAGE}
|
||||
# Install Build Dependencies
|
||||
RUN apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install -y --no-install-recommends libmariadb-dev gcc git pkg-config \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install AA and Dependencies
|
||||
RUN pip install --no-cache-dir ${AUTH_PACKAGE} gunicorn
|
||||
|
||||
# Switch to non-root user
|
||||
USER ${AUTH_USER}
|
||||
@@ -33,7 +33,6 @@ WORKDIR ${AUTH_HOME}
|
||||
RUN allianceauth start myauth
|
||||
COPY /allianceauth/project_template/project_name/settings/local.py ${AUTH_HOME}/myauth/myauth/settings/local.py
|
||||
RUN allianceauth update myauth
|
||||
RUN mkdir -p ${STATIC_BASE}/myauth/static
|
||||
|
||||
RUN echo 'alias auth="python $AUTH_HOME/myauth/manage.py"' >> ~/.bashrc && \
|
||||
source ~/.bashrc
|
||||
|
||||
@@ -9,6 +9,10 @@ from django.conf import settings # noqa
|
||||
|
||||
app = Celery('myauth')
|
||||
|
||||
# Automatically try to establish the connection to the AMQP broker on
|
||||
# Celery startup if it is unavailable.
|
||||
app.conf.broker_connection_retry_on_startup = True
|
||||
|
||||
# Using a string here means the worker don't have to serialize
|
||||
# the configuration object to child processes.
|
||||
app.config_from_object('django.conf:settings')
|
||||
|
||||
@@ -1,20 +1,28 @@
|
||||
server {
|
||||
listen 80;
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location /static {
|
||||
alias /var/www/myauth/static;
|
||||
autoindex off;
|
||||
}
|
||||
events {}
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
location /robots.txt {
|
||||
alias /var/www/myauth/static/robots.txt;
|
||||
}
|
||||
sendfile on;
|
||||
|
||||
location / {
|
||||
proxy_pass http://allianceauth_gunicorn:8000;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_redirect off;
|
||||
server {
|
||||
listen 80;
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location /static {
|
||||
alias /var/www/myauth/static;
|
||||
autoindex off;
|
||||
}
|
||||
|
||||
location /robots.txt {
|
||||
alias /var/www/myauth/static/robots.txt;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://allianceauth_gunicorn:8000;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
ARG AA_DOCKER_TAG
|
||||
FROM $AA_DOCKER_TAG
|
||||
|
||||
RUN cd /home/allianceauth
|
||||
WORKDIR ${AUTH_HOME}
|
||||
|
||||
COPY /conf/requirements.txt requirements.txt
|
||||
RUN pip install -r requirements.txt
|
||||
RUN --mount=type=cache,target=~/.cache \
|
||||
pip install -r requirements.txt
|
||||
|
||||
@@ -62,10 +62,10 @@ services:
|
||||
max-file: "5"
|
||||
|
||||
nginx:
|
||||
image: nginx:1.25
|
||||
image: nginx:stable
|
||||
restart: always
|
||||
volumes:
|
||||
- ./conf/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
- ./conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
- static-volume:/var/www/myauth/static
|
||||
depends_on:
|
||||
- allianceauth_gunicorn
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 85 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 86 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB |
35
docs/_static/css/rtd_dark.css
vendored
35
docs/_static/css/rtd_dark.css
vendored
@@ -24,8 +24,13 @@
|
||||
color: aliceblue;
|
||||
}
|
||||
|
||||
.method dt, .class dt, .data dt, .attribute dt, .function dt,
|
||||
.descclassname, .descname {
|
||||
.method dt,
|
||||
.class dt,
|
||||
.data dt,
|
||||
.attribute dt,
|
||||
.function dt,
|
||||
.descclassname,
|
||||
.descname {
|
||||
background-color: #525252 !important;
|
||||
color: white !important;
|
||||
}
|
||||
@@ -51,11 +56,13 @@
|
||||
background-color: #2b2b2b !important;
|
||||
}
|
||||
|
||||
.xref, .py-meth {
|
||||
.xref,
|
||||
.py-meth {
|
||||
color: #7ec3e6 !important;
|
||||
}
|
||||
|
||||
.admonition, .note {
|
||||
.admonition,
|
||||
.note {
|
||||
background-color: #2d2d2d !important;
|
||||
}
|
||||
|
||||
@@ -64,19 +71,27 @@
|
||||
border-bottom: 1px solid #fcfcfc;
|
||||
}
|
||||
|
||||
.wy-table thead, .rst-content table.docutils thead, .rst-content table.field-list thead {
|
||||
.wy-table thead,
|
||||
.rst-content table.docutils thead,
|
||||
.rst-content table.field-list thead {
|
||||
background-color: #b9b9b9;
|
||||
}
|
||||
|
||||
.wy-table thead th, .rst-content table.docutils thead th, .rst-content table.field-list thead th {
|
||||
.wy-table thead th,
|
||||
.rst-content table.docutils thead th,
|
||||
.rst-content table.field-list thead th {
|
||||
border: solid 2px #e1e4e5;
|
||||
}
|
||||
|
||||
.wy-table thead p, .rst-content table.docutils thead p, .rst-content table.field-list thead p {
|
||||
.wy-table thead p,
|
||||
.rst-content table.docutils thead p,
|
||||
.rst-content table.field-list thead p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wy-table-odd td, .wy-table-striped tr:nth-child(2n-1) td, .rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td {
|
||||
.wy-table-odd td,
|
||||
.wy-table-striped tr:nth-child(2n-1) td,
|
||||
.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td {
|
||||
background-color: #343131;
|
||||
}
|
||||
|
||||
@@ -91,10 +106,6 @@
|
||||
|
||||
/* Name.Variable */
|
||||
|
||||
body {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.rst-content .section .admonition ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ from allianceauth.framework.api.evecharacter import get_user_from_evecharacter
|
||||
user = get_user_from_evecharacter(character=my_evecharacter)
|
||||
```
|
||||
|
||||
Now, `user` is a `User` object, or the sentinel username (see [get_sentinel_user](#get-sentinel-user))
|
||||
Now, `user` is a `User` object, or the sentinel username (see [get_sentinel_user](#get_sentinel_user))
|
||||
if the `EveCharacter` has no user.
|
||||
|
||||
## User API
|
||||
@@ -88,7 +88,7 @@ main_character = get_main_character_name_from_user(user=my_user)
|
||||
|
||||
Now, `main_character` is a `string` containing the user's main character name.
|
||||
If the user has no main character, the username will be returned. If the user is `None`,
|
||||
the sentinel username (see [get_sentinel_user](#get-sentinel-user)) will be returned.
|
||||
the sentinel username (see [get_sentinel_user](#get_sentinel_user)) will be returned.
|
||||
|
||||
### get_sentinel_user
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ have to load specific CSS or JavaScript yourself.
|
||||
|
||||
These bundles include DataTables CSS and JS, jQuery Datepicker CSS and JS, jQueryUI CSS and JS, and more.
|
||||
|
||||
A full list of bundles we provide can be found here: https://gitlab.com/allianceauth/allianceauth/-/tree/master/allianceauth/templates/bundles
|
||||
A full list of bundles we provide can be found here: <https://gitlab.com/allianceauth/allianceauth/-/tree/master/allianceauth/templates/bundles>
|
||||
|
||||
To use a bundle, you can use the following code in your template (Example for jQueryUI):
|
||||
|
||||
@@ -28,6 +28,27 @@ To ensure a unified style language throughout Alliance Auth and Community Apps,
|
||||
we also provide a couple of template partials. This collection is bound to grow over
|
||||
time, so best have an eye on this page.
|
||||
|
||||
### Dashboard Widget Title
|
||||
|
||||
To ensure the dashboard widgets have a unified style, we provide a template partial for the widget title.
|
||||
|
||||
To use it, you can use the following code in your dashboard widget template:
|
||||
|
||||
```django
|
||||
<div id="my-app-dashboard-widget" class="col-12 mb-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
{% translate "My Widget Title" as widget_title %}
|
||||
{% include "framework/dashboard/widget-title.html" with title=widget_title %}
|
||||
|
||||
<div>
|
||||
<p>My widget content</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
### Page Header
|
||||
|
||||
On some pages you want to have a page header. To make this easier, we provide a template partial for this.
|
||||
@@ -38,7 +59,8 @@ To use it, you can use the following code in your template:
|
||||
{% block content %}
|
||||
<div>
|
||||
{% translate "My Page Header" as page_header %}
|
||||
{% include "framework/header/page-header.html" with title=page_header %}
|
||||
{% translate "My Page Header Subtitle" as optional_subtitle %}
|
||||
{% include "framework/header/page-header.html" with title=page_header subtitle=optional_subtitle %}
|
||||
|
||||
<p>My page content</p>
|
||||
</div>
|
||||
|
||||
@@ -122,10 +122,6 @@ class MyService(ServiceHook):
|
||||
|
||||
All of your apps defined urlpatterns will then be included in the `URLconf` when the core application starts.
|
||||
|
||||
#### self.service_ctrl_template
|
||||
|
||||
This is provided as a courtesy and defines the default template to be used with [render_service_ctrl](#render_service_ctrl). You are free to redefine or not use this variable at all.
|
||||
|
||||
#### title
|
||||
|
||||
This is a property which provides a user-friendly display of your service's name. It will usually do a reasonably good job unless your service name has punctuation or odd capitalization. If this is the case, you should override this method and return a string.
|
||||
@@ -134,7 +130,7 @@ This is a property which provides a user-friendly display of your service's name
|
||||
|
||||
#### self.service_ctrl_template
|
||||
|
||||
This is provided as a courtesy and defines the default template to be used with [render_service_ctrl](#render-service-ctrl). You are free to redefine or not use this variable at all.
|
||||
This is provided as a courtesy and defines the default template to be used with [render_service_ctrl](#render_service_ctrl). You are free to redefine or not use this variable at all.
|
||||
|
||||
#### delete_user
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ The `MenuItemHook` class specifies some parameters/instance variables required f
|
||||
:undoc-members:
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
### text
|
||||
|
||||
The text shown as menu item, e.g., usually the name of the app.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user