aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--module/calp/html/vcomponent.scm22
-rw-r--r--static/style.scss5
2 files changed, 26 insertions, 1 deletions
diff --git a/module/calp/html/vcomponent.scm b/module/calp/html/vcomponent.scm
index 49b24fbc..c4e15374 100644
--- a/module/calp/html/vcomponent.scm
+++ b/module/calp/html/vcomponent.scm
@@ -4,6 +4,7 @@
:use-module (srfi srfi-1)
:use-module (srfi srfi-41)
:use-module (datetime)
+ :use-module ((text util) :select (add-enumeration-punctuation))
:use-module (calp html util)
:use-module ((calp html config) :select (edit-mode))
:use-module ((calp html components) :select (btn tabset))
@@ -190,7 +191,26 @@
(define (repeat-info event)
`(div (@ (class "eventtext"))
(h2 "Upprepningar")
- (pre ,(prop event 'RRULE))))
+ (table (@ (class "recur-components"))
+ ,@((@@ (vcomponent recurrence internal) map-fields)
+ (lambda (key value)
+ `(tr (@ (class ,key)) (th ,key)
+ (td
+ ,(case key
+ ((wkst) (week-day-name value))
+ ((until) (if (date? value)
+ (date->string value)
+ (datetime->string value)))
+ ((byday) (add-enumeration-punctuation
+ (map (lambda (pair)
+ (string-append
+ (if (car pair)
+ (format #f "~a " (car pair))
+ "")
+ (week-day-name (cdr pair))))
+ value)))
+ (else (->string value))))))
+ (prop event 'RRULE)))))
(define-public (popup ev id)
diff --git a/static/style.scss b/static/style.scss
index 322f62f3..33f55f81 100644
--- a/static/style.scss
+++ b/static/style.scss
@@ -724,6 +724,11 @@ along with their colors.
overflow-y: auto;
padding: 1em;
word-break: break-word;
+
+ table {
+ word-break: initial;
+ font-size: 65%;
+ }
}
.location {