aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-03-24 22:53:45 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2020-03-24 22:53:45 +0100
commit66271068a75f8f2560b31fdb7f0aa032ec13c9b5 (patch)
tree8cde72a34f61a222564137ed9f92b049e43a5f93
parentAdd datetime->decimal-hour. (diff)
downloadcalp-66271068a75f8f2560b31fdb7f0aa032ec13c9b5.tar.gz
calp-66271068a75f8f2560b31fdb7f0aa032ec13c9b5.tar.xz
Allow nameless calendars again.
-rw-r--r--module/output/html.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/module/output/html.scm b/module/output/html.scm
index e9b7fd13..133b3d1e 100644
--- a/module/output/html.scm
+++ b/module/output/html.scm
@@ -160,7 +160,8 @@
`(a (@ (href "#" ,(UID ev))
(class "hidelink"))
- (div (@ (class "event CAL_" ,(html-attr (attr (parent ev) 'NAME))
+ (div (@ (class "event CAL_" ,(html-attr (or (attr (parent ev) 'NAME)
+ "unknown"))
,(when (and (attr ev 'PARTSTAT) (string= "TENTATIVE" (attr ev 'PARTSTAT)))
" tentative")
,(when (date<? (as-date (attr ev 'DTSTART)) date)
@@ -209,7 +210,7 @@
`(a (@ (href "#" ,(UID ev))
(class "hidelink"))
- (div (@ (class "event CAL_" ,(html-attr (attr (parent ev) 'NAME))
+ (div (@ (class "event CAL_" ,(html-attr (or (attr (parent ev) 'NAME) "unknown"))
,(when (and (attr ev 'PARTSTAT) (string= "TENTATIVE" (attr ev 'PARTSTAT)))
" tentative")
,(when (date/-time< (attr ev 'DTSTART) start-date)
@@ -317,7 +318,7 @@
;; (format (current-error-port) "fmt-single-event: ~a~%" (attr ev 'X-HNH-FILENAME))
`(article (@ (id ,(UID ev))
(class "eventtext CAL_bg_"
- ,(html-attr (attr (parent ev) 'NAME))
+ ,(html-attr (or (attr (parent ev) 'NAME) "unknown"))
,(when (and (attr ev 'PARTSTAT) (string= "TENTATIVE" (attr ev 'PARTSTAT)))
" tentative")))
(h3 (a (@ (href "#" ,(date-link (as-date (attr ev 'DTSTART))))