diff options
Diffstat (limited to 'src/views')
-rw-r--r-- | src/views/adventure.lisp | 4 | ||||
-rw-r--r-- | src/views/components.lisp | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/views/adventure.lisp b/src/views/adventure.lisp index b4980f1..8d4cebc 100644 --- a/src/views/adventure.lisp +++ b/src/views/adventure.lisp @@ -6,3 +6,7 @@ (defrender :inline ((adventure adventure)) (with-html (:a :href (urlpath adventure) (title adventure)))) + +(defrender :option ((adventure adventure)) + (with-html + (:option :value (uid adventure) (title adventure)))) diff --git a/src/views/components.lisp b/src/views/components.lisp index de4cc5c..bb9772d 100644 --- a/src/views/components.lisp +++ b/src/views/components.lisp @@ -19,11 +19,10 @@ the class string for the contained list items." (dolist (item data) (:li :class item-class (render :list-item item)))))) -(defrender :select ((data list) (multiple "false") name class) +(defrender :select ((data list) name class) (with-html (when data - (:select :multiple multiple - :name (or name (format nil "select-~a" (class-of (first data)))) + (:select :name (or name (format nil "select-~a" (class-of (first data)))) :class (or class (format nil "select ~a" (class-of (first data)))) (dolist (item data) (render :option item)))))) |