| 1 | (in-package :lisp-on-lines) |
| 2 | |
| 3 | (defattribute image () |
| 4 | ()) |
| 5 | |
| 6 | (defdisplay object (:description (buttons (eql 'image-editor-buttons))) |
| 7 | (<ucw:a :action (ok component object) |
| 8 | (<:as-html "select this image"))) |
| 9 | |
| 10 | (defdisplay object (:description (image image)) |
| 11 | (<:img |
| 12 | :class (or (getp :css-class) "lol-image") |
| 13 | :src (arnesi:strcat |
| 14 | (or (getp :prefix) "images/") |
| 15 | (escape-as-uri |
| 16 | (attribute-value object image))))) |
| 17 | |
| 18 | (defdisplay object (: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 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |