From e77ea9dc9831cec5ab00950c8fcf1fca17fa2c1c Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Wed, 6 May 2026 09:21:12 +0200 Subject: [PATCH] [CHANGE] Make DataTables responsive --- .../templates/authentication/tokens.html | 57 ++++---- .../templates/corputils/corpstats.html | 5 + .../corputils/templates/corputils/search.html | 55 +++---- .../templates/groupmanagement/audit.html | 3 + .../groupmanagement/groupmembers.html | 5 +- .../templates/groupmanagement/groups.html | 135 +++++++++--------- .../templates/groupmanagement/index.html | 15 +- .../templates/permissions_tool/audit.html | 7 +- .../templates/permissions_tool/overview.html | 3 + .../mumble/mumble_connection_history.html | 4 + allianceauth/srp/templates/srp/data.html | 3 + .../templates/timerboard/timertable.html | 5 +- .../timerboard/templates/timerboard/view.html | 7 +- 13 files changed, 176 insertions(+), 128 deletions(-) diff --git a/allianceauth/authentication/templates/authentication/tokens.html b/allianceauth/authentication/templates/authentication/tokens.html index 7f0ba302..e0400442 100644 --- a/allianceauth/authentication/templates/authentication/tokens.html +++ b/allianceauth/authentication/templates/authentication/tokens.html @@ -17,39 +17,42 @@ {% translate "This page is a best attempt, but backups or database logs can still contain your tokens. Always revoke tokens on https://developers.eveonline.com/authorized-apps where possible."|urlize %}

- - - - - - - - - - - {% for t in tokens %} +
+
{% translate "Scopes" %}{% translate "Actions" %}{% translate "Character" %}
+ - - - - - + + + - {% endfor %} - -
- {% for s in t.scopes.all %} - {{ s.name }} - {% endfor %} - - - - {{ t.character_name }}{% translate "Scopes" %}{% translate "Actions" %}{% translate "Character" %}
+ + + + {% for t in tokens %} + + + {% for s in t.scopes.all %} + {{ s.name }} + {% endfor %} + + + + + + + + {{ t.character_name }} + + {% endfor %} + + + {% endblock content %} {% block extra_javascript %} {% include "bundles/datatables-2-js-bs5.html" %} + {% include "bundles/datatables-2-responsive-js.html" %} {% include "bundles/filterdropdown-js.html" %} {% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %} @@ -69,6 +72,7 @@ language: { url: '{{ DT_LANG_PATH }}' }, + responsive: true, columnDefs: [ { targets: [0, 1], @@ -114,4 +118,5 @@ {% block extra_css %} {% include "bundles/datatables-2-css-bs5.html" %} + {% include "bundles/datatables-2-responsive-css.html" %} {% endblock extra_css %} diff --git a/allianceauth/corputils/templates/corputils/corpstats.html b/allianceauth/corputils/templates/corputils/corpstats.html index fdbc7a47..30935ab2 100644 --- a/allianceauth/corputils/templates/corputils/corpstats.html +++ b/allianceauth/corputils/templates/corputils/corpstats.html @@ -238,6 +238,7 @@ {% block extra_javascript %} {% include 'bundles/datatables-2-js-bs5.html' %} + {% include 'bundles/datatables-2-responsive-js.html' %} {% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %} @@ -251,6 +252,7 @@ language: { url: '{{ DT_LANG_PATH }}' }, + responsive: true, columnDefs: [ { target: 1, @@ -265,6 +267,7 @@ language: { url: '{{ DT_LANG_PATH }}' }, + responsive: true, columnDefs: [ { targets: [0, 2], @@ -286,6 +289,7 @@ language: { url: '{{ DT_LANG_PATH }}' }, + responsive: true, columnDefs: [ { targets: [0, 2], @@ -308,4 +312,5 @@ {% block extra_css %} {% include 'bundles/datatables-2-css-bs5.html' %} + {% include 'bundles/datatables-2-responsive-css.html' %} {% endblock %} diff --git a/allianceauth/corputils/templates/corputils/search.html b/allianceauth/corputils/templates/corputils/search.html index a8054ef9..07a6e894 100644 --- a/allianceauth/corputils/templates/corputils/search.html +++ b/allianceauth/corputils/templates/corputils/search.html @@ -10,38 +10,41 @@
- - - - - - - - - - - - - - {% for result in results %} - - - - - - - - +
+
+ + + + + + + + + - {% endfor %} - - + + + {% for result in results %} + + {{ result.1.character_name }} + {{ result.1.character_name }} + {{ result.0.corp.corporation_name }} + {% translate "Killboard" %} + {{ result.1.main_character.character_name }} + {{ result.1.main_character.corporation_name }} + {{ result.1.main_character.alliance_name }} + + {% endfor %} + + +
{% endblock %} {% block extra_javascript %} {% include 'bundles/datatables-2-js-bs5.html' %} + {% include 'bundles/datatables-2-responsive-js.html' %} {% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %} @@ -55,6 +58,7 @@ language: { url: '{{ DT_LANG_PATH }}' }, + responsive: true, stateSave: true, stateDuration: 0 }); @@ -64,4 +68,5 @@ {% block extra_css %} {% include 'bundles/datatables-2-css-bs5.html' %} + {% include 'bundles/datatables-2-responsive-css.html' %} {% endblock %} diff --git a/allianceauth/groupmanagement/templates/groupmanagement/audit.html b/allianceauth/groupmanagement/templates/groupmanagement/audit.html index ffca6273..acfd175d 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/audit.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/audit.html @@ -71,6 +71,7 @@ {% block extra_javascript %} {% include 'bundles/datatables-2-js-bs5.html' %} + {% include 'bundles/datatables-2-responsive-js.html' %} {% include 'bundles/moment-js.html' with locale=True %} {% include 'bundles/filterdropdown-js.html' %} @@ -102,6 +103,7 @@ language: { url: '{{ DT_LANG_PATH }}' }, + responsive: true, order: [ [0, 'desc'], [1, 'asc'] @@ -138,4 +140,5 @@ {% block extra_css %} {% include 'bundles/datatables-2-css-bs5.html' %} + {% include 'bundles/datatables-2-responsive-css.html' %} {% endblock %} diff --git a/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html b/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html index 6f4495af..10e28ea5 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html @@ -28,7 +28,7 @@ {% translate "Character" %} {% translate "Organization" %} - + {% translate "Actions" %} @@ -86,6 +86,7 @@ {% block extra_javascript %} {% include 'bundles/datatables-2-js-bs5.html' %} + {% include 'bundles/datatables-2-responsive-js.html' %} {% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %} @@ -99,6 +100,7 @@ language: { url: '{{ DT_LANG_PATH }}' }, + responsive: true, order: [ [0, 'asc'] ], @@ -117,4 +119,5 @@ {% block extra_css %} {% include 'bundles/datatables-2-css-bs5.html' %} + {% include 'bundles/datatables-2-responsive-css.html' %} {% endblock %} diff --git a/allianceauth/groupmanagement/templates/groupmanagement/groups.html b/allianceauth/groupmanagement/templates/groupmanagement/groups.html index 912aa061..1601d4fd 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/groups.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/groups.html @@ -26,78 +26,80 @@ {% block content %} {% if groups %} - - - - - - - - - - - - {% for g in groups %} +
+
{% translate "Name" %}{% translate "Description" %} - {% translate "Leaders" %}
- {% translate "User" %} - {% translate "Group" %} -
+ - - - + + + + + + + + {% for g in groups %} + + + + + - - - {% endfor %} - -
{{ g.group.name }} - {% if g.group.authgroup.description %} - {{ g.group.authgroup.description|linebreaks|urlize }} - {% endif %} - - {% if g.group.authgroup.group_leaders.all.count %} - {% for leader in g.group.authgroup.group_leaders.all %} - {% if leader.profile.main_character %} - {{leader.profile.main_character}} + {% translate "Name" %}{% translate "Description" %} + {% translate "Leaders" %}
+ {% translate "User" %} + {% translate "Group" %} +
{% translate "Actions" %}
{{ g.group.name }} + {% if g.group.authgroup.description %} + {{ g.group.authgroup.description|linebreaks|urlize }} + {% endif %} + + {% if g.group.authgroup.group_leaders.all.count %} + {% for leader in g.group.authgroup.group_leaders.all %} + {% if leader.profile.main_character %} + {{leader.profile.main_character}} + {% endif %} + {% endfor %} + {% endif %} + {% if g.group.authgroup.group_leader_groups.all.count %} + {% for group in g.group.authgroup.group_leader_groups.all %} + {{group.name}} + {% endfor %} + {% endif %} + + {% if g.group in user_groups %} + {% if not g.request %} + + {% translate "Leave" %} + + {% else %} + + {% endif %} + {% elif not g.request %} + {% if g.group.authgroup.open %} + + {% translate "Join" %} + + {% else %} + + {% translate "Request" %} + {% endif %} - {% endfor %} - {% endif %} - {% if g.group.authgroup.group_leader_groups.all.count %} - {% for group in g.group.authgroup.group_leader_groups.all %} - {{group.name}} - {% endfor %} - {% endif %} - - {% if g.group in user_groups %} - {% if not g.request %} - - {% translate "Leave" %} - {% else %} - {% endif %} - {% elif not g.request %} - {% if g.group.authgroup.open %} - - {% translate "Join" %} - - {% else %} - - {% translate "Request" %} - - {% endif %} - {% else %} - - - {% translate "Retract" %} - - {% endif %} -
+ + {% translate "Retract" %} + + {% endif %} + + + {% endfor %} + + + {% else %}
{% translate "No groups available." %} @@ -107,6 +109,7 @@ {% block extra_javascript %} {% include 'bundles/datatables-2-js-bs5.html' %} + {% include 'bundles/datatables-2-responsive-js.html' %} {% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %} @@ -120,6 +123,7 @@ language: { url: '{{ DT_LANG_PATH }}' }, + responsive: true, }); }); @@ -127,4 +131,5 @@ {% block extra_css %} {% include 'bundles/datatables-2-css-bs5.html' %} + {% include 'bundles/datatables-2-responsive-css.html' %} {% endblock %} diff --git a/allianceauth/groupmanagement/templates/groupmanagement/index.html b/allianceauth/groupmanagement/templates/groupmanagement/index.html index 1d88894a..8597be90 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/index.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/index.html @@ -2,6 +2,7 @@ {% load static %} {% load i18n %} +{% load aa_i18n %} {% load evelinks %} {% load navactive %} @@ -47,14 +48,14 @@
{% if acceptrequests %} -
- +
+
- + @@ -124,14 +125,14 @@ {% if not show_leave_tab %}
{% if leaverequests %} -
-
{% translate "Character" %} {% translate "Organization" %} {% translate "Group" %}{% translate "Actions" %} {% translate "Corporation" %}
+
+
- + @@ -201,6 +202,7 @@ {% block extra_javascript %} {% include "bundles/datatables-2-js-bs5.html" %} + {% include "bundles/datatables-2-responsive-js.html" %} {% include "bundles/filterdropdown-js.html" %} {% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %} @@ -424,4 +426,5 @@ {% endblock extra_javascript %} {% block extra_css %} {% include 'bundles/datatables-2-css-bs5.html' %} + {% include 'bundles/datatables-2-responsive-css.html' %} {% endblock %} diff --git a/allianceauth/permissions_tool/templates/permissions_tool/audit.html b/allianceauth/permissions_tool/templates/permissions_tool/audit.html index 70dbddca..6eb61c47 100644 --- a/allianceauth/permissions_tool/templates/permissions_tool/audit.html +++ b/allianceauth/permissions_tool/templates/permissions_tool/audit.html @@ -56,6 +56,7 @@ {% endblock content %} {% block extra_javascript %} {% include "bundles/datatables-2-js-bs5.html" %} + {% include "bundles/datatables-2-responsive-js.html" %} {% include "bundles/filterdropdown-js.html" %} {% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %} @@ -69,7 +70,10 @@ const groupColumn = 0; const table_permission_audit = new DataTable($('#tab_permissions_audit'), { - language: {url: '{{ DT_LANG_PATH }}'}, + language: { + url: '{{ DT_LANG_PATH }}' + }, + responsive: true, columnDefs: [ { target: groupColumn, @@ -109,4 +113,5 @@ {% block extra_css %} {% include "bundles/datatables-2-css-bs5.html" %} + {% include "bundles/datatables-2-responsive-css.html" %} {% endblock extra_css %} diff --git a/allianceauth/permissions_tool/templates/permissions_tool/overview.html b/allianceauth/permissions_tool/templates/permissions_tool/overview.html index 9d423767..b65d8151 100644 --- a/allianceauth/permissions_tool/templates/permissions_tool/overview.html +++ b/allianceauth/permissions_tool/templates/permissions_tool/overview.html @@ -61,6 +61,7 @@ {% block extra_javascript %} {% include "bundles/datatables-2-js-bs5.html" %} + {% include "bundles/datatables-2-responsive-js.html" %} {% include "bundles/filterdropdown-js.html" %} {% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %} @@ -77,6 +78,7 @@ language: { url: '{{ DT_LANG_PATH }}' }, + responsive: true, columnDefs: [ { target: groupColumn, @@ -122,4 +124,5 @@ {% block extra_css %} {% include "bundles/datatables-2-css-bs5.html" %} + {% include "bundles/datatables-2-responsive-css.html" %} {% endblock extra_css %} diff --git a/allianceauth/services/modules/mumble/templates/services/mumble/mumble_connection_history.html b/allianceauth/services/modules/mumble/templates/services/mumble/mumble_connection_history.html index 18c5a70f..aea5f284 100644 --- a/allianceauth/services/modules/mumble/templates/services/mumble/mumble_connection_history.html +++ b/allianceauth/services/modules/mumble/templates/services/mumble/mumble_connection_history.html @@ -79,6 +79,7 @@ {% block extra_javascript %} {% include "bundles/datatables-2-js-bs5.html" %} + {% include "bundles/datatables-2-responsive-js.html" %} {% include "bundles/filterdropdown-js.html" %} {% include "bundles/chart-js.html" %} {% include "bundles/moment-js.html" with locale=True %} @@ -100,6 +101,7 @@ language: { url: '{{ DT_LANG_PATH }}' }, + responsive: true, ajax: { url: '{% url "mumble:connection_history_data" %}', dataSrc: 'connection_history_data', @@ -162,6 +164,7 @@ language: { url: '{{ DT_LANG_PATH }}' }, + responsive: true, ajax: { url: '{% url "mumble:release_counts_data" %}', dataSrc: 'release_counts_data', @@ -236,4 +239,5 @@ {% block extra_css %} {% include "bundles/datatables-2-css-bs5.html" %} + {% include "bundles/datatables-2-responsive-css.html" %} {% endblock extra_css %} diff --git a/allianceauth/srp/templates/srp/data.html b/allianceauth/srp/templates/srp/data.html index b21fa53c..97db52b2 100644 --- a/allianceauth/srp/templates/srp/data.html +++ b/allianceauth/srp/templates/srp/data.html @@ -166,6 +166,7 @@ ESC to cancel{% endblocktranslate %}" id="blah"> {% block extra_javascript %} {% include "bundles/datatables-2-js-bs5.html" %} + {% include "bundles/datatables-2-responsive-js.html" %} {% include "bundles/x-editable-js.html" %} {% include "bundles/moment-js.html" %} {% include "bundles/clipboard-js.html" %} @@ -249,6 +250,7 @@ ESC to cancel{% endblocktranslate %}" id="blah"> language: { url: '{{ DT_LANG_PATH }}' }, + responsive: true, order: [ [ 6, 'asc' ] ], @@ -275,6 +277,7 @@ ESC to cancel{% endblocktranslate %}" id="blah"> {% block extra_css %} {% include "bundles/datatables-2-css-bs5.html" %} + {% include "bundles/datatables-2-responsive-css.html" %} {% include "bundles/x-editable.css.html" %} {% include "bundles/checkbox-css.html" %} diff --git a/allianceauth/timerboard/templates/timerboard/timertable.html b/allianceauth/timerboard/templates/timerboard/timertable.html index 9028e1c4..211dce69 100644 --- a/allianceauth/timerboard/templates/timerboard/timertable.html +++ b/allianceauth/timerboard/templates/timerboard/timertable.html @@ -14,7 +14,7 @@ {% if perms.auth.timer_management %} - + {% endif %} @@ -26,7 +26,7 @@ {{ timer.details }} {% if timer.timer_type != 'UNSPECIFIED' %} -
+
({{ timer.get_timer_type_display }}) {% endif %} @@ -44,7 +44,6 @@ {% elif timer.objective == "Neutral" %}
{% endif %} - {{ timer.get_objective_display }}
diff --git a/allianceauth/timerboard/templates/timerboard/view.html b/allianceauth/timerboard/templates/timerboard/view.html index 3dee2040..e86c14c0 100644 --- a/allianceauth/timerboard/templates/timerboard/view.html +++ b/allianceauth/timerboard/templates/timerboard/view.html @@ -86,12 +86,14 @@ {% block extra_css %} {% include "bundles/datatables-2-css-bs5.html" %} + {% include "bundles/datatables-2-responsive-css.html" %} {% endblock extra_css %} {% block extra_javascript %} {% include "bundles/moment-js.html" with locale=True %} {% include "bundles/timers-js.html" %} {% include "bundles/datatables-2-js-bs5.html" %} + {% include "bundles/datatables-2-responsive-js.html" %} {% include "bundles/filterdropdown-js.html" %} {% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %} @@ -182,7 +184,10 @@ setInterval(timedUpdate, 1000); const dtOptions = { - language: {url: '{{ DT_LANG_PATH }}'}, + language: { + url: '{{ DT_LANG_PATH }}' + }, + responsive: true, order: [ [4, 'asc'] ],
{% translate "Character" %} {% translate "Organization" %} {% translate "Group" %}{% translate "Actions" %} {% translate "Corporation" %}
{% translate "Creator" %}{% translate "Action" %}{% translate "Actions" %}