stray paren in last patch
[clinton/lisp-on-lines.git] / src / standard-attributes.lisp
CommitLineData
7733a777
DC
1(in-package :lisp-on-lines)
2
3(defattribute image ()
4 ())
5
60a24293
DC
6(defdisplay (:description (buttons (eql 'image-editor-buttons)))
7 (<ucw:a :action (ok component object)
8 (<:as-html "select this image")))
9
7733a777
DC
10(defdisplay (:description (image image))
11 (<:img
60a24293 12 :class (or (getp :css-class) "lol-image")
7733a777
DC
13 :src (arnesi:strcat
14 (or (getp :prefix) "images/")
15 (escape-as-uri
16 (attribute-value object image)))))
17
60a24293
DC
18(defdisplay (:description (image image)
19 :in-layer editor)
20 (<:div
21 :class "lol-image-thumbnails"
22
23 (dolist* (i (or (getp :directory)
24 (cl-fad:list-directory (strcat *default-pathname-defaults* "wwwroot/images/"))))
25 (<:div
26 :style "border: 1px solid black;width:100px;"
27 (<:img
28 :width "90px"
29 :src (strcat (or (getp :prefix) "images/")
30 (file-namestring i)))
31 (display-using-description 'image-editor-buttons component (file-namestring i) properties))
32 (<:p :style "clear:both;"))))
33
7733a777
DC
34
35
36
37
38