(:file "slot-presentations/date")
(:file "standard-display")
(:file "standard-attributes")
+ (:file "standard-wrappers")
(:file "relational-attributes"))
:serial t)
(:module :components
(apply #'display ,component thing args)))
,@body)))
-(defmacro call-display (object &rest args)
- `(call-component self (make-instance 'standard-display-component
+
+(define-layered-function find-display-type (object))
+
+(define-layered-method find-display-type (object)
+ 'viewer)
+
+(define-layered-function find-display-layers (object))
+
+(define-layered-method find-display-layers (object)
+ "layered function"
+ nil)
+
+(defmacro call-display (component object &rest args)
+ `(call-component ,component (make-instance 'standard-display-component
:display #'(lambda (component)
(with-component (component)
(<:as-html ,object)
--- /dev/null
+(in-package :lisp-on-lines)
+
+;;;;; Wrap a display in "back buttons"
+(deflayer wrap-back-buttons)
+
+(defdisplay (:in-layer
+ wrap-back-buttons
+ :combination :around)
+ (<ucw:a :class "wiz-button previous" :action (ok component t)
+ (<:as-html "Go Back"))
+ (<:div :style "clear:both;"
+ (call-next-method))
+ (<ucw:a :class "wiz-button previous" :action (ok component t)
+ (<:as-html "Go Back")))
+
+;;;; Wrap an object display in with a link to the object
+
+(deflayer wrap-link)
+
+(defdisplay (:in-layer
+ wrap-link
+ :combination :around)
+ (let ((layers (find-display-layers object)))
+ (<ucw:a :action (call-display component object
+ :type (find-display-type object)
+ :layers layers)
+
+ (call-next-method))))
\ No newline at end of file