From 57d4f2f4b2ab844b91632ca885551af6c56f788d Mon Sep 17 00:00:00 2001 From: marwoodandrew Date: Wed, 3 Feb 2021 10:58:24 +1100 Subject: [PATCH] Court list template changes --- server/data/planning_export_templates.json | 10 ++++++++++ server/templates/event_courts_download.html | 2 +- server/templates/event_courts_nightly_download.html | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 server/templates/event_courts_nightly_download.html diff --git a/server/data/planning_export_templates.json b/server/data/planning_export_templates.json index 9413385b1..3564e3a88 100644 --- a/server/data/planning_export_templates.json +++ b/server/data/planning_export_templates.json @@ -18,5 +18,15 @@ }, "label" : "Courts", "download" : true + }, + { + "_id" : "event_courts_nightly_download", + "name" : "event_courts_nightly_download", + "type" : "event", + "data" : { + "template_file" : "event_courts_nightly_download.html" + }, + "label" : "Nightly Courts List", + "download" : true } ] diff --git a/server/templates/event_courts_download.html b/server/templates/event_courts_download.html index 049257cdb..7d092de51 100644 --- a/server/templates/event_courts_download.html +++ b/server/templates/event_courts_download.html @@ -1 +1 @@ -{% for item in items %}{{ item['browser_start'].strftime('%H%M') }} - {{ item['definition_short'] or item['name'] }}.{% if (item.get('location') or [])|length > 0 %}{% for l in item.location %} {{ l.name }}{% endfor %}{% endif %}{{"\r\n"}}{% endfor %} +{% for item in items %}{{ item['browser_start'].strftime('%H%M') }} - {% if item['reference']%}{{item['reference']}} {% endif %}{{ item['name'] or item['definition_short'] }}.{% if (item.get('location') or [])|length > 0 %}{% for l in item.location %} {{ l.name }}{% endfor %}{% endif %}{{ "\r\n" }}{% endfor %} diff --git a/server/templates/event_courts_nightly_download.html b/server/templates/event_courts_nightly_download.html new file mode 100644 index 000000000..825c2b965 --- /dev/null +++ b/server/templates/event_courts_nightly_download.html @@ -0,0 +1 @@ +{% for item in items %}{% if item['reference']%}{{item['reference']}} {% else %}Unknown Reference {% endif %}{% if (item.get('location') or [])|length > 0 %}{% for l in item.location %} {{ l.name }}{% endfor %}{% endif %}{{ "\r\n" }}{{ "\r\n" }}{% endfor %}