From ee24706e435e66c7c06e7669c11cb7a39abce496 Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Tue, 24 Oct 2023 02:04:49 +0000 Subject: [PATCH] v4 Template fixes --- .../authentication/dashboard.characters.html | 55 +-- .../authentication/dashboard.groups.html | 4 +- .../templates/authentication/tokens.html | 11 +- .../authentication/templates/public/base.html | 2 +- .../corputils/templates/corputils/base.html | 60 ++-- .../templates/corputils/corpstats.html | 325 +++++++++--------- .../corputils/templates/corputils/search.html | 2 +- .../fatlinkformatter.html | 2 +- .../fatlinkpersonalmonthlystatisticsview.html | 64 ++-- .../fatlinkstatisticsview.html | 4 +- .../fleetactivitytracking/fatlinkview.html | 2 +- .../templates/groupmanagement/audit.html | 16 +- .../groupmanagement/groupmembers.html | 2 +- .../templates/groupmanagement/groups.html | 5 +- .../templates/groupmanagement/index.html | 4 +- allianceauth/hooks.py | 2 +- .../templates/hrapplications/management.html | 22 +- .../templates/hrapplications/searchview.html | 6 +- allianceauth/menu/hooks.py | 2 +- .../menu/templates/menu/menu-item-bs5.html | 2 +- .../menu/menu-notification-block.html | 4 +- .../menu/templates/menu/menu-user.html | 74 ++-- .../templates/menu/sortable-side-menu.html | 21 +- .../templates/notifications/list.html | 50 +-- .../templates/notifications/list_partial.html | 18 +- .../templates/notifications/view.html | 40 ++- .../templates/optimer/dashboard.ops.html | 14 +- .../optimer/templates/optimer/management.html | 4 +- .../templates/permissions_tool/audit_row.html | 6 +- .../project_name/settings/base.py | 1 + .../discourse/discourse_service_ctrl.html | 2 +- .../services/mumble/mumble_service_ctrl.html | 12 +- .../services/templates/services/services.html | 29 +- allianceauth/srp/templates/srp/data.html | 8 +- .../srp/templates/srp/management.html | 16 +- .../static/allianceauth/css/auth-base-bs5.css | 49 +++ .../allianceauth/admin-status/overview.html | 144 ++++---- .../templates/allianceauth/base-bs5.html | 120 ++++--- .../templates/allianceauth/error.html | 2 +- .../templates/allianceauth/top-menu.html | 2 +- .../templates/bundles/auth-base-bs5-css.html | 3 + .../templates/bundles/auth-base-css.html | 2 +- .../templates/bundles/bootstrap-css.html | 8 +- .../templates/bundles/checkbox-css.html | 2 +- .../templates/bundles/datatables-css-bs5.html | 2 +- .../templates/bundles/datatables-css.html | 2 +- .../templates/bundles/fontawesome.html | 2 +- .../bundles/jquery-datetimepicker-css.html | 2 +- .../templates/bundles/jquery-ui-css.html | 2 +- allianceauth/templates/bundles/moment-js.html | 2 +- .../templates/bundles/x-editable.css.html | 2 +- .../templates/theme/theme_imports_css.html | 2 +- .../timerboard/dashboard.timers.html | 80 ++--- .../timerboard/templates/timerboard/view.html | 136 ++++---- pyproject.toml | 1 + 55 files changed, 791 insertions(+), 665 deletions(-) create mode 100644 allianceauth/static/allianceauth/css/auth-base-bs5.css create mode 100644 allianceauth/templates/bundles/auth-base-bs5-css.html diff --git a/allianceauth/authentication/templates/authentication/dashboard.characters.html b/allianceauth/authentication/templates/authentication/dashboard.characters.html index 6b4f4d09..43944bf7 100644 --- a/allianceauth/authentication/templates/authentication/dashboard.characters.html +++ b/allianceauth/authentication/templates/authentication/dashboard.characters.html @@ -1,5 +1,5 @@ {% load i18n %} -
+
@@ -8,32 +8,37 @@
-
- - - - - - - - - - - - {% for char in characters %} +
{% translate "Name" %}{% translate "Corp" %}{% translate "Alliance" %}
+ - - - - + + + + - {% endfor %} - -
- {{ char.character_name }}{{ char.corporation_name }}{{ char.alliance_name|default_if_none:"" }}{% translate "Name" %}{% translate "Corp" %}{% translate "Alliance" %}
+ + + {% for char in characters %} + + + {{ char.character_name }} + + {{ char.character_name }} + {{ char.corporation_name }} + {{ char.alliance_name|default_if_none:"" }} + + {% endfor %} + +
diff --git a/allianceauth/authentication/templates/authentication/dashboard.groups.html b/allianceauth/authentication/templates/authentication/dashboard.groups.html index 1a746a3b..5ea8514a 100644 --- a/allianceauth/authentication/templates/authentication/dashboard.groups.html +++ b/allianceauth/authentication/templates/authentication/dashboard.groups.html @@ -1,10 +1,10 @@ {% load i18n %} -
+

{% translate "Membership" %}

-
+
{% translate "State:" %} {{ request.user.profile.state }}
{% for group in groups %} diff --git a/allianceauth/authentication/templates/authentication/tokens.html b/allianceauth/authentication/templates/authentication/tokens.html index cb99e2c3..4d522b96 100644 --- a/allianceauth/authentication/templates/authentication/tokens.html +++ b/allianceauth/authentication/templates/authentication/tokens.html @@ -5,8 +5,8 @@ {% block content %}

{% translate "Token Management" %}

-
-
+
+
@@ -18,8 +18,11 @@ {% for t in tokens %} - - + + {% endfor %} diff --git a/allianceauth/authentication/templates/public/base.html b/allianceauth/authentication/templates/public/base.html index f5cb128c..2951c284 100644 --- a/allianceauth/authentication/templates/public/base.html +++ b/allianceauth/authentication/templates/public/base.html @@ -31,7 +31,7 @@ } .panel-transparent { - background: rgba(48, 48, 48, 0.7); + background: rgba(48 48 48 / 0.7); color: #ffffff; padding-bottom: 21px; } diff --git a/allianceauth/corputils/templates/corputils/base.html b/allianceauth/corputils/templates/corputils/base.html index aff00288..43f3170a 100644 --- a/allianceauth/corputils/templates/corputils/base.html +++ b/allianceauth/corputils/templates/corputils/base.html @@ -4,37 +4,37 @@ {% translate "Corporation Member Data" %} {% endblock page_title %} {% block content %} -
+

{% translate "Corporation Member Data" %}

-
-
+ + + {% block member_data %} + {% endblock member_data %}
{% endblock content %} diff --git a/allianceauth/corputils/templates/corputils/corpstats.html b/allianceauth/corputils/templates/corputils/corpstats.html index 9458bc25..9d75b5e7 100644 --- a/allianceauth/corputils/templates/corputils/corpstats.html +++ b/allianceauth/corputils/templates/corputils/corpstats.html @@ -3,177 +3,175 @@ {% load humanize %} {% block member_data %} {% if corpstats %} -
-
-
{% translate "Scopes" %}
{% for s in t.scopes.all %}{{ s.name }} {% endfor %} {% for s in t.scopes.all %}{{ s.name }}{% endfor %} + + + {{ t.character_name }}
- - - {% if corpstats.corp.alliance %} - - {% endif %} - - - - {% if corpstats.corp.alliance %} - - {% endif %} - -
- {{ corpstats.corp.corporation_name }} - - {{ corpstats.corp.alliance.alliance_name }} -

{{ corpstats.corp.corporation_name }}

{{ corpstats.corp.alliance.alliance_name }}

-
+
+ + + + {% if corpstats.corp.alliance %} + + {% endif %} + + + + {% if corpstats.corp.alliance %} + + {% endif %} + +
+ {{ corpstats.corp.corporation_name }} + + {{ corpstats.corp.alliance.alliance_name }} +

{{ corpstats.corp.corporation_name }}

{{ corpstats.corp.alliance.alliance_name }}

-
-
-
-
- - -
+ +
+
+
+ + -
-
-
- {% if mains %} -
- - +
+ + +
+
+
+ {% if mains %} +
+
+ + + + + + + + {% for id, main in mains.items %} - - - - - - {% for id, main in mains.items %} - - - - - - {% for member in members %} - - - - - - - - - {% endfor %} - {% for member in unregistered %} - - - - - - - - - {% endfor %} - -
-
- {{ main.main }} -
- {{ main.main }} -
+
+
+ {{ main.main }} +
+ {{ main.main }}
-
- - {% for alt in main.alts %} - {% if forloop.first %} - - - - - - - - {% endif %} + + + - - {% endfor %} - -
{% translate "Character" %}{% translate "Corporation" %}{% translate "Alliance" %}
+ + {% for alt in main.alts %} + {% if forloop.first %} - - - - - + + + + + - {% endfor %} -
-
- {{ alt.character_name }} -
-
{{ alt.character_name }}{{ alt.corporation_name }}{{ alt.alliance_name }} - - {% translate "Killboard" %} - - {% translate "Character" %}{% translate "Corporation" %}{% translate "Alliance" %}
-
- - {% endif %} - -
- {% if members %} -
- - - - - - - - - + {% endif %} + + + + + + + + {% endfor %} +
{% translate "Character" %}{% translate "Main Character" %}{% translate "Main Corporation" %}{% translate "Main Alliance" %}
+
+ {{ alt.character_name }} +
+
{{ alt.character_name }}{{ alt.corporation_name }}{{ alt.alliance_name }} + + {% translate "Killboard" %} + +
+
{{ member }}{{ member }} - {% translate "Killboard" %} - {{ member.character_ownership.user.profile.main_character.character_name }}{{ member.character_ownership.user.profile.main_character.corporation_name }}{{ member.character_ownership.user.profile.main_character.alliance_name }}
{{ member.character_name }}{{ member.character_name }} - {% translate "Killboard" %} -
-
- {% endif %} -
-
- {% if unregistered %} -
- - + {% endfor %} + +
+
+ {% endif %} +
+
+ {% if members %} +
+ + + + + + + + + + + + + {% for member in members %} - - - + + + + + + - - - {% for member in unregistered %} - - - - - - {% endfor %} - -
{% translate "Character" %}{% translate "Main Character" %}{% translate "Main Corporation" %}{% translate "Main Alliance" %}
{% translate "Character" %}{{ member }}{{ member }} + {% translate "Killboard" %} + {{ member.character_ownership.user.profile.main_character.character_name }}{{ member.character_ownership.user.profile.main_character.corporation_name }}{{ member.character_ownership.user.profile.main_character.alliance_name }}
{{ member.character_name }}{{ member.character_name }} - - {% translate "Killboard" %} - -
-
- {% endif %} -
+ {% endfor %} + {% for member in unregistered %} + + {{ member.character_name }} + {{ member.character_name }} + + {% translate "Killboard" %} + + + + + + {% endfor %} + + +
+ {% endif %} +
+
+ {% if unregistered %} +
+ + + + + + + + + + {% for member in unregistered %} + + + + + + {% endfor %} + +
{% translate "Character" %}
{{ member.character_name }}{{ member.character_name }} + + {% translate "Killboard" %} + +
+
+ {% endif %}
@@ -181,12 +179,15 @@
{% endif %} {% endblock %} + {% block extra_javascript %} {% include 'bundles/datatables-js.html' %} {% endblock %} + {% block extra_css %} {% include 'bundles/datatables-css.html' %} {% endblock %} + {% block extra_script %} $(document).ready(function(){ $('#table-mains').DataTable({ diff --git a/allianceauth/corputils/templates/corputils/search.html b/allianceauth/corputils/templates/corputils/search.html index d5d9c6c0..3b682413 100644 --- a/allianceauth/corputils/templates/corputils/search.html +++ b/allianceauth/corputils/templates/corputils/search.html @@ -24,7 +24,7 @@ {{ result.1.character_name }} {{ result.1.character_name }} {{ result.0.corp.corporation_name }} - {% translate "Killboard" %} + {% translate "Killboard" %} {{ result.1.main_character.character_name }} {{ result.1.main_character.corporation_name }} {{ result.1.main_character.alliance_name }} diff --git a/allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkformatter.html b/allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkformatter.html index 493bf9af..6cf71d4e 100644 --- a/allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkformatter.html +++ b/allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkformatter.html @@ -17,7 +17,7 @@
{% endblock content %} diff --git a/allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkstatisticsview.html b/allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkstatisticsview.html index 2d8d9c9e..2a1568e3 100644 --- a/allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkstatisticsview.html +++ b/allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkstatisticsview.html @@ -10,7 +10,7 @@ @@ -31,7 +31,7 @@ {% for corpStat in fatStats %} - {{ corpStat.corp.corporation_name }} + {{ corpStat.corp.corporation_name }} [{{ corpStat.corp.corporation_ticker }}] diff --git a/allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkview.html b/allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkview.html index 9aa22d29..2959ca81 100644 --- a/allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkview.html +++ b/allianceauth/fleetactivitytracking/templates/fleetactivitytracking/fatlinkview.html @@ -80,7 +80,7 @@ {% for link in fatlinks %} - {{ link.fleet }} + {{ link.fleet }} {{ link.creator.username }} {{ link.fleet }} diff --git a/allianceauth/groupmanagement/templates/groupmanagement/audit.html b/allianceauth/groupmanagement/templates/groupmanagement/audit.html index e28ce904..d22f72e2 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/audit.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/audit.html @@ -17,13 +17,15 @@
- - - - - - - + + + + + + + + + diff --git a/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html b/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html index 4496fc9a..9cad2137 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html @@ -29,7 +29,7 @@ {% for member in members %} - + @@ -72,7 +72,6 @@ {% endfor %}
{% translate "Date/Time" %}{% translate "Requestor" %}{% translate "Character" %}{% translate "Corporation" %}{% translate "Type" %}{% translate "Action" %}{% translate "Actor" %}
{% translate "Date/Time" %}{% translate "Requestor" %}{% translate "Character" %}{% translate "Corporation" %}{% translate "Type" %}{% translate "Action" %}{% translate "Actor" %}
- + {{ member.main_char.character_name }} {% if member.main_char %} {{ member.main_char.character_name }} diff --git a/allianceauth/groupmanagement/templates/groupmanagement/groups.html b/allianceauth/groupmanagement/templates/groupmanagement/groups.html index 08733dec..6284f65f 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/groups.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/groups.html @@ -23,7 +23,7 @@
{% translate "Name" %} {% translate "Description" %}{% translate "Leaders" %}UserGroup{% translate "Leaders" %}{% translate "User" %}{% translate "Group" %}
- {% else %}
{% translate "No groups available." %} @@ -88,9 +87,7 @@ {% endblock %} {% block extra_script %} - $(document).ready(function () { $('#groupsTable').DataTable(); }); - {% endblock extra_script %} diff --git a/allianceauth/groupmanagement/templates/groupmanagement/index.html b/allianceauth/groupmanagement/templates/groupmanagement/index.html index da176b35..b3e0cd71 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/index.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/index.html @@ -58,7 +58,7 @@ {% for acceptrequest in acceptrequests %} - + {{ acceptrequest.main_char.character_name }} {% if acceptrequest.main_char %} {{ acceptrequest.main_char.character_name }} @@ -115,7 +115,7 @@ {% for leaverequest in leaverequests %} - + {{ leaverequest.main_char.character_name }} {% if leaverequest.main_char %} {{ leaverequest.main_char.character_name }} diff --git a/allianceauth/hooks.py b/allianceauth/hooks.py index 70ca3439..0a91942b 100644 --- a/allianceauth/hooks.py +++ b/allianceauth/hooks.py @@ -134,5 +134,5 @@ class DashboardItemHook: logger.debug(f"Rendering {self.view_function} to dashboard") return self.view_function(request) except Exception as e: - logger.exception("Rendering {self.view_function} Failed!") + logger.exception(f"Rendering {self.view_function} failed!") return "" diff --git a/allianceauth/hrapplications/templates/hrapplications/management.html b/allianceauth/hrapplications/templates/hrapplications/management.html index 6e8844c4..b6bdc739 100644 --- a/allianceauth/hrapplications/templates/hrapplications/management.html +++ b/allianceauth/hrapplications/templates/hrapplications/management.html @@ -33,11 +33,11 @@ {{ personal_app.form.corp.corporation_name }} {% if personal_app.approved == None %} -
{% translate "Pending" %}
+
{% translate "Pending" %}
{% elif personal_app.approved == True %} -
{% translate "Approved" %}
+
{% translate "Approved" %}
{% else %} -
{% translate "Rejected" %}
+
{% translate "Rejected" %}
{% endif %} @@ -91,14 +91,14 @@ {% if app.approved == None %} {% if app.reviewer_str %} -
{% translate "Reviewer:" %} {{ app.reviewer_str }}
+
{% translate "Reviewer:" %} {{ app.reviewer_str }}
{% else %} -
{% translate "Pending" %}
+
{% translate "Pending" %}
{% endif %} {% elif app.approved == True %} -
{% translate "Approved" %}
+
{% translate "Approved" %}
{% else %} -
{% translate "Rejected" %}
+
{% translate "Rejected" %}
{% endif %} @@ -135,14 +135,14 @@ {% if app.approved == None %} {% if app.reviewer_str %} -
{% translate "Reviewer:" %} {{ app.reviewer_str }}
+
{% translate "Reviewer:" %} {{ app.reviewer_str }}
{% else %} -
{% translate "Pending" %}
+
{% translate "Pending" %}
{% endif %} {% elif app.approved == True %} -
{% translate "Approved" %}
+
{% translate "Approved" %}
{% else %} -
{% translate "Rejected" %}
+
{% translate "Rejected" %}
{% endif %} diff --git a/allianceauth/hrapplications/templates/hrapplications/searchview.html b/allianceauth/hrapplications/templates/hrapplications/searchview.html index b1098da2..19b8e801 100644 --- a/allianceauth/hrapplications/templates/hrapplications/searchview.html +++ b/allianceauth/hrapplications/templates/hrapplications/searchview.html @@ -34,11 +34,11 @@ {{ app.form.corp }} {% if app.approved == None %} -
{% translate "Pending" %}
+
{% translate "Pending" %}
{% elif app.approved == True %} -
{% translate "Approved" %}
+
{% translate "Approved" %}
{% else %} -
{% translate "Rejected" %}
+
{% translate "Rejected" %}
{% endif %} diff --git a/allianceauth/menu/hooks.py b/allianceauth/menu/hooks.py index 5dde9359..94ea033d 100644 --- a/allianceauth/menu/hooks.py +++ b/allianceauth/menu/hooks.py @@ -8,7 +8,7 @@ class MenuItemHook: """ Auth Hook for generating Side Menu Items """ - def __init__(self, text: str, classes: List[str], url_name: str, order: Optional[int] = None, navactive: List = list([])): + def __init__(self, text: str, classes: str, url_name: str, order: Optional[int] = None, navactive: List = []): """ :param text: The text shown as menu item, e.g. usually the name of the app. :type text: str diff --git a/allianceauth/menu/templates/menu/menu-item-bs5.html b/allianceauth/menu/templates/menu/menu-item-bs5.html index 27ff379a..c8d5b2f0 100644 --- a/allianceauth/menu/templates/menu/menu-item-bs5.html +++ b/allianceauth/menu/templates/menu/menu-item-bs5.html @@ -8,7 +8,7 @@ {% translate item.text %}
{% if item.count >= 1 %} - + {{ item.count }} {% elif item.url %} diff --git a/allianceauth/menu/templates/menu/menu-notification-block.html b/allianceauth/menu/templates/menu/menu-notification-block.html index c4e4a1c3..fc3b3dcd 100644 --- a/allianceauth/menu/templates/menu/menu-notification-block.html +++ b/allianceauth/menu/templates/menu/menu-notification-block.html @@ -7,9 +7,7 @@ href="{% url 'notifications:list' %}"> {% with unread_count=request.user|user_unread_notification_count %} - + {% endwith %} diff --git a/allianceauth/menu/templates/menu/menu-user.html b/allianceauth/menu/templates/menu/menu-user.html index 52b2afeb..efffebdd 100644 --- a/allianceauth/menu/templates/menu/menu-user.html +++ b/allianceauth/menu/templates/menu/menu-user.html @@ -1,51 +1,57 @@ {% load i18n %} {% load evelinks %} {% load theme_tags %} -
- {% if request.user.profile.main_character %} - {% with request.user.profile.main_character as main %} -
- {{ main.character_name }} - {{ main.corporation_name }} - {% if main.alliance_id %} - {{ main.alliance_name }} - {% elif main.faction_id %} - {{ main.faction_name }} - {% endif %} -
-
{{ main.character_name }}
- {% endwith %} - {% else %} - {% translate 'No Main Character!' %} -
{% translate "No Main Character!" %}
- {% endif %} +
{% if user.is_authenticated %} + {% if request.user.profile.main_character %} + {% with request.user.profile.main_character as main %} +
+ {{ main.character_name }} + {{ main.corporation_name }} + {% if main.alliance_id %} + {{ main.alliance_name }} + {% elif main.faction_id %} + {{ main.faction_name }} + {% endif %} +
+
{{ main.character_name }}
+ {% endwith %} + {% else %} + {% translate 'No Main Character!' %} +
{% translate "No Main Character!" %}
+ {% endif %} + {% theme_select %} {% endif %} +
+ {% if user.is_superuser %} - - {% translate "Admin" %} - + + {% translate "Admin" %} + {% endif %}
+
- - {% if user.is_superuser %} - - - - {% endif %} - {% if user.is_authenticated %} - - {% else %} - - {% endif %} + {% if user.is_authenticated %} + + {% endif %} + + {% if user.is_superuser %} + + + + {% endif %} + + {% if user.is_authenticated %} + + {% else %} + + {% endif %}
diff --git a/allianceauth/menu/templates/menu/sortable-side-menu.html b/allianceauth/menu/templates/menu/sortable-side-menu.html index 1ee45fce..12375745 100644 --- a/allianceauth/menu/templates/menu/sortable-side-menu.html +++ b/allianceauth/menu/templates/menu/sortable-side-menu.html @@ -5,15 +5,18 @@