diff --git a/logbook/templates/logbook/aircraft_list.html b/logbook/templates/logbook/aircraft_list.html index 03a899a..9d0d101 100644 --- a/logbook/templates/logbook/aircraft_list.html +++ b/logbook/templates/logbook/aircraft_list.html @@ -8,23 +8,23 @@

Aircraft

- - - - - + + + + - + - - - - - - - + + + + + + + diff --git a/logbook/templates/logbook/base.html b/logbook/templates/logbook/base.html index f2ca7a2..eb87bc8 100644 --- a/logbook/templates/logbook/base.html +++ b/logbook/templates/logbook/base.html @@ -18,6 +18,8 @@ padding-bottom: 1rem; } + + {% block extra_head %}{% endblock %} diff --git a/logbook/templates/logbook/certificate_list.html b/logbook/templates/logbook/certificate_list.html index 1e8830c..c5a1360 100644 --- a/logbook/templates/logbook/certificate_list.html +++ b/logbook/templates/logbook/certificate_list.html @@ -12,12 +12,12 @@

Certificates

CurrencyRegistrationDesignatorModel + CurrencyRegistrationDesignatorModel 💨 SpeedsSpeeds
{% include "logbook/speed_description_item.html" with speed=aircraft_fields.v_r only %}{% include "logbook/speed_description_item.html" with speed=aircraft_fields.v_y only %}{% include "logbook/speed_description_item.html" with speed=aircraft_fields.v_bg only %}{% include "logbook/speed_description_item.html" with speed=aircraft_fields.v_app only %}{% include "logbook/speed_description_item.html" with speed=aircraft_fields.v_ref only %}{% include "logbook/speed_description_item.html" with speed=aircraft_fields.v_s only %}{% include "logbook/speed_description_item.html" with speed=aircraft_fields.v_c only %}{% include "logbook/speed_description_item.html" with speed=aircraft_fields.v_r only %}{% include "logbook/speed_description_item.html" with speed=aircraft_fields.v_y only %}{% include "logbook/speed_description_item.html" with speed=aircraft_fields.v_bg only %}{% include "logbook/speed_description_item.html" with speed=aircraft_fields.v_app only %}{% include "logbook/speed_description_item.html" with speed=aircraft_fields.v_ref only %}{% include "logbook/speed_description_item.html" with speed=aircraft_fields.v_s only %}{% include "logbook/speed_description_item.html" with speed=aircraft_fields.v_c only %}
- - - - - - + + + + + + diff --git a/logbook/templates/logbook/dashboard.html b/logbook/templates/logbook/dashboard.html index e6abd82..7956d6a 100644 --- a/logbook/templates/logbook/dashboard.html +++ b/logbook/templates/logbook/dashboard.html @@ -2,61 +2,78 @@ {% load django_bootstrap5 %} {% load logbook_utils %} +{% block extra_head %} + +{% endblock %} + {% block content %}

Dashboard

{% bootstrap_messages %}

Currency status

- -
NameNumberIssue DateValid UntilIssuing AuthorityRemarksNameNumberIssue DateValid UntilIssuing AuthorityRemarks
- - - - - - - - - - - - - - - - - - - - -
Passenger currency
DayNight
SEP{% include "logbook/currency_status.html" with currency=passenger_currency.sep.day %}{% include "logbook/currency_status.html" with currency=passenger_currency.sep.night %}
TMG{% include "logbook/currency_status.html" with currency=passenger_currency.tmg.day %}{% include "logbook/currency_status.html" with currency=passenger_currency.tmg.night %}
+
+ + + + + + + + + + + + + + + + + + + + + +
Passenger currency
DayNight
SEP{% include "logbook/currency_status.html" with currency=passenger_currency.sep.day %}{% include "logbook/currency_status.html" with currency=passenger_currency.sep.night %}
TMG{% include "logbook/currency_status.html" with currency=passenger_currency.tmg.day %}{% include "logbook/currency_status.html" with currency=passenger_currency.tmg.night %}
+

Statistics

- +
- + {% for label in period_labels %} - + {% endfor %} {% for label in period_labels %} - - + + {% endfor %} {% for aircraft_type, type_totals in totals_per_type.items %} - + {% for totals in type_totals.per_period %}
ClassClass{{ label }}{{ label }}
⏱️🛬⏱️🛬
{{ aircraft_type }}{{ aircraft_type }} - {{ totals.grand.time | duration:"%{h}h %{m}m" }} + {{ totals.grand.time | duration }} {{ totals.grand.landings }} @@ -71,12 +88,12 @@

Statistics

Totals

- +
- - - + + + @@ -85,7 +102,7 @@

Totals

- + diff --git a/logbook/templates/logbook/experience.html b/logbook/templates/logbook/experience.html index 63a7283..783d2f7 100644 --- a/logbook/templates/logbook/experience.html +++ b/logbook/templates/logbook/experience.html @@ -4,11 +4,11 @@
Type / Registration⏱️🛬Type / Registration⏱️🛬
{{ aircraft_type.value }} - {{ type_totals.grand.time | duration:"%{h}h %{m}m" }} + {{ type_totals.grand.time | duration }} @@ -104,7 +121,7 @@

Totals

- {{ aircraft_totals.time | duration:"%{h}h %{m}m" }} + {{ aircraft_totals.time | duration }} @@ -117,7 +134,7 @@

Totals

{% endfor %}
Grand Total{{ grand_total.time | duration:"%{h}h %{m}m" }}{{ grand_total.time | duration }} {{ grand_total.landings }}
- - - - - + + + + + diff --git a/logbook/templates/logbook/logentry_list.html b/logbook/templates/logbook/logentry_list.html index 6d5f0a3..d850370 100644 --- a/logbook/templates/logbook/logentry_list.html +++ b/logbook/templates/logbook/logentry_list.html @@ -12,19 +12,19 @@

Log entries

Time functionRequiredAccruedRemainingStatusTime functionRequiredAccruedRemainingStatus
- - - - + + + + {% for aircraft_type in AircraftType reversed %} {% endfor %} - - + + {% for function_type in FunctionType %} {% endfor %} - + diff --git a/logbook/templates/logbook/per_function_item.html b/logbook/templates/logbook/per_function_item.html index 519b6f6..ed3b7bd 100644 --- a/logbook/templates/logbook/per_function_item.html +++ b/logbook/templates/logbook/per_function_item.html @@ -1,5 +1,5 @@ {% spaceless %} {% load logbook_utils %} -{% for key, value in items %}{{ key }}: {% if landings %}{{ value.landings }}{% else %}{{ value.time | duration:"%{h}h %{m}m" }}{% endif %}{% if not forloop.last %} | {% endif %}{% endfor %} +{% for key, value in items %}{{ key }}: {% if landings %}{{ value.landings }}{% else %}{{ value.time | duration }}{% endif %}{% if not forloop.last %} | {% endif %}{% endfor %} {% endspaceless %} diff --git a/logbook/templatetags/logbook_utils.py b/logbook/templatetags/logbook_utils.py index f34f670..244f0d4 100644 --- a/logbook/templatetags/logbook_utils.py +++ b/logbook/templatetags/logbook_utils.py @@ -17,7 +17,7 @@ class DurationTemplate(Template): @register.filter -def duration(value: datetime.timedelta, format_specification: str = "%H:%M:%S"): +def duration(value: datetime.timedelta, format_specification: str = "%{h}h %{m}m"): duration_template = DurationTemplate(format_specification) days, remainder = divmod(value.total_seconds(), 24 * 60 * 60)
Year: {{ object_list.0.departure_time | date:"Y" }}
Day / Month
Type
Registration
From
To
Departure
Arrival
Year: {{ object_list.0.departure_time | date:"Y" }}
Day / Month
Type
Registration
From
To
Departure
Arrival
{{ aircraft_type }}LandingsNameLandingsName{{ function_type }}RemarksRemarks