1 (in-package :lisp-on-lines
)
3 ;;;;; Wrap a display in "back buttons"
4 (deflayer wrap-back-buttons
)
7 :in-layer wrap-back-buttons
:around
10 (<ucw
:a
:class
"wiz-button previous" :action
(ok component t
)
11 (<:as-html
"Go Back"))
12 (<:div
:style
"clear:both;"
14 (<ucw
:a
:class
"wiz-button previous" :action
(ok component t
)
15 (<:as-html
"Go Back")))
17 ;;;; Wrap an object display in with a link to the object
21 (defvar *link-wrapped-p
* nil
)
23 (define-layered-class description
24 :in-layer wrap-link
()
25 ((link :initarg
:link
:initform nil
:special t
:accessor link
)))
28 :in-layer wrap-link
:around
(description object
)
29 (let ((link (link description
)))
31 (with-inactive-layers (wrap-link)
34 (let ((*link-wrapped-p
* t
))
35 (<ucw
:a
:action
(call-display self object link
)
36 (call-next-method)))))))
43 (defdisplay ((description t
) (button (eql 'standard-form-buttons
)))
44 (<ucw
:submit
:action
(ok self
)
47 (defdisplay :in-layer wrap-form
:around
(object description
)
49 :action
(refresh-component self
)
50 (with-inactive-layers (wrap-form)
53 ;(display* 'standard-form-buttons)