aboutsummaryrefslogtreecommitdiff
path: root/module/calp/html/vcomponent.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-10-03 21:54:30 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2021-10-03 21:54:30 +0200
commit4cf9587a5188e5853bbcf97b71109e7cb9331d9f (patch)
treef6f36930e263f3fee450a700b8e77da667c1afa9 /module/calp/html/vcomponent.scm
parentFurther work, rework popup. (diff)
downloadcalp-4cf9587a5188e5853bbcf97b71109e7cb9331d9f.tar.gz
calp-4cf9587a5188e5853bbcf97b71109e7cb9331d9f.tar.xz
work
Diffstat (limited to 'module/calp/html/vcomponent.scm')
-rw-r--r--module/calp/html/vcomponent.scm19
1 files changed, 12 insertions, 7 deletions
diff --git a/module/calp/html/vcomponent.scm b/module/calp/html/vcomponent.scm
index c5ae452d..1b97e9b8 100644
--- a/module/calp/html/vcomponent.scm
+++ b/module/calp/html/vcomponent.scm
@@ -22,6 +22,7 @@
format-summary
format-recurrence-rule
))
+ :use-module ((calp util config) :select (get-config))
)
(define-public (compact-event-list list)
@@ -203,11 +204,19 @@
`(vevent-edit (@ (class "vevent")
(data-uid ,(prop ev 'UID)))))
-(define-public (edit-template)
+(define-public (edit-template calendars)
`(div (@ (class " eventtext edit-tab "))
(form (@ (class "edit-form"))
- ;; TODO actually have calendar list here, since we are just a template
- (div (@ (class "dropdown-goes-here")))
+ (select (@ (class "calendar-selection"))
+ (option "- Choose a Calendar -")
+ ,@(let ((dflt (get-config 'default-calendar)))
+ (map (lambda (calendar)
+ (define name (prop calendar 'NAME))
+ `(option (@ (value ,(html-attr name))
+ ,@(when (string=? name dflt)
+ '((selected))))
+ ,name))
+ calendars)))
(h3 (input (@ (type "text")
(placeholder "Sammanfattning")
(name "summary") (required)
@@ -605,10 +614,6 @@
`(("📅" title: "Redigera"
,(fmt-for-edit ev))))
- ,@(when (debug)
- `(("🐸" title: "Debug"
- (div
- (pre ,(prop ev 'UID))))))
("⤓" title: "Nedladdning"
(div (@ (class "eventtext") (style "font-family:sans"))