- (let ((i (get-foreign-instances slot instance)))
-
- (<:ul
- (dolist (s i)
- (let ((s s))
- (setf (foreign-instance slot) s)
- (when (slot-boundp slot 'ucw::place)
- (<ucw:a :action (view-instance slot s :initargs `(:global-properties ,(list :linkedp t :editablep nil)))
- (<:li (setf (linkedp slot) nil)
- (present-relation slot instance)))))))))
-
+ (let* ((i (get-foreign-instances slot instance))
+ (presentation (and i (make-presentation (car i) :type :one-line))))
+ (when i
+ (flet ((linker (i string)
+ (<ucw:a
+ :action (view-instance slot i
+ :initargs
+ `(:global-properties ,
+ (list
+ :linkedp t
+ :editablep nil)))
+ (<:as-html string))))
+ (<:table
+ (<:tr
+ (<:th) ;empty col for (view) link
+ (dolist (s (slots presentation))
+ (<:th (<:as-html (label s)))))
+ (dolist (s i)
+ (let ((s s))
+ (setf (foreign-instance slot) s)
+ (when (slot-boundp slot 'ucw::place)
+ (<:tr
+ (<:td (linker s " (view) "))
+ (dolist (p (slots (make-presentation s :type :one-line
+ :initargs
+ '(:global-properties
+ (:editablep nil)))))
+ (<:td
+
+ (present-slot p s))))))))))))
+