From 9976ecc2aad5fcdf9904d968e0997454ae09c309 Mon Sep 17 00:00:00 2001 From: ErikKalkoken Date: Sat, 15 Feb 2020 20:10:30 +0100 Subject: [PATCH 1/7] Fix login and dashboard for display on mobiles --- .../templates/authentication/dashboard.html | 107 ++++++++++++------ .../templates/public/login.html | 4 +- allianceauth/static/css/auth-base.css | 25 ++++ .../allianceauth/admin-status/overview.html | 19 ++-- 4 files changed, 112 insertions(+), 43 deletions(-) diff --git a/allianceauth/authentication/templates/authentication/dashboard.html b/allianceauth/authentication/templates/authentication/dashboard.html index 8140a78f..ebea7e05 100644 --- a/allianceauth/authentication/templates/authentication/dashboard.html +++ b/allianceauth/authentication/templates/authentication/dashboard.html @@ -10,10 +10,12 @@ {% include 'allianceauth/admin-status/include.html' %} {% endif %}
-
+
-

{% trans "Main Character" %}

+
+

{% trans "Main Character" %}

+
{% if request.user.profile.main_character %} {% with request.user.profile.main_character as main %} @@ -25,12 +27,21 @@ - {{ main.character_name }} + + + + {{ main.character_name }}
+ {{ main.corporation_name }}
+ {{ main.alliance_name }} +
+
- +
+ + + + {% if perms.auth.timer_management %} + + {% endif %} + + {% endfor %} + +
{% endif %}

{% trans "Next Timers" %}

{% if future_timers %} - - - - - - - - - - {% if perms.auth.timer_management %} - - {% endif %} - - {% for timer in future_timers %} - {% if timer.important == True %} - - {% else %} - - {% endif %} - - - - - - - - {% if perms.auth.timer_management %} - - {% endif %} - - {% endfor %} -
{% trans "Details" %}{% trans "Objective" %}{% trans "System" %}{% trans "Structure" %}{% trans "Eve Time" %}{% trans "Local Time" %}{% trans "Creator" %}{% trans "Action" %}
{{ timer.details }} - {% if timer.objective == "Hostile" %} -
- {% trans "Hostile" %} -
- {% endif %} - {% if timer.objective == "Friendly" %} -
- {% trans "Friendly" %} -
- {% endif %} - {% if timer.objective == "Neutral" %} -
- {% trans "Neutral" %} -
- {% endif %} -
- {{ timer.system }} {{ timer.planet_moon }} - - {% if timer.structure == "POCO" %} -
- POCO -
- {% endif %} - {% if timer.structure == "I-HUB" %} -
- I-HUB -
- {% endif %} - {% if timer.structure == "TCU" %} -
- TCU -
- {% endif %} - {% if timer.structure == "POS[S]" %} -
- POS [S] -
- {% endif %} - {% if timer.structure == "POS[M]" %} -
- POS [M] -
- {% endif %} - {% if timer.structure == "POS[L]" %} -
- POS [L] -
- {% endif %} - {% if timer.structure == "Citadel[M]" or timer.structure == "Astrahus" %} -
- Astrahus -
- {% endif %} - {% if timer.structure == "Citadel[L]" or timer.structure == "Fortizar" %} -
- Fortizar -
- {% endif %} - {% if timer.structure == "Citadel[XL]" or timer.structure == "Keepstar" %} -
- Keepstar -
- {% endif %} - {% if timer.structure == "Engineering Complex[M]" or timer.structure == "Raitaru" %} -
- Raitaru -
- {% endif %} - {% if timer.structure == "Engineering Complex[L]" or timer.structure == "Azbel" %} -
- Azbel -
- {% endif %} - {% if timer.structure == "Engineering Complex[XL]" or timer.structure == "Sotiyo" %} -
- Sotiyo -
- {% endif %} - {% if timer.structure == "Refinery[M]" or timer.structure == "Athanor" %} -
- Athanor -
- {% endif %} - {% if timer.structure == "Refinery[L]" or timer.structure == "Tatara" %} -
- Tatara -
- {% endif %} - {% if timer.structure == "Cyno Beacon" or timer.structure == "Pharolux Cyno Beacon" %} -
- Pharolux Cyno Beacon -
- {% endif %} - {% if timer.structure == "Cyno Jammer" or timer.structure == "Tenebrex Cyno Jammer" %} -
- Tenebrex Cyno Jammer -
- {% endif %} - {% if timer.structure == "Jump Gate" or timer.structure == "Ansiblex Jump Gate" %} -
- Ansiblex Jump Gate -
- {% endif %} - {% if timer.structure == "Moon Mining Cycle" %} -
- Moon Mining Cycle -
- {% endif %} - {% if timer.structure == "Other" %} -
- Other -
- {% endif %} -
{{ timer.eve_time | date:"Y-m-d H:i" }} -
-
-
{{ timer.eve_character.character_name }} - - - - - - -
+
+ + + + + + + + + + {% if perms.auth.timer_management %} + + {% endif %} + + {% for timer in future_timers %} + {% if timer.important == True %} + + {% else %} + + {% endif %} + + + + + + + + {% if perms.auth.timer_management %} + + {% endif %} + + {% endfor %} +
{% trans "Details" %}{% trans "Objective" %}{% trans "System" %}{% trans "Structure" %}{% trans "Eve Time" %}{% trans "Local Time" %}{% trans "Creator" %}{% trans "Action" %}
{{ timer.details }} + {% if timer.objective == "Hostile" %} +
+ {% trans "Hostile" %} +
+ {% endif %} + {% if timer.objective == "Friendly" %} +
+ {% trans "Friendly" %} +
+ {% endif %} + {% if timer.objective == "Neutral" %} +
+ {% trans "Neutral" %} +
+ {% endif %} +
+ + {{ timer.system }} {{ timer.planet_moon }} + + + {% if timer.structure == "POCO" %} +
+ POCO +
+ {% endif %} + {% if timer.structure == "I-HUB" %} +
+ I-HUB +
+ {% endif %} + {% if timer.structure == "TCU" %} +
+ TCU +
+ {% endif %} + {% if timer.structure == "POS[S]" %} +
+ POS [S] +
+ {% endif %} + {% if timer.structure == "POS[M]" %} +
+ POS [M] +
+ {% endif %} + {% if timer.structure == "POS[L]" %} +
+ POS [L] +
+ {% endif %} + {% if timer.structure == "Citadel[M]" or timer.structure == "Astrahus" %} +
+ Astrahus +
+ {% endif %} + {% if timer.structure == "Citadel[L]" or timer.structure == "Fortizar" %} +
+ Fortizar +
+ {% endif %} + {% if timer.structure == "Citadel[XL]" or timer.structure == "Keepstar" %} +
+ Keepstar +
+ {% endif %} + {% if timer.structure == "Engineering Complex[M]" or timer.structure == "Raitaru" %} +
+ Raitaru +
+ {% endif %} + {% if timer.structure == "Engineering Complex[L]" or timer.structure == "Azbel" %} +
+ Azbel +
+ {% endif %} + {% if timer.structure == "Engineering Complex[XL]" or timer.structure == "Sotiyo" %} +
+ Sotiyo +
+ {% endif %} + {% if timer.structure == "Refinery[M]" or timer.structure == "Athanor" %} +
+ Athanor +
+ {% endif %} + {% if timer.structure == "Refinery[L]" or timer.structure == "Tatara" %} +
+ Tatara +
+ {% endif %} + {% if timer.structure == "Cyno Beacon" or timer.structure == "Pharolux Cyno Beacon" %} +
+ Pharolux Cyno Beacon +
+ {% endif %} + {% if timer.structure == "Cyno Jammer" or timer.structure == "Tenebrex Cyno Jammer" %} +
+ Tenebrex Cyno Jammer +
+ {% endif %} + {% if timer.structure == "Jump Gate" or timer.structure == "Ansiblex Jump Gate" %} +
+ Ansiblex Jump Gate +
+ {% endif %} + {% if timer.structure == "Moon Mining Cycle" %} +
+ Moon Mining Cycle +
+ {% endif %} + {% if timer.structure == "Other" %} +
+ Other +
+ {% endif %} +
{{ timer.eve_time | date:"Y-m-d H:i" }} +
+
+
{{ timer.eve_character.character_name }} + + + + + + +
+
{% else %} -
{% trans "No upcoming timers." %}
+
+ {% trans "No upcoming timers." %} +
{% endif %} +

{% trans "Past Timers" %}

{% if past_timers %} - - - - - - - - - - {% if perms.auth.timer_management %} - - {% endif %} - - {% for timer in past_timers %} - {% if timer.important == True %} - - {% else %} - - {% endif %} - - - - - - - - {% if perms.auth.timer_management %} - - {% endif %} - - {% endfor %} -
{% trans "Details" %}{% trans "Objective" %}{% trans "System" %}{% trans "Structure" %}{% trans "Eve Time" %}{% trans "Local Time" %}{% trans "Creator" %}{% trans "Action" %}
{{ timer.details }} - {% if timer.objective == "Hostile" %} -
- {% trans "Hostile" %} -
- {% endif %} - {% if timer.objective == "Friendly" %} -
- {% trans "Friendly" %} -
- {% endif %} - {% if timer.objective == "Neutral" %} -
- {% trans "Neutral" %} -
- {% endif %} -
- {{ timer.system }} {{ timer.planet_moon }} - - {% if timer.structure == "POCO" %} -
- POCO -
- {% endif %} - {% if timer.structure == "I-HUB" %} -
- I-HUB -
- {% endif %} - {% if timer.structure == "TCU" %} -
- TCU -
- {% endif %} - {% if timer.structure == "POS[S]" %} -
- POS [S] -
- {% endif %} - {% if timer.structure == "POS[M]" %} -
- POS [M] -
- {% endif %} - {% if timer.structure == "POS[L]" %} -
- POS [L] -
- {% endif %} - {% if timer.structure == "Citadel[M]" or timer.structure == "Astrahus" %} -
- Astrahus -
- {% endif %} - {% if timer.structure == "Citadel[L]" or timer.structure == "Fortizar" %} -
- Fortizar -
- {% endif %} - {% if timer.structure == "Citadel[XL]" or timer.structure == "Keepstar" %} -
- Keepstar -
- {% endif %} - {% if timer.structure == "Engineering Complex[M]" or timer.structure == "Raitaru" %} -
- Raitaru -
- {% endif %} - {% if timer.structure == "Engineering Complex[L]" or timer.structure == "Azbel" %} -
- Azbel -
- {% endif %} - {% if timer.structure == "Engineering Complex[XL]" or timer.structure == "Sotiyo" %} -
- Sotiyo -
- {% endif %} - {% if timer.structure == "Refinery[M]" or timer.structure == "Athanor" %} -
- Athanor -
- {% endif %} - {% if timer.structure == "Refinery[L]" or timer.structure == "Tatara" %} -
- Tatara -
- {% endif %} - {% if timer.structure == "Cyno Beacon" or timer.structure == "Pharolux Cyno Beacon" %} -
- Pharolux Cyno Beacon -
- {% endif %} - {% if timer.structure == "Cyno Jammer" or timer.structure == "Tenebrex Cyno Jammer" %} -
- Tenebrex Cyno Jammer -
- {% endif %} - {% if timer.structure == "Jump Gate" or timer.structure == "Ansiblex Jump Gate" %} -
- Ansiblex Jump Gate -
- {% endif %} - {% if timer.structure == "Moon Mining Cycle" %} -
- Moon Mining Cycle -
- {% endif %} - {% if timer.structure == "Other" %} -
- Other -
- {% endif %} -
{{ timer.eve_time | date:"Y-m-d H:i" }} -
-
-
{{ timer.eve_character.character_name }} - - - - - - -
+
+ + + + + + + + + + {% if perms.auth.timer_management %} + + {% endif %} + + {% for timer in past_timers %} + {% if timer.important == True %} + + {% else %} + + {% endif %} + + + + + + + + {% if perms.auth.timer_management %} + + {% endif %} + + {% endfor %} +
{% trans "Details" %}{% trans "Objective" %}{% trans "System" %}{% trans "Structure" %}{% trans "Eve Time" %}{% trans "Local Time" %}{% trans "Creator" %}{% trans "Action" %}
{{ timer.details }} + {% if timer.objective == "Hostile" %} +
+ {% trans "Hostile" %} +
+ {% endif %} + {% if timer.objective == "Friendly" %} +
+ {% trans "Friendly" %} +
+ {% endif %} + {% if timer.objective == "Neutral" %} +
+ {% trans "Neutral" %} +
+ {% endif %} +
+ + {{ timer.system }} {{ timer.planet_moon }} + + + {% if timer.structure == "POCO" %} +
+ POCO +
+ {% endif %} + {% if timer.structure == "I-HUB" %} +
+ I-HUB +
+ {% endif %} + {% if timer.structure == "TCU" %} +
+ TCU +
+ {% endif %} + {% if timer.structure == "POS[S]" %} +
+ POS [S] +
+ {% endif %} + {% if timer.structure == "POS[M]" %} +
+ POS [M] +
+ {% endif %} + {% if timer.structure == "POS[L]" %} +
+ POS [L] +
+ {% endif %} + {% if timer.structure == "Citadel[M]" or timer.structure == "Astrahus" %} +
+ Astrahus +
+ {% endif %} + {% if timer.structure == "Citadel[L]" or timer.structure == "Fortizar" %} +
+ Fortizar +
+ {% endif %} + {% if timer.structure == "Citadel[XL]" or timer.structure == "Keepstar" %} +
+ Keepstar +
+ {% endif %} + {% if timer.structure == "Engineering Complex[M]" or timer.structure == "Raitaru" %} +
+ Raitaru +
+ {% endif %} + {% if timer.structure == "Engineering Complex[L]" or timer.structure == "Azbel" %} +
+ Azbel +
+ {% endif %} + {% if timer.structure == "Engineering Complex[XL]" or timer.structure == "Sotiyo" %} +
+ Sotiyo +
+ {% endif %} + {% if timer.structure == "Refinery[M]" or timer.structure == "Athanor" %} +
+ Athanor +
+ {% endif %} + {% if timer.structure == "Refinery[L]" or timer.structure == "Tatara" %} +
+ Tatara +
+ {% endif %} + {% if timer.structure == "Cyno Beacon" or timer.structure == "Pharolux Cyno Beacon" %} +
+ Pharolux Cyno Beacon +
+ {% endif %} + {% if timer.structure == "Cyno Jammer" or timer.structure == "Tenebrex Cyno Jammer" %} +
+ Tenebrex Cyno Jammer +
+ {% endif %} + {% if timer.structure == "Jump Gate" or timer.structure == "Ansiblex Jump Gate" %} +
+ Ansiblex Jump Gate +
+ {% endif %} + {% if timer.structure == "Moon Mining Cycle" %} +
+ Moon Mining Cycle +
+ {% endif %} + {% if timer.structure == "Other" %} +
+ Other +
+ {% endif %} +
{{ timer.eve_time | date:"Y-m-d H:i" }} +
+
+
{{ timer.eve_character.character_name }} + + + + + + +
+
{% else %} -
{% trans "No past timers." %}
+
+ {% trans "No past timers." %} +
{% endif %}
From fffb21bb4f9718be7779ca2a3d6c498e6814801f Mon Sep 17 00:00:00 2001 From: ErikKalkoken Date: Mon, 17 Feb 2020 00:59:47 +0100 Subject: [PATCH 5/7] Fix spr, permissions_tool, improve group_management --- .../templates/groupmanagement/audit.html | 12 +- .../groupmanagement/groupmembers.html | 56 ++--- .../groupmanagement/groupmembership.html | 4 +- .../templates/groupmanagement/index.html | 80 ++++---- .../templates/permissions_tool/audit.html | 65 +++--- .../templates/permissions_tool/overview.html | 130 +++++++----- allianceauth/srp/templates/srp/data.html | 191 +++++++++--------- .../srp/templates/srp/management.html | 170 ++++++++-------- 8 files changed, 380 insertions(+), 328 deletions(-) diff --git a/allianceauth/groupmanagement/templates/groupmanagement/audit.html b/allianceauth/groupmanagement/templates/groupmanagement/audit.html index f4acf2d0..e95459c2 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/audit.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/audit.html @@ -13,7 +13,14 @@ {{ group }} - {% trans 'Audit Log' %}
-

All times displayed are EVE/UTC.

+

+ +   + + Back + + +

{% if entries %}
@@ -44,6 +51,9 @@ {% endfor %}
+

+ All times displayed are EVE/UTC. +

{% else %}
diff --git a/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html b/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html index 45f29f9b..0c565e33 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html @@ -14,17 +14,23 @@
{{ group.name }} - {% trans 'Members' %}
-
-
- {% if group.user_set %} +
+

+ +   + + Back + + +

+ {% if group.user_set %}
- - + @@ -38,20 +44,24 @@ - + {% else %} + (unknown) + {% endif %} +
{% trans "Portrait" %} {% trans "Character" %}{% trans "Corporation" %}{% trans "Alliance" %}{% trans "Organization" %}
- - {{ member.main_char.character_name }} - + {% if member.main_char %} + + {{ member.main_char.character_name }} + + {% else %} + {{ member.user.username }} + {% endif %} - - {{ member.main_char.corporation_name }} - - - + {% if member.main_char %} + + {{ member.main_char.corporation_name }} +
{{ member.main_char.alliance_name|default_if_none:"" }} - -
@@ -64,13 +74,13 @@

: Group leader

- {% else %} -
- {% trans "No group members to list." %} -
- {% endif %} -
+ {% else %} +
+ {% trans "No group members to list." %} +
+ {% endif %}
+
{% endblock content %} @@ -88,7 +98,7 @@ $('#tab_group_members').DataTable({ order: [ [ 1, "asc" ] ], columnDefs: [ - { "sortable": false, "targets": [0, 4] }, + { "sortable": false, "targets": [0, 3] }, ] }); }); diff --git a/allianceauth/groupmanagement/templates/groupmanagement/groupmembership.html b/allianceauth/groupmanagement/templates/groupmanagement/groupmembership.html index e8e8611e..08d5f5e5 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/groupmembership.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/groupmembership.html @@ -29,7 +29,9 @@ {% for group in groups %} - {{ group.name }} + + {{ group.name }} + {{ group.authgroup.description }} {% if group.authgroup.hidden %} diff --git a/allianceauth/groupmanagement/templates/groupmanagement/index.html b/allianceauth/groupmanagement/templates/groupmanagement/index.html index 493371ae..f9069b43 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/index.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/index.html @@ -32,38 +32,39 @@
- - - + + - - + {% for acceptrequest in acceptrequests %} - - - + - + {% else %} + (unknown) + {% endif %} + + + {% endfor %} +
{% trans "#" %}{% trans "Portrait" %}
{% trans "Character" %}{% trans "Corporation" %}{% trans "Alliance" %}{% trans "Organization" %} {% trans "Group" %}
{{ acceptrequest.id }} +
- - {{ acceptrequest.main_char.character_name }} - + {% if acceptrequest.main_char %} + + {{ acceptrequest.main_char.character_name }} + + {% else %} + {{ acceptrequest.user.username }} + {% endif %} - - {{ acceptrequest.main_char.corporation_name }} - - - + {% if acceptrequest.main_char %} + + {{ acceptrequest.main_char.corporation_name }} +
{{ acceptrequest.main_char.alliance_name|default_if_none:"" }} - -
{{ acceptrequest.group.name }} @@ -90,38 +91,39 @@
- - - + + - - + {% for leaverequest in leaverequests %} - - - + - + {% if leaverequest.main_char %} + + {{ leaverequest.main_char.corporation_name }} +
+ {{ leaverequest.main_char.alliance_name|default_if_none:"" }} + {% else %} + (unknown) + {% endif %} + + {% include 'permissions_tool/audit_state_row.html' %} + + {% endwith %} + {% endfor %} + {% endfor %} + +
{% trans "#" %}{% trans "Portrait" %}
{% trans "Character" %}{% trans "Corporation" %}{% trans "Alliance" %}{% trans "Organization" %} {% trans "Group" %}
{{ leaverequest.id }} +
- - {{ leaverequest.main_char.character_name }} - + {% if leaverequest.main_char %} + + {{ leaverequest.main_char.character_name }} + + {% else %} + {{ leaverequest.user.username }} + {% endif %} - - {{ leaverequest.main_char.corporation_name }} - - - - {{ leaverequest.main_char.alliance_name|default_if_none:"" }} - - {{ leaverequest.group.name }} diff --git a/allianceauth/permissions_tool/templates/permissions_tool/audit.html b/allianceauth/permissions_tool/templates/permissions_tool/audit.html index 660d8dcb..2b1c78a4 100644 --- a/allianceauth/permissions_tool/templates/permissions_tool/audit.html +++ b/allianceauth/permissions_tool/templates/permissions_tool/audit.html @@ -11,38 +11,41 @@ {% trans "Back" %} - - - - - - - - - {% for user in permission.users %} - - {% include 'permissions_tool/audit_row.html' with group="Permission Granted Directly (No Group)" %} - - {% endfor %} - {% for group in permission.groups %} - {% for user in group.user_set.all %} - {% include 'permissions_tool/audit_row.html' %} +
+
- {% trans "Group" %} - - {% trans "User" %} -
+ + + + + + + + {% for user in permission.users %} + + {% include 'permissions_tool/audit_row.html' with group="Permission Granted Directly (No Group)" %} + {% endfor %} - {% endfor %} - {% for state in permission.states %} - {% for profile in state.userprofile_set.all %} - {% with profile.user as user %} - - {% include 'permissions_tool/audit_state_row.html' %} - - {% endwith %} + {% for group in permission.groups %} + {% for user in group.user_set.all %} + {% include 'permissions_tool/audit_row.html' %} + {% endfor %} {% endfor %} - {% endfor %} - -
+ {% trans "Group" %} + + {% trans "User" %} +
+ {% for state in permission.states %} + {% for profile in state.userprofile_set.all %} + {% with profile.user as user %} +
+
{% endblock content %} + diff --git a/allianceauth/permissions_tool/templates/permissions_tool/overview.html b/allianceauth/permissions_tool/templates/permissions_tool/overview.html index 3e8f509d..75b7a0b0 100644 --- a/allianceauth/permissions_tool/templates/permissions_tool/overview.html +++ b/allianceauth/permissions_tool/templates/permissions_tool/overview.html @@ -19,61 +19,79 @@ {% trans "Show Applied" %} {% endif %} - - - - - - - - - - - - - - {% for perm in permissions %} - - - - - - - - - - {% endfor %} - -
- {% trans "App" %} - - {% trans "Model" %} - - {% trans "Code Name" %} - - {% trans "Name" %} - - {% trans "Users" %} - - {% trans "Groups" %} - - {% trans "States" %} -
- {{ perm.permission.content_type.app_label }} - - {{ perm.permission.content_type.model }} - - - {{ perm.permission.codename }} - - - {{ perm.permission.name }} - - {{ perm.users }} - - {{ perm.groups }} ({{ perm.group_users }}) - - {{ perm.states }} ({{ perm.state_users }}) -
+
+ + + + + + + + + + + + + + {% for perm in permissions %} + + + + + + + + + + {% endfor %} + +
+ {% trans "App" %} + + {% trans "Model" %} + + {% trans "Code Name" %} + + {% trans "Name" %} + + {% trans "Users" %} + + {% trans "Groups" %} + + {% trans "States" %} +
+ {{ perm.permission.content_type.app_label }} + + {{ perm.permission.content_type.model }} + + + {{ perm.permission.codename }} + + + {{ perm.permission.name }} + + {{ perm.users }} + + {{ perm.groups }} ({{ perm.group_users }}) + + {{ perm.states }} ({{ perm.state_users }}) +
+
{% endblock content %} + +{% block extra_javascript %} + {% include 'bundles/datatables-js.html' %} +{% endblock %} + +{% block extra_css %} + {% include 'bundles/datatables-css.html' %} +{% endblock %} + +{% block extra_script %} + $(document).ready(function(){ + $('#tab_permissions_overview').DataTable({ + order: [ [ 0, "asc" ], [ 1, "asc" ], [ 2, "asc" ] ] + }); + }); +{% endblock %} \ No newline at end of file diff --git a/allianceauth/srp/templates/srp/data.html b/allianceauth/srp/templates/srp/data.html index 3d4bacd5..074f4b0f 100644 --- a/allianceauth/srp/templates/srp/data.html +++ b/allianceauth/srp/templates/srp/data.html @@ -62,104 +62,107 @@ {% if srpfleetrequests %} -
- {% csrf_token %} - - - - - - - - - - {% endblocktrans %} - - - {% if perms.auth.srp_management %} - - {% endif %} - - {% for srpfleetrequest in srpfleetrequests %} - - - - - - - - - + + {% csrf_token %} + + + + {% endif %} - - {% endfor %} -
{% trans "Pilot Name" %}{% trans "Killboard Link" %}{% trans "Additional Info" %}{% trans "Ship Type" %}{% trans "Killboard Loss Amt" %}{% trans "SRP ISK Cost" %} - {% blocktrans %}{% trans "Post Time" %}{% trans "Status" %}{% trans "Actions" %}
{{ srpfleetrequest.character.character_name }} - Link - {{ srpfleetrequest.additional_info }}{{ srpfleetrequest.srp_ship_name }}{{ srpfleetrequest.kb_total_loss | intcomma }} ISK{{ srpfleetrequest.srp_total_amount | intcomma }} ISK{{ srpfleetrequest.post_time | date:"Y-m-d H:i" }} - {% if srpfleetrequest.srp_status == "Approved" %} -
- {% trans "Approved" %} -
- {% elif srpfleetrequest.srp_status == "Rejected" %} -
- {% trans "Rejected" %} -
- {% else %} -
- {% trans "Pending" %} -
- {% endif %} -
-
- -
-
- - -
+
+ + + + + + + + {% endblocktrans %} + + + {% if perms.auth.srp_management %} + + {% endif %} + + {% for srpfleetrequest in srpfleetrequests %} + + + + + + + + + + {% if perms.auth.srp_management %} + + {% endif %} + + {% endfor %} +
{% trans "Pilot Name" %}{% trans "Killboard Link" %}{% trans "Additional Info" %}{% trans "Ship Type" %}{% trans "Killboard Loss Amt" %}{% trans "SRP ISK Cost" %} + {% blocktrans %}{% trans "Post Time" %}{% trans "Status" %}{% trans "Actions" %}
{{ srpfleetrequest.character.character_name }} + Link + {{ srpfleetrequest.additional_info }}{{ srpfleetrequest.srp_ship_name }}{{ srpfleetrequest.kb_total_loss | intcomma }} ISK{{ srpfleetrequest.srp_total_amount | intcomma }} ISK{{ srpfleetrequest.post_time | date:"Y-m-d H:i" }} + {% if srpfleetrequest.srp_status == "Approved" %} +
+ {% trans "Approved" %} +
+ {% elif srpfleetrequest.srp_status == "Rejected" %} +
+ {% trans "Rejected" %} +
+ {% else %} +
+ {% trans "Pending" %} +
+ {% endif %} +
+
+ +
+
+
+ + {% else %} -
{% trans "No SRP requests for this fleet." %}
+
+ {% trans "No SRP requests for this fleet." %} +
{% endif %} diff --git a/allianceauth/srp/templates/srp/management.html b/allianceauth/srp/templates/srp/management.html index 863e97ac..4b97fbb4 100644 --- a/allianceauth/srp/templates/srp/management.html +++ b/allianceauth/srp/templates/srp/management.html @@ -31,94 +31,98 @@ {% if srpfleets %} - - - - - - - - - - - - - - {% for srpfleet in srpfleets %} - - - - - - - - +
+
{% trans "Fleet Name" %}{% trans "Fleet Time" %}{% trans "Fleet Doctrine" %}{% trans "Fleet Commander" %}{% trans "Fleet AAR" %}{% trans "Fleet SRP Code" %}{% trans "Fleet ISK Cost" %}{% trans "SRP Status" %}{% trans "Pending Requests" %}{% trans "Actions" %}
-
- {{ srpfleet.fleet_name }} -
-
{{ srpfleet.fleet_time | date:"Y-m-d H:i" }}{{ srpfleet.fleet_doctrine }} -
- {{ srpfleet.fleet_commander.character_name }} -
-
- {% if srpfleet.fleet_srp_aar_link %} - {% trans 'Link' %} - {% endif %} - - {% if srpfleet.fleet_srp_code %} - {{ srpfleet.fleet_srp_code }} - {% else %} -
- {% trans "Disabled" %} -
- {% endif %} -
ISK: {{ srpfleet.total_cost | intcomma }}
+ + + + + + + + + + + + + {% for srpfleet in srpfleets %} + + + + + + + + - - - + + - - {% endfor %} -
{% trans "Fleet Name" %}{% trans "Fleet Time" %}{% trans "Fleet Doctrine" %}{% trans "Fleet Commander" %}{% trans "Fleet AAR" %}{% trans "Fleet SRP Code" %}{% trans "Fleet ISK Cost" %}{% trans "SRP Status" %}{% trans "Pending Requests" %}{% trans "Actions" %}
+
+ {{ srpfleet.fleet_name }} +
+
{{ srpfleet.fleet_time | date:"Y-m-d H:i" }}{{ srpfleet.fleet_doctrine }} +
+ {{ srpfleet.fleet_commander.character_name }} +
+
+ {% if srpfleet.fleet_srp_aar_link %} + {% trans 'Link' %} + {% endif %} + + {% if srpfleet.fleet_srp_code %} + {{ srpfleet.fleet_srp_code }} + {% else %} +
+ {% trans "Disabled" %} +
+ {% endif %} +
ISK: {{ srpfleet.total_cost | intcomma }} - {% if srpfleet.fleet_srp_status == "" %} -
- {% trans "Pending" %} -
- {% else %} -
- {% trans "Completed" %} -
- {% endif %} -
-
{{ srpfleet.pending_requests }}
-
+ + {% if srpfleet.fleet_srp_status == "" %} +
+ {% trans "Pending" %} +
+ {% else %} +
+ {% trans "Completed" %} +
+ {% endif %} +
+
{{ srpfleet.pending_requests }}
+
- - - - - {% if perms.auth.srp_management %} - - - - - - - - {% if srpfleet.fleet_srp_code %} - - + + - {% else %} - - - - {% endif %} - {% endif %} -
+ {% if perms.auth.srp_management %} + + + + + + + + {% if srpfleet.fleet_srp_code %} + + + + {% else %} + + + + {% endif %} + + {% endif %} +
+
{% else %} -
{% trans "No SRP fleets created." %}
+
+ {% trans "No SRP fleets created." %} +
{% endif %}
From 59855a71efe4160e88c3c094152ee6eb6dad8ef3 Mon Sep 17 00:00:00 2001 From: ErikKalkoken Date: Mon, 17 Feb 2020 20:16:30 +0100 Subject: [PATCH 6/7] Fix layout bug and improve UI for permission tool, add filterDropDown JS --- .../templates/public/login.html | 10 +-- .../templates/permissions_tool/audit.html | 77 ++++++++++++++----- .../templates/permissions_tool/audit_row.html | 25 ++++-- .../permissions_tool/audit_state_row.html | 11 --- .../templates/permissions_tool/overview.html | 62 +++++++++++---- allianceauth/static/css/auth-base.css | 6 ++ .../js/filterDropDown/filterDropDown.min.js | 1 + .../filterDropDown.min.js:Zone.Identifier | 4 + 8 files changed, 140 insertions(+), 56 deletions(-) delete mode 100644 allianceauth/permissions_tool/templates/permissions_tool/audit_state_row.html create mode 100644 allianceauth/static/js/filterDropDown/filterDropDown.min.js create mode 100644 allianceauth/static/js/filterDropDown/filterDropDown.min.js:Zone.Identifier diff --git a/allianceauth/authentication/templates/public/login.html b/allianceauth/authentication/templates/public/login.html index 0129d058..80d31979 100644 --- a/allianceauth/authentication/templates/public/login.html +++ b/allianceauth/authentication/templates/public/login.html @@ -1,10 +1,8 @@ {% extends 'public/middle_box.html' %} {% load static %} {% block page_title %}Login{% endblock %} -{% block middle_box_content %} -

- - - -

+{% block middle_box_content %} + + + {% endblock %} \ No newline at end of file diff --git a/allianceauth/permissions_tool/templates/permissions_tool/audit.html b/allianceauth/permissions_tool/templates/permissions_tool/audit.html index 2b1c78a4..c967f91f 100644 --- a/allianceauth/permissions_tool/templates/permissions_tool/audit.html +++ b/allianceauth/permissions_tool/templates/permissions_tool/audit.html @@ -8,38 +8,34 @@ {% block content %}

{% trans "Permissions Audit" %}: {{ permission.permission.codename }}

- - {% trans "Back" %} - +

+ + {% trans "Back" %} + +

- +
- - + + + + - {% for user in permission.users %} - - {% include 'permissions_tool/audit_row.html' with group="Permission Granted Directly (No Group)" %} - + {% for user in permission.users %} + {% include 'permissions_tool/audit_row.html' with type="User" name="Permission granted directlty" %} {% endfor %} {% for group in permission.groups %} {% for user in group.user_set.all %} - {% include 'permissions_tool/audit_row.html' %} + {% include 'permissions_tool/audit_row.html' with type="Group" name=group%} {% endfor %} {% endfor %} {% for state in permission.states %} {% for profile in state.userprofile_set.all %} {% with profile.user as user %} - - {% include 'permissions_tool/audit_state_row.html' %} - + {% include 'permissions_tool/audit_row.html' with type="State" name=state%} {% endwith %} {% endfor %} {% endfor %} @@ -49,3 +45,48 @@ {% endblock content %} +{% block extra_javascript %} + {% include 'bundles/datatables-js.html' %} + +{% endblock %} + +{% block extra_css %} + {% include 'bundles/datatables-css.html' %} +{% endblock %} + +{% block extra_script %} + $(document).ready(function() { + var groupColumn = 0; + var table = $('#tab_permissions_audit').DataTable({ + columnDefs: [ + { "visible": false, "targets": groupColumn } + ], + order: [[ groupColumn, 'asc' ], [ 2, 'asc' ] ], + filterDropDown: + { + columns: [ + { + idx: 0, + title: 'Source' + } + ], + bootstrap: true + }, + drawCallback: function ( settings ) { + var api = this.api(); + var rows = api.rows( {page:'current'} ).nodes(); + var last=null; + + api.column(groupColumn, {page:'current'} ).data().each( function ( group, i ) { + if ( last !== group ) { + $(rows).eq( i ).before( + '' + ); + + last = group; + } + } ); + } + } ); + } ); +{% endblock %} \ No newline at end of file diff --git a/allianceauth/permissions_tool/templates/permissions_tool/audit_row.html b/allianceauth/permissions_tool/templates/permissions_tool/audit_row.html index 7431556b..390e04d7 100644 --- a/allianceauth/permissions_tool/templates/permissions_tool/audit_row.html +++ b/allianceauth/permissions_tool/templates/permissions_tool/audit_row.html @@ -1,10 +1,25 @@ +{% load evelinks %} + - + + diff --git a/allianceauth/permissions_tool/templates/permissions_tool/audit_state_row.html b/allianceauth/permissions_tool/templates/permissions_tool/audit_state_row.html deleted file mode 100644 index dd8baa5f..00000000 --- a/allianceauth/permissions_tool/templates/permissions_tool/audit_state_row.html +++ /dev/null @@ -1,11 +0,0 @@ -{% load i18n %} - - - - diff --git a/allianceauth/permissions_tool/templates/permissions_tool/overview.html b/allianceauth/permissions_tool/templates/permissions_tool/overview.html index 75b7a0b0..6cb1703c 100644 --- a/allianceauth/permissions_tool/templates/permissions_tool/overview.html +++ b/allianceauth/permissions_tool/templates/permissions_tool/overview.html @@ -8,19 +8,17 @@ {% block content %}

{% trans "Permissions Overview" %}

- {% if request.GET.all != 'yes' %} - - {% blocktrans %}Showing only applied permissions{% endblocktrans %} - {% trans "Show All" %} - +

+ {% if request.GET.all != 'yes' %} + {% blocktrans %}Showing only applied permissions{% endblocktrans %} + {% trans "Show All" %} {% else %} - - {% blocktrans %}Showing all permissions{% endblocktrans %} - {% trans "Show Applied" %} - + {% blocktrans %}Showing all permissions{% endblocktrans %} + {% trans "Show Applied" %} {% endif %} +

-
- {% trans "Group" %} - - {% trans "User" %} - {% trans "Group" %}{% trans "User / Character" %}{% trans "Organization" %}
' + group + '
- {% if forloop.first %} - {{ group }} - {% endif %} + + {{ type }}: {{ name }} + + - {{ user }} + {{ user }}
+ {{ user.profile.main_character.character_name }} +
+ {% if user.profile.main_character %} + + {{ user.profile.main_character.corporation_name }} +
+ {{ user.profile.main_character.alliance_name|default_if_none:"" }} + {% else %} + (unknown) + {% endif %} +
- {% if forloop.first %} - {% trans 'State' %}: {{ state }} - {% endif %} - - {{ user }} -
+
' + ); + + last = group; + } + } ); + } + } ); + } ); {% endblock %} \ No newline at end of file diff --git a/allianceauth/static/css/auth-base.css b/allianceauth/static/css/auth-base.css index cd069235..1448a323 100644 --- a/allianceauth/static/css/auth-base.css +++ b/allianceauth/static/css/auth-base.css @@ -43,6 +43,12 @@ ul.list-group.list-group-horizontal > li.list-group-item { justify-content: center; } +/* group headers within a table */ +.tr-group { + font-weight: bold; + background-color: #e6e6e6 !important; +} + /* Small devices (tablets, 768px and up) */ @media (min-width: 768px) { diff --git a/allianceauth/static/js/filterDropDown/filterDropDown.min.js b/allianceauth/static/js/filterDropDown/filterDropDown.min.js new file mode 100644 index 00000000..d19686ff --- /dev/null +++ b/allianceauth/static/js/filterDropDown/filterDropDown.min.js @@ -0,0 +1 @@ +!function(t){function e(t){var e={columns:[],columnsIdxList:[],bootstrap:!1,autoSize:!0,label:"Filter "};if("bootstrap"in t&&"boolean"==typeof t.bootstrap&&(e.bootstrap=t.bootstrap),"autoSize"in t&&"boolean"==typeof t.autoSize&&(e.autoSize=t.autoSize),"label"in t&&"string"==typeof t.label&&(e.label=t.label),"columns"in t)for(var i=0;i'+r.label+""),o.columns(r.columnsIdxList).every(function(){var e=this.index(),i=null!==r.columns[e].title?r.columns[e].title:t(this.header()).html();""==i&&(i="column "+(e+1));var n="form-control "+a+"_filterSelect",o=a+"_filterSelect"+e;t("#"+s).append('');var l=t("#"+o).empty().append('");r.autoSize&&r.columns[e].autoSize&&screen.width>768&&l.css("max-width",l.outerWidth()),null!==r.columns[e].maxWidth&&l.css("max-width",r.columns[e].maxWidth)})}}}}),t(document).on("init.dt",function(i,n){if("dt"===i.namespace){var o=new t.fn.dataTable.Api(n),a=o.table().node().id,l=o.init();if("filterDropDown"in l){var r=e(l.filterDropDown);o.table().container();o.columns(r.columnsIdxList).every(function(){var e=this,i=e.index(),n=t("#"+(a+"_filterSelect"+i));n.on("change",function(){var i=t.fn.dataTable.util.escapeRegex(t(this).val());e.search(i?"^"+i+"$":"",!0,!1).draw()}),e.data().unique().sort().each(function(t,e){""!=t&&n.append('")})})}}})}(jQuery); \ No newline at end of file diff --git a/allianceauth/static/js/filterDropDown/filterDropDown.min.js:Zone.Identifier b/allianceauth/static/js/filterDropDown/filterDropDown.min.js:Zone.Identifier new file mode 100644 index 00000000..8408f13c --- /dev/null +++ b/allianceauth/static/js/filterDropDown/filterDropDown.min.js:Zone.Identifier @@ -0,0 +1,4 @@ +[ZoneTransfer] +ZoneId=3 +ReferrerUrl=https://github.com/ErikKalkoken/filterDropDown/blob/master/js/filterDropDown.min.js +HostUrl=https://raw.githubusercontent.com/ErikKalkoken/filterDropDown/master/js/filterDropDown.min.js From 0f9927686b9b55132251b76e8c78a8092b73044d Mon Sep 17 00:00:00 2001 From: ErikKalkoken Date: Mon, 17 Feb 2020 23:45:00 +0100 Subject: [PATCH 7/7] Add new standard table style, improve UI for group management --- .../templates/authentication/dashboard.html | 6 +-- .../templates/groupmanagement/audit.html | 52 ++++++++++++++----- .../groupmanagement/groupmembers.html | 13 ++--- .../groupmanagement/groupmembership.html | 2 +- .../templates/groupmanagement/groups.html | 2 +- .../templates/groupmanagement/index.html | 4 +- allianceauth/static/css/auth-base.css | 19 ++++++- 7 files changed, 69 insertions(+), 29 deletions(-) diff --git a/allianceauth/authentication/templates/authentication/dashboard.html b/allianceauth/authentication/templates/authentication/dashboard.html index 99d43ee7..32896cbc 100644 --- a/allianceauth/authentication/templates/authentication/dashboard.html +++ b/allianceauth/authentication/templates/authentication/dashboard.html @@ -98,7 +98,7 @@
-
@@ -81,7 +79,8 @@ {% endblock content %} {% block extra_javascript %} - {% include 'bundles/datatables-js.html' %} + {% include 'bundles/datatables-js.html' %} + {% endblock %} {% block extra_css %} @@ -89,9 +88,40 @@ {% endblock %} {% block extra_script %} - $(document).ready(function(){ - $('#tab_permissions_overview').DataTable({ - order: [ [ 0, "asc" ], [ 1, "asc" ], [ 2, "asc" ] ] - }); - }); + $(document).ready(function() { + var groupColumn = 0; + var table = $('#tab_permissions_overview').DataTable({ + columnDefs: [ + { "visible": false, "targets": groupColumn } + ], + order: [[ groupColumn, 'asc' ], [ 1, 'asc' ], [ 2, 'asc' ] ], + filterDropDown: + { + columns: [ + { + idx: 0 + }, + { + idx: 1 + } + ], + bootstrap: true + }, + drawCallback: function ( settings ) { + var api = this.api(); + var rows = api.rows( {page:'current'} ).nodes(); + var last=null; + + api.column(groupColumn, {page:'current'} ).data().each( function ( group, i ) { + if ( last !== group ) { + $(rows).eq( i ).before( + '
' + group + '
+
{% for group in user.groups.all %} @@ -118,7 +118,7 @@
-
{{ group.name }}
+ @@ -141,7 +141,7 @@ {% endfor %} - +
{% for ownership in request.user.character_ownerships.all %} {% with ownership.character as char %} diff --git a/allianceauth/groupmanagement/templates/groupmanagement/audit.html b/allianceauth/groupmanagement/templates/groupmanagement/audit.html index e95459c2..cec10171 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/audit.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/audit.html @@ -14,12 +14,9 @@

- -   - - Back - - + + Back +

{% if entries %}
@@ -27,8 +24,8 @@
- - + + @@ -39,7 +36,7 @@ - + {% if entry.request_type is None %} @@ -55,10 +52,12 @@ All times displayed are EVE/UTC.

- {% else %} -
+ {% else %} +
+
+
{% trans "No entries found for this group." %} -
+
{% endif %} @@ -67,6 +66,7 @@ {% block extra_javascript %} {% include 'bundles/datatables-js.html' %} + {% endblock %} {% block extra_css %} @@ -75,7 +75,33 @@ {% block extra_script %} $(document).ready(function(){ - $('#log-entries').DataTable(); + $('#log-entries').DataTable({ + order: [[ 0, 'desc' ], [ 1, 'asc' ] ], + filterDropDown: + { + columns: [ + { + idx: 1 + }, + { + idx: 2 + }, + { + idx: 3 + }, + { + idx: 4 + }, + { + idx: 5 + }, + { + idx: 6 + } + ], + bootstrap: true + }, + }); }); {% endblock %} diff --git a/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html b/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html index 0c565e33..2eb97342 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/groupmembers.html @@ -15,17 +15,14 @@ {{ group.name }} - {% trans 'Members' %}
-

- -   - - Back - - +

+ + Back +

{% if group.user_set %}
-
{% trans "Date/Time" %} {% trans "Requestor" %}{% trans "Main Character" %}{% trans "Group" %}{% trans "Character" %}{% trans "Corporation" %} {% trans "Type" %} {% trans "Action" %} {% trans "Actor" %}{{ entry.date }} {{ entry.requestor }} {{ entry.req_char }}{{ entry.group }}{{ entry.req_char.corporation_name }} {{ entry.type_to_str }} Removed
+
diff --git a/allianceauth/groupmanagement/templates/groupmanagement/groupmembership.html b/allianceauth/groupmanagement/templates/groupmanagement/groupmembership.html index 08d5f5e5..eee6b0fb 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/groupmembership.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/groupmembership.html @@ -16,7 +16,7 @@
{% if groups %}
-
{% trans "Portrait" %}
+
diff --git a/allianceauth/groupmanagement/templates/groupmanagement/groups.html b/allianceauth/groupmanagement/templates/groupmanagement/groups.html index 37f654e1..e6f97f75 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/groups.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/groups.html @@ -9,7 +9,7 @@ url

{% trans "Available Groups" %}

{% if groups %} -
{% trans "Name" %}
+
diff --git a/allianceauth/groupmanagement/templates/groupmanagement/index.html b/allianceauth/groupmanagement/templates/groupmanagement/index.html index f9069b43..68224f59 100644 --- a/allianceauth/groupmanagement/templates/groupmanagement/index.html +++ b/allianceauth/groupmanagement/templates/groupmanagement/index.html @@ -30,7 +30,7 @@
{% if acceptrequests %}
-
{% trans "Name" %}
+
@@ -89,7 +89,7 @@
{% if leaverequests %}
-
+
diff --git a/allianceauth/static/css/auth-base.css b/allianceauth/static/css/auth-base.css index 1448a323..73400a1f 100644 --- a/allianceauth/static/css/auth-base.css +++ b/allianceauth/static/css/auth-base.css @@ -43,12 +43,29 @@ ul.list-group.list-group-horizontal > li.list-group-item { justify-content: center; } -/* group headers within a table */ +/* style group headers within a table */ .tr-group { font-weight: bold; background-color: #e6e6e6 !important; } +/* default style for tables */ +.table-aa > thead > tr > th{ + border-bottom: 1px solid #f2f2f2; +} +.table-aa > thead > tr > th{ + vertical-align: middle; +} +.table-aa > tbody > tr > td{ + border-bottom: 1px solid #f2f2f2; +} +.table-aa > tbody > tr > td { + vertical-align: middle; +} +.table-aa > tbody > tr:last-child { + border-bottom: none; +} + /* Small devices (tablets, 768px and up) */ @media (min-width: 768px) {