;;; -*- mode: Lisp; Syntax: Common-Lisp; -*- ;;; ;;; Copyright (c) 2009 by the authors. ;;; ;;; See LICENCE for details. (in-package :hu.dwim.wiki) ;;;;;; ;;; t/alternator/inspector (def layered-method make-alternatives ((component t/alternator/inspector) (class entity) (prototype wiki-page) (value wiki-page)) (list* (make-instance 'wiki-page/text/inspector :component-value value) (call-next-layered-method))) ;;;;;; ;;; wiki-page/text/inspector (def (component e) wiki-page/text/inspector (t/inspector t/detail/presentation content/mixin title/mixin) ((last-modified-by :type component) (last-modified-at :type component))) (def refresh-component wiki-page/text/inspector (bind (((:slots hu.dwim.presentation::content last-modified-by last-modified-at component-value) -self-)) (setf hu.dwim.presentation::content (make-instance 'place/value/inspector :component-value (make-object-slot-place component-value 'hu.dwim.wiki::content)) last-modified-by (make-instance 'place/value/inspector :component-value (make-object-slot-place (hu.dwim.model:last-modified-in-of component-value) 'hu.dwim.meta-model::authenticated-subject)) last-modified-at (make-instance 'place/value/inspector :component-value (make-object-slot-place component-value 'hu.dwim.model::last-modified-at))))) (def render-xhtml wiki-page/text/inspector (bind (((:read-only-slots last-modified-by last-modified-at) -self-)) (with-render-style/component (-self-)