[Page style customization clinton@unknownlamer.org**20081230044637 * Style information about frontend pages are stored in a persistent instance * Currently can edit the page background image (but not unless you know the filenames within the background root) ] hunk ./src/web-admin.lisp 195 - hunk ./src/web-admin.lisp 211 +(define-html-form page-style-editor () + ((name (string-field :input-size 80 + :validators (make-validators 'not-empty-validator))) + (background (string-field :input-size 80 + :validators (make-validators 'not-empty-validator)))) + ((style :initarg :page-style :accessor edited-style :initform nil))) + +(defmethod initialize-instance :after ((e page-style-editor) + &key &allow-other-keys) + (when-bind style (edited-style e) + (with-slots (name background) e + (setf (value name) (page-name style) + (value background) (page-background style))))) + +(defaction process-form ((e page-style-editor)) + (ensure-transaction () + (let ((style (or (edited-style e) + (make-instance 'bee-page-style)))) + (with-slots (name background) e + (setf (page-name style) (intern (string-upcase (value name)) :keyword) + (page-background style) (value background))) + (answer style)))) + +(defcomponent page-style-list (bee-admin-list) + () + (:default-initargs + :index-class 'bee-page-style + :index-slot 'name + :page-size 10 + :reverse t)) + +(defmethod render ((list page-style-list)) + (<:ul + (mapc (lambda (page) + (<:li (