Skip to content

Commit

Permalink
add day description to PDF
Browse files Browse the repository at this point in the history
fixes part of #132
  • Loading branch information
wp99cp committed Dec 15, 2021
1 parent 648cc35 commit cd46dea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/pdf-export-module/script/pages/weekview_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
def weekview_table(doc: Document, camp: Camp, args: Namespace):
# content for this page
days = camp.get_days()
days = list(map(lambda d: NoEscape((d['day_date'] + timedelta(hours=2)).strftime("%A, \\par %d. %b %Y")), days))
days = list(map(lambda d: NoEscape(
(d['day_date'] + timedelta(hours=2)).strftime("%A, \\par %d. %b %Y") +
((r'\par (' + d['day_description'] + ')') if d['day_description'] is not '' else '')), days))

# add packages
doc.packages.add(Package('caption', options='tableposition=top'))
Expand Down

0 comments on commit cd46dea

Please sign in to comment.