aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-10-26 20:30:22 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2020-10-26 20:30:22 +0100
commit2ee958354c18d91a8bd44028042bb4a4a10c423a (patch)
tree519e65f453df977d99b656050e358b770efbce10
parentFix listener propagation for "root" element. (diff)
downloadcalp-2ee958354c18d91a8bd44028042bb4a4a10c423a.tar.gz
calp-2ee958354c18d91a8bd44028042bb4a4a10c423a.tar.xz
HTML Prettyify code for following tags.
-rw-r--r--module/calp/html/vcomponent.scm11
-rw-r--r--module/calp/util/config.scm4
-rw-r--r--module/vcomponent/search.scm2
3 files changed, 9 insertions, 8 deletions
diff --git a/module/calp/html/vcomponent.scm b/module/calp/html/vcomponent.scm
index 208b66f7..6b9a48e9 100644
--- a/module/calp/html/vcomponent.scm
+++ b/module/calp/html/vcomponent.scm
@@ -5,6 +5,7 @@
:use-module (srfi srfi-41)
:use-module (datetime)
:use-module ((text util) :select (add-enumeration-punctuation))
+ :use-module ((web uri-query) :select (encode-query-parameters))
:use-module (calp html util)
:use-module ((calp html config) :select (edit-mode))
:use-module ((calp html components) :select (btn tabset form with-label))
@@ -117,9 +118,13 @@
,@(map (lambda (c)
`(a (@ (class "category")
;; TODO centralize search terms
- ;; TODO propper stringifycation of sexp
- (href ,(format #f "/search/?q=%28member+%22~a%22%0D%0A++%28or+%28prop+event+%27CATEGORIES%29+%27%28%29%29%0D%0A"
- c)))
+ (href
+ "/search/?"
+ ,(encode-query-parameters
+ `((q . (member
+ ,(->quoted-string c)
+ (or (prop event 'CATEGORIES)
+ '())))))))
,c))
it)))
diff --git a/module/calp/util/config.scm b/module/calp/util/config.scm
index 32dabb69..fbe35d59 100644
--- a/module/calp/util/config.scm
+++ b/module/calp/util/config.scm
@@ -106,10 +106,6 @@
(export format-procedure)
-(define (->str any)
- (with-output-to-string
- (lambda () (display any))))
-
(define-public (get-configuration-documentation)
(define groups
(group-by (compose source-module car)
diff --git a/module/vcomponent/search.scm b/module/vcomponent/search.scm
index 27483720..39a3847a 100644
--- a/module/vcomponent/search.scm
+++ b/module/vcomponent/search.scm
@@ -70,7 +70,7 @@
(eval `(lambda (event) ,@expressions)
(make-sandbox-module
`(
- ((vcomponent base) prop param children type)
+ ((vcomponent base) prop param children type parent)
((ice-9 regex) string-match)
,@(bindings-for '(datetime))
,@all-pure-bindings)