Print the calendar as a themed PDF of the view on screen (#342) #1173
No reviewers
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo!1173
Loading…
Reference in a new issue
No description provided.
Delete branch "342-print-calendar"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Calendar could not be printed properly: printing was the browser's
dialog over the page, with two entries a month cell, a New reminder button
in every cell, the legend and the navigation, and nothing turned a month on
its side. The templates plugin had no kind for a calendar template to set.
Print sits beside the views and opens /applications/calendar/print/ with
the page's question in the address: the view, the day, the kinds shown, an
agenda's last day and the search, read by agenda.asked_for, which the page
now reads them with too. It says which period and how many entries, and
offers a theme, a language and a paper. Download PDF posts to
/applications/calendar/print/file; a GET there draws the same PDF and
remembers nothing. It is a download and is never filed (#236).
Every entry of the period prints, without the month's two-per-cell limit,
and nothing that is a control does. A month is a grid; a week, a day and an
agenda are days one under another, the agenda without its empty days. What
is over is struck through and said in words. The entries are the plain
values of #330, agenda.Item, through agenda.printed_items, which shares its
reading with items_between but keeps whole days without a public address
and works in the document's language; Item gains said, the page's words
for its kind. agenda.span and agenda.period_title come out of _build, so
the page and the print name the same period.
ThemeKind.CALENDAR, with plain and classic templates extending
documents/themes/base_calendar.html, handed view, view_label, title,
person, produced_at, start, last, kinds, narrowed, search, weekdays, weeks,
days and count, plus the usual document names and the paper. The theme is
remembered in Profile.document_themes on a POST only. A month with no paper
chosen is the person's default turned landscape, where the theme prints on
that (#344).
No migration and no archive format change: document_themes already takes
any ThemeKind.
Closes #342
Notes for review
/applications/calendar/print/, which says the view, the period, the kinds shown, the search and how many entries, and offers a theme, a language and a paper (as #341's export page)./applications/calendar/print/filewith the calendar's question in the address; a GET draws the same PDF and remembers nothing. Never filed.agenda.asked_for, whichpage_fornow uses too;agenda.spanandagenda.period_titlewere pulled out of_build, so page and print share the period and its name.agenda.Items through the newagenda.printed_items, which shares_itemswithitems_between. No second reading of the models.Item.saidadded (the page's words for the kind, e.g. Done reminder:), with tests intest_calendar_print.pyandtest_plugin_surface.py.ThemeKind.CALENDAR, plain and classiccalendar.htmlextendingdocuments/themes/base_calendar.html; remembered inProfile.document_themeson a POST only. Context names:view,view_label,title,person,produced_at,start,last,kinds,narrowed,search,weekdays,weeks,days,count; an entry iskind,said,title,detail,all_day,starts_at,ends_at,over,state.q) narrows the print as it narrows the page.POSTULO_PUBLIC_URL;items_betweenstill withholds them for plugins.document_themes, whose import takes anyThemeKind.scratchpad/batch/wiki-342.md, to apply afterwiki-341.md. No new name onpostulo.plugins.api.🤖 Generated with Claude Code
467deeef3c4f75f07b45