From 4b459822a94d1b73931c4afe997a214c4fcfade1 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 27 Jan 2015 18:42:49 +0100 Subject: Reporting/templates: Use configurable date formats. --- src/lib/Bcfg2/Reporting/templates/base-timeview.html | 2 +- src/lib/Bcfg2/Reporting/templates/clients/detail.html | 2 +- src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html | 4 +++- src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html | 4 +++- src/lib/Bcfg2/Reporting/templates/config_items/item.html | 2 +- src/lib/Bcfg2/Reporting/templates/widgets/interaction_list.inc | 4 +++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/lib/Bcfg2/Reporting/templates/base-timeview.html b/src/lib/Bcfg2/Reporting/templates/base-timeview.html index 9a5ef651c..28a9fa0f4 100644 --- a/src/lib/Bcfg2/Reporting/templates/base-timeview.html +++ b/src/lib/Bcfg2/Reporting/templates/base-timeview.html @@ -17,7 +17,7 @@ function bcfg2_check_date() { } document.write(getCalendarStyles()); -{% if not timestamp %}Rendered at {% now "Y-m-d H:i" %} | {% else %}View as of {{ timestamp|date:"Y-m-d H:i" }} | {% endif %}{% spaceless %} +{% if not timestamp %}Rendered at {% now "SHORT_DATETIME_FORMAT" %} | {% else %}View as of {{ timestamp|date:"SHORT_DATETIME_FORMAT" }} | {% endif %}{% spaceless %} [change]
diff --git a/src/lib/Bcfg2/Reporting/templates/clients/detail.html b/src/lib/Bcfg2/Reporting/templates/clients/detail.html index 6732bb8c9..6809dcc2d 100644 --- a/src/lib/Bcfg2/Reporting/templates/clients/detail.html +++ b/src/lib/Bcfg2/Reporting/templates/clients/detail.html @@ -39,7 +39,7 @@ span.history_links a { diff --git a/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html b/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html index 6a314bd88..cf778504a 100644 --- a/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html +++ b/src/lib/Bcfg2/Reporting/templates/clients/detailed-list.html @@ -32,7 +32,9 @@ This is needed for Django versions less than 1.5 {{ entry.bad_count }} {{ entry.modified_count }} {{ entry.extra_count }} - {{ entry.timestamp|date:"Y-m-d\&\n\b\s\p\;H:i"|safe }} + + {{ entry.timestamp|date:"SHORT_DATETIME_FORMAT"|safe }} + {% if entry.server %} {{ entry.server }} diff --git a/src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html b/src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html index e3befb0eb..8a5d93690 100644 --- a/src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html +++ b/src/lib/Bcfg2/Reporting/templates/config_items/entry_status.html @@ -22,7 +22,9 @@ This is needed for Django versions less than 1.5 {% for inter in inters %} {{inter.client.name}} - {{inter.timestamp|date:"Y-m-d\&\n\b\s\p\;H:i"|safe}} + + {{inter.timestamp|date:"SHORT_DATETIME_FORMAT"|safe}} + {{ item.get_state_display }} ({{item.pk}}) {{item.short_list|join:","}} diff --git a/src/lib/Bcfg2/Reporting/templates/config_items/item.html b/src/lib/Bcfg2/Reporting/templates/config_items/item.html index c6e6df020..2e2fd36fa 100644 --- a/src/lib/Bcfg2/Reporting/templates/config_items/item.html +++ b/src/lib/Bcfg2/Reporting/templates/config_items/item.html @@ -130,7 +130,7 @@ div.entry_list h3 {
-

Occurences on {{ timestamp|date:"Y-m-d" }}

+

Occurences on {{ timestamp|date:"SHORT_DATE_FORMAT" }}

{% if associated_list %} diff --git a/src/lib/Bcfg2/Reporting/templates/widgets/interaction_list.inc b/src/lib/Bcfg2/Reporting/templates/widgets/interaction_list.inc index 30ed2fd3e..444d05e1e 100644 --- a/src/lib/Bcfg2/Reporting/templates/widgets/interaction_list.inc +++ b/src/lib/Bcfg2/Reporting/templates/widgets/interaction_list.inc @@ -15,7 +15,9 @@ {% for entry in entry_list %} - + {% if not client %} {% endif %} -- cgit v1.2.3-1-g7c22
{{ entry.timestamp|date:"Y-m-d\&\n\b\s\p\;H:i"|safe }} + {{ entry.timestamp|date:"SHORT_DATETIME_FORMAT"|safe }} + {{ entry.client.name }}