From 3c11c25d69fa268dfec95f2364dff9c1b78a395d Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Sat, 11 Aug 2018 11:03:36 +0200 Subject: [PATCH 1/4] Corrected usage of Bootstrap classes in FleetUp templates --- .gitignore | 2 + .../fleetup/templates/fleetup/characters.html | 2 +- .../fleetup/templates/fleetup/doctrine.html | 6 +-- .../templates/fleetup/doctrinesview.html | 8 ++-- .../fleetup/templates/fleetup/fitting.html | 42 ++++++++++--------- .../templates/fleetup/fittingsview.html | 8 ++-- .../fleetup/templates/fleetup/index.html | 25 +++++------ 7 files changed, 49 insertions(+), 44 deletions(-) diff --git a/.gitignore b/.gitignore index a06f33f4..046a0618 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,5 @@ celerybeat-schedule #pycharm .idea/* + +/nbproject/ diff --git a/allianceauth/fleetup/templates/fleetup/characters.html b/allianceauth/fleetup/templates/fleetup/characters.html index c805a8ea..7ab8c191 100644 --- a/allianceauth/fleetup/templates/fleetup/characters.html +++ b/allianceauth/fleetup/templates/fleetup/characters.html @@ -15,7 +15,7 @@
-
+
diff --git a/allianceauth/fleetup/templates/fleetup/doctrine.html b/allianceauth/fleetup/templates/fleetup/doctrine.html index a06d0c18..3564356f 100644 --- a/allianceauth/fleetup/templates/fleetup/doctrine.html +++ b/allianceauth/fleetup/templates/fleetup/doctrine.html @@ -8,12 +8,12 @@ {% block content %}
{% include "fleetup/menu.html" %} -
+
{% for a, j in doctrine.items %} {% regroup j.Data|dictsort:"Role" by Role as role_list %} {% for Role in role_list %} - +

{{ Role.grouper }}

@@ -50,7 +50,7 @@ {% load humanize %}{{ item.EstPrice|intword }}
diff --git a/allianceauth/fleetup/templates/fleetup/doctrinesview.html b/allianceauth/fleetup/templates/fleetup/doctrinesview.html index acb2b3c5..c0e47329 100644 --- a/allianceauth/fleetup/templates/fleetup/doctrinesview.html +++ b/allianceauth/fleetup/templates/fleetup/doctrinesview.html @@ -8,12 +8,12 @@ {% block content %}
{% include "fleetup/menu.html" %} -
+
{% if doctrines_list %} {% for a, j in doctrines_list.items %} {% regroup j|dictsort:"FolderName" by FolderName as folder_list %} {% for FolderName in folder_list %} -
+

{{ FolderName.grouper }}

@@ -29,11 +29,11 @@
--> {% for item in FolderName.list %} - + + diff --git a/allianceauth/fleetup/templates/fleetup/fitting.html b/allianceauth/fleetup/templates/fleetup/fitting.html index ecf638c2..eff680af 100644 --- a/allianceauth/fleetup/templates/fleetup/fitting.html +++ b/allianceauth/fleetup/templates/fleetup/fitting.html @@ -8,9 +8,9 @@ {% block content %}
{% include "fleetup/menu.html" %} -
+
-
+
{% for x, y in fitting_data.items %}
@@ -18,22 +18,24 @@
{% for doctrin in y.Doctrines %} -

{{ doctrin.Name }}

-
-

{% trans "Role in doctrine:" %} {{ doctrin.Role }}

-
-
-

{% trans "Priority:" %}

-
-
-
-
- {{ doctrin.Priority }}/5 +
+

{{ doctrin.Name }}

+
+

{% trans "Role in doctrine:" %} {{ doctrin.Role }}

+
+
+

{% trans "Priority:" %}

+
+
+
+
+ {{ doctrin.Priority }}/5 +
-
- {% endfor %}
@@ -56,10 +58,10 @@
{% for arbit, orbit in doctrines_list.items %} - + {% for fitting in orbit.Data %} - +

{{ fitting.Name }}

{{ fitting.Role }} - {{ fitting.ShipType }}

@@ -107,8 +109,8 @@ {% endfor %}
- -
+ +

{% trans "EFT/Export" %}

diff --git a/allianceauth/fleetup/templates/fleetup/fittingsview.html b/allianceauth/fleetup/templates/fleetup/fittingsview.html index 37aeb962..265ae3e2 100644 --- a/allianceauth/fleetup/templates/fleetup/fittingsview.html +++ b/allianceauth/fleetup/templates/fleetup/fittingsview.html @@ -20,11 +20,11 @@
{% for id, fittings in fitting_list %} - + + @@ -38,12 +38,12 @@ {% load humanize %}{{ fittings.estimated|intword }} - + {% endfor %}
- {% for categories in item.Categories %} + {% for categories in item.Categories %} {{ categories }}, {% endfor %} Note
- {{ item.Name }} {% trans "Categories" %}
- {{ fittings.name }} - {% for categories in fittings.categories %} + {% for categories in fittings.categories %} {{ categories }}, {% endfor %}
{% else %} diff --git a/allianceauth/fleetup/templates/fleetup/index.html b/allianceauth/fleetup/templates/fleetup/index.html index aafad68b..8b9350eb 100644 --- a/allianceauth/fleetup/templates/fleetup/index.html +++ b/allianceauth/fleetup/templates/fleetup/index.html @@ -8,15 +8,16 @@ {% block content %}
{% include "fleetup/menu.html" %} -
+ +
-
+
-
+
{% if operations_list %} {% for subject, start in operations_list %}
@@ -31,7 +32,7 @@ {{ start.start|date:"l d M H:i" }} {% trans "Eve Time" %} - + {{ start.end|date:"l d M H:i" }} {% trans "Eve Time" %} @@ -39,12 +40,12 @@  Local time
- + - +

{{ start.details }}

- +
@@ -60,11 +61,11 @@ - From 8b6d32d0d10e0adf9f3bf3cd290994111395dbfe Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Sat, 11 Aug 2018 11:09:16 +0200 Subject: [PATCH 2/4] Removed unnecessary HTML comment --- allianceauth/fleetup/templates/fleetup/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/allianceauth/fleetup/templates/fleetup/index.html b/allianceauth/fleetup/templates/fleetup/index.html index 8b9350eb..73c1cdec 100644 --- a/allianceauth/fleetup/templates/fleetup/index.html +++ b/allianceauth/fleetup/templates/fleetup/index.html @@ -8,7 +8,6 @@ {% block content %}
{% include "fleetup/menu.html" %} -
{% if start.doctrine %} {% for doctrine in start.doctrine %} - + {{ doctrine.Name }} - + {% endfor %} - + {% else %} {% trans "TBA" %} {% endif %} @@ -89,7 +90,7 @@

{% trans "There seems to be no Operations in the near future." %}

{% endif %} -
+

{% trans "Current Eve Time:" %}

@@ -158,7 +159,7 @@
{{ type.owner }} + {{ type.notes }}
- - - - - - - - - - - - - - -
{% trans "Start" %}{% trans "End" %}
{{ start.start|date:"l d M H:i" }} {% trans "Eve Time" %}{{ start.end|date:"l d M H:i" }} {% trans "Eve Time" %}
-  Local time
-
-
-

{{ start.details }}

- -
- - - - - - - - - - - - - -
{% trans "Location" %}{% trans "Doctrine" %}{% trans "Organizer" %}{% trans "URL" %}
- {{ start.location }} - {{ start.location_info }} Dotlan - - {% if start.doctrine %} - {% for doctrine in start.doctrine %} - - {{ doctrine.Name }} - - {% endfor %} - - {% else %} - {% trans "TBA" %} - {% endif %} - - {{ start.organizer }} - - {% ifequal start.url "" %} -
{% trans "No link" %}
- {% else %} - {% trans "External link" %} - {% endifequal %} -
-
-
-
- {% endfor %} - {% else %} -

{% trans "There seems to be no Operations in the near future." %}

- {% endif %} -
-
-
-
-

{% trans "Current Eve Time:" %}

-
-
-
-
-
- {% if timers_list %} -
-
-

{% trans "Timers" %}

-
-
- - {% for notes, type in timers_list %} - - - - - {% endfor %} -
- {{ type.solarsystem }} - - {{ type.expires|date:"l d M H:i" }} -
-
-
- {% endif %} -
-
-
-
- {% if timers_list %} -
-
-

{% trans "Timers" %}

-
-
-
- - - - - - - - - - {% for notes, type in timers_list %} - - - - - - - - - {% endfor %} -
{% trans "Type" %}{% trans "Structure" %}{% trans "Location" %}{% trans "Expires(EVE-time)" %}{% trans "Owner" %}{% trans "Note" %}
- {% ifequal type.type "Final" %} - - {{ type.type }}{% else %}{{ type.type }}{% endifequal %} - - {{ type.timer_type }} - - {{ type.solarsystem }} - Planet:{{ type.planet }} Moon:{{ type.moon }} - - {{ type.expires|date:"l d M H:i" }} - - {{ type.owner }} - - {{ type.notes }} -
-
-
-
- {% else %} -

{% trans "There seems to be no Timers in the near future." %}

- {% endif %} -
-
-
- -
-
-{% include 'bundles/moment-js.html' with locale=True %} - - - -{% endblock content %} +{% extends "allianceauth/base.html" %} +{% load bootstrap %} +{% load staticfiles %} +{% load i18n %} + +{% block page_title %}FleetUp{% endblock page_title %} + +{% block content %} +
+{% include "fleetup/menu.html" %} +
+ + +
+
+
+ {% if operations_list %} + {% for subject, start in operations_list %} +
+
+

{{ start.subject }}

+
+
+ + + + + + + + + + + + + + + +
{% trans "Start" %}{% trans "End" %}
{{ start.start|date:"l d M H:i" }} {% trans "Eve Time" %}{{ start.end|date:"l d M H:i" }} {% trans "Eve Time" %}
+  Local time
+
+
+ {{ start.details|linebreaks }} + + + + + + + + + + + + + + +
{% trans "Location" %}{% trans "Doctrine" %}{% trans "Organizer" %}{% trans "URL" %}
+ {{ start.location }} - {{ start.location_info }} Dotlan + + {% if start.doctrine %} + {% for doctrine in start.doctrine %} + + {{ doctrine.Name }} + + {% endfor %} + + {% else %} + {% trans "TBA" %} + {% endif %} + + {{ start.organizer }} + + {% ifequal start.url "" %} +
{% trans "No link" %}
+ {% else %} + {% trans "External link" %} + {% endifequal %} +
+
+
+ {% endfor %} + {% else %} +

{% trans "There seems to be no Operations in the near future." %}

+ {% endif %} +
+
+
+
+

{% trans "Current Eve Time:" %}

+
+
+
+
+
+ {% if timers_list %} +
+
+

{% trans "Timers" %}

+
+
+ + {% for notes, type in timers_list %} + + + + + {% endfor %} +
+ {{ type.solarsystem }} + + {{ type.expires|date:"l d M H:i" }} +
+
+
+ {% endif %} +
+
+
+
+ {% if timers_list %} +
+
+

{% trans "Timers" %}

+
+
+
+ + + + + + + + + + {% for notes, type in timers_list %} + + + + + + + + + {% endfor %} +
{% trans "Type" %}{% trans "Structure" %}{% trans "Location" %}{% trans "Expires(EVE-time)" %}{% trans "Owner" %}{% trans "Note" %}
+ {% ifequal type.type "Final" %} + + {{ type.type }}{% else %}{{ type.type }}{% endifequal %} + + {{ type.timer_type }} + + {{ type.solarsystem }} - Planet:{{ type.planet }} Moon:{{ type.moon }} + + {{ type.expires|date:"l d M H:i" }} + + {{ type.owner }} + + {{ type.notes }} +
+
+
+
+ {% else %} +

{% trans "There seems to be no Timers in the near future." %}

+ {% endif %} +
+
+
+ +
+
+{% include 'bundles/moment-js.html' with locale=True %} + + + +{% endblock content %} From 08e42d2f5690e5c25b7bb031f9abeb25294ed865 Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Sat, 6 Oct 2018 13:02:26 +0200 Subject: [PATCH 4/4] Serving pilot avatar in fleetup character view from the right host --- allianceauth/fleetup/templates/fleetup/characters.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/allianceauth/fleetup/templates/fleetup/characters.html b/allianceauth/fleetup/templates/fleetup/characters.html index 7ab8c191..275965ff 100644 --- a/allianceauth/fleetup/templates/fleetup/characters.html +++ b/allianceauth/fleetup/templates/fleetup/characters.html @@ -26,7 +26,7 @@ {% for char_name, user_id in member_list %} - +

{{ user_id.char_name }}