Skip to content

Commit

Permalink
[SDESK-4436] Template for downloading events for courts listing
Browse files Browse the repository at this point in the history
added entry to planning_export_templates data file
  • Loading branch information
nrvikas authored and MarkLark86 committed Jul 9, 2019
1 parent ffe78c7 commit 401e166
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
30 changes: 21 additions & 9 deletions server/data/planning_export_templates.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
[{
"_id" : "planning_outlook",
"name" : "outlook",
"type" : "planning",
"data" : {
"slugline" : "Outlook",
"body_html_template" : "outlook_planning_template.html"
[
{
"_id" : "planning_outlook",
"name" : "outlook",
"type" : "planning",
"data" : {
"slugline" : "Outlook",
"body_html_template" : "outlook_planning_template.html"
},
"label" : "Outlook"
},
"label" : "Outlook"
}]
{
"_id" : "event_courts_download",
"name" : "event_courts_download",
"type" : "event",
"data" : {
"template_file" : "event_courts_download.html"
},
"label" : "Courts",
"download" : true
}
]
2 changes: 2 additions & 0 deletions server/templates/event_courts_download.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{% for item in items %}{{ item['dates']['start'].strftime('%H%M') }} - {{ item['name'] }}.{% if (item.get('location') or [])|length > 0 %}{% for l in item.location %} {{ l.name }}{% endfor %}{% endif %}
{% endfor %}

0 comments on commit 401e166

Please sign in to comment.