aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-05-03 00:12:11 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-05-03 00:12:11 +0200
commite1b4c48c2e5c65e0749d34ebd20d325dd5ab6c28 (patch)
tree66798c3876b64239f0cab17ee54a9c0bb0a9f471
parentAllow btn to take nothing, and default to <button>. (diff)
downloadcalp-e1b4c48c2e5c65e0749d34ebd20d325dd5ab6c28.tar.gz
calp-e1b4c48c2e5c65e0749d34ebd20d325dd5ab6c28.tar.xz
Add intervaltype argument to html-generate.
-rw-r--r--module/entry-points/server.scm2
-rw-r--r--module/output/html.scm1
2 files changed, 3 insertions, 0 deletions
diff --git a/module/entry-points/server.scm b/module/entry-points/server.scm
index 270a51f4..78eac835 100644
--- a/module/entry-points/server.scm
+++ b/module/entry-points/server.scm
@@ -76,6 +76,7 @@
next-start: (lambda (d) (date+ d (date day: 7)))
prev-start: (lambda (d) (date- d (date day: 7)))
render-calendar: render-calendar
+ intervaltype: 'week
))))))
(GET "/month/:start-date.html" (start-date)
@@ -95,6 +96,7 @@
render-calendar: render-calendar-table
pre-start: (start-of-week start-date)
post-end: (end-of-week (end-of-month start-date))
+ intervaltype: 'month
))))))
;; TODO export all events in interval
diff --git a/module/output/html.scm b/module/output/html.scm
index 360151de..eaa5c30b 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -580,6 +580,7 @@
(define*-public (html-generate
key:
+ (intervaltype 'all) ; 'week | 'month | 'all
calendars events start-date end-date
render-calendar ; (bunch of kv args) → (list sxml)
next-start ; date → date