HCoop
/
clinton
/
lisp-on-lines.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lots of great changes to update along with maxwell 0.8
[clinton/lisp-on-lines.git]
/
src
/
mewa
/
presentations.lisp
diff --git
a/src/mewa/presentations.lisp
b/src/mewa/presentations.lisp
index
396b4d0
..
53942b1
100644
(file)
--- a/
src/mewa/presentations.lisp
+++ b/
src/mewa/presentations.lisp
@@
-39,7
+39,9
@@
((ucw::instances :accessor instances :initarg :instances :initform nil)
(instance :accessor instance)
(select-label :accessor select-label :initform "select" :initarg :select-label)
((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))
(defaction select-from-listing ((listing mewa-list-presentation) object index)
(answer object))
@@
-62,7
+64,12
@@
(let ((index index))
(<ucw:input :type "submit"
:action (select-from-listing listing object index)
(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")
(dolist (slot (slots listing))
(<:td :class "data-cell" (present-slot slot object)))
(<:td :class "index-number-cell")
@@
-120,7
+127,6
@@
(if (listp e) e (list e))))
(ucw::criteria self))))
(if (listp e) e (list e))))
(ucw::criteria self))))
-
(defmethod search-query ((self mewa:mewa-presentation-search))
(search-expr self (instance self)))
(defmethod search-query ((self mewa:mewa-presentation-search))
(search-expr self (instance self)))
@@
-135,7
+141,9
@@
(setf (ucw::instances (ucw::list-presentation self)) (valid-instances self))
(setf (display-results-p self) t))
(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))
(defmethod render-on ((res response) (self mewa-presentation-search))
+ ;(<:as-html (search-query self))
(ucw::render-criteria res self)
(<ucw:input :type "submit" :value "Search" :action (ok self))
(when (display-results-p self)
(ucw::render-criteria res self)
(<ucw:input :type "submit" :value "Search" :action (ok self))
(when (display-results-p self)