X-Git-Url: https://git.hcoop.net/clinton/lisp-on-lines.git/blobdiff_plain/65792e79770b7808542f483a6e8b0af320d55704..5f0b37e7a9a8e95dd5a846bfa7896af5875b91f7:/src/mewa/slot-presentations.lisp diff --git a/src/mewa/slot-presentations.lisp b/src/mewa/slot-presentations.lisp index 4a746d3..cbd2525 100644 --- a/src/mewa/slot-presentations.lisp +++ b/src/mewa/slot-presentations.lisp @@ -82,6 +82,8 @@ When T, only the default value for primary keys and the joins are updated.")) ifFormat : \"%m/%d/%Y\", });" input-id)))))) + + (defslot-presentation mewa-relation-slot-presentation (mewa-slot-presentation slot-presentation) ((foreign-instance :accessor foreign-instance) (linkedp :accessor linkedp :initarg :linkedp :initform t) @@ -93,7 +95,7 @@ When T, only the default value for primary keys and the joins are updated.")) (meta-model:explode-foreign-key instance (slot-name slot)) (let ((new-instance (call-component - (parent slot) + (parent slot) (make-instance (or (cadr (mewa:find-attribute finstance :presentation-search)) 'mewa::mewa-presentation-search) :search-presentation @@ -186,7 +188,6 @@ When T, only the default value for primary keys and the joins are updated.")) ((add-new-label :accessor add-new-label :initarg :add-new-label :initform "Add New")) (:type-name has-many)) - (defaction add-to-has-many ((slot has-many-slot-presentation) instance) ;; if the instance is not stored we must make sure to mark it stored now! (unless (mewa::instance-is-stored-p instance) @@ -285,3 +286,16 @@ When T, only the default value for primary keys and the joins are updated.")) (setf (instance (presentation slot)) (presentation-slot-value slot instance)) (present (presentation slot))) (<:as-html "--")))) + +(defslot-presentation inline-slot-presentation (mewa-relation-slot-presentation) + () + (:type-name inline)) + +(defmethod present-slot ((slot inline-slot-presentation) instance) + (<:fieldset + (<:legend (<:as-html (label slot))) + (