aboutsummaryrefslogtreecommitdiff
path: root/module/calp/html/view
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-08-08 20:25:42 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2021-08-10 00:23:54 +0200
commit18e5853e7d012a95d1b78e73dc81aca7a82939f6 (patch)
tree4d9585913316ca812261480472bc841d65bff8e9 /module/calp/html/view
parentChange uri-encode to use ->quoted-string. (diff)
downloadcalp-18e5853e7d012a95d1b78e73dc81aca7a82939f6.tar.gz
calp-18e5853e7d012a95d1b78e73dc81aca7a82939f6.tar.xz
HTML calendar list now links to list off all their events.
Diffstat (limited to 'module/calp/html/view')
-rw-r--r--module/calp/html/view/calendar.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/module/calp/html/view/calendar.scm b/module/calp/html/view/calendar.scm
index c32703f2..031c1844 100644
--- a/module/calp/html/view/calendar.scm
+++ b/module/calp/html/view/calendar.scm
@@ -250,7 +250,14 @@
(lambda (calendar)
`(li (@ (class "CAL_"
,(html-attr (prop calendar 'NAME))))
- ,(prop calendar 'NAME)))
+ (a (@ (href "/search?"
+ ,((@ (web uri-query) encode-query-parameters)
+ `((q . (and (date/-time<=?
+ ,(current-datetime)
+ (prop event 'DTSTART))
+ (string=? ,(->string (prop calendar 'NAME))
+ (or (prop (parent event) 'NAME) ""))))))))
+ ,(prop calendar 'NAME))))
calendars))
(div (@ (id "calendar-dropdown-template") (class "template"))
(select