(or (meta-model:list-keys (instance self))))
;;;objects
-(defcomponent mewa-object-presentation (mewa ucw:object-presentation) ())
+(defcomponent mewa-object-presentation (mewa ucw:object-presentation)
+ ((ucw::instance :accessor instance :initarg :instance :initform nil)))
(defcomponent two-column-presentation (mewa-object-presentation) ())
((ucw::instances :accessor instances :initarg :instances :initform nil)
(instance :accessor instance)
(select-label :accessor select-label :initform "select" :initarg :select-label)
- (selectablep :accessor selectablep :initform t :initarg :selectablep)))
+ (selectablep :accessor selectablep :initform t :initarg :selectablep)
+ (ucw::deleteablep :accessor deletablep :initarg :deletablep :initform nil)
+ (viewablep :accessor viewablep :initarg :viewablep :initform nil)))
(defaction select-from-listing ((listing mewa-list-presentation) object index)
(answer object))
(let ((index index))
(<ucw:input :type "submit"
:action (select-from-listing listing object index)
- :value (select-label listing)))))
+ :value (select-label listing))))
+ (when (viewablep listing)
+ (let ((index index))
+ (<ucw:input :type "submit"
+ :action (call-component listing (make-presentation object))
+ :value "view"))))
(dolist (slot (slots listing))
(<:td :class "data-cell" (present-slot slot object)))
(<:td :class "index-number-cell")
(setf (ucw::instances (ucw::list-presentation self)) (valid-instances self))
(setf (display-results-p self) t))
+
(defmethod render-on ((res response) (self mewa-presentation-search))
- (<:as-html (search-query self))
+ ;(<:as-html (search-query self))
(ucw::render-criteria res self)
(<ucw:input :type "submit" :value "Search" :action (ok self))
(when (display-results-p self)