- {{ aircraft_type }} |
+ {{ aircraft_type }} |
{% for totals in type_totals.per_period %}
- {{ totals.grand.time | duration:"%{h}h %{m}m" }}
+ {{ totals.grand.time | duration }}
|
{{ totals.grand.landings }}
@@ -71,12 +88,12 @@ Statistics
Totals
-
+
- Type / Registration |
- ⏱️ |
- 🛬 |
+ Type / Registration |
+ ⏱️ |
+ 🛬 |
@@ -85,7 +102,7 @@ Totals
{{ 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/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 @@
- Time function |
- Required |
- Accrued |
- Remaining |
- Status |
+ Time function |
+ Required |
+ Accrued |
+ Remaining |
+ Status |
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
- 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 |
{% for aircraft_type in AircraftType reversed %}
{{ aircraft_type }} |
{% endfor %}
- Landings |
- Name |
+ Landings |
+ Name |
{% for function_type in FunctionType %}
{{ function_type }} |
{% endfor %}
- Remarks |
+ Remarks |
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)
|