X-Git-Url: http://git.kpe.io/?p=hyperobject.git;a=blobdiff_plain;f=views.lisp;h=b5594a7a8cf71e8e004913f3b6509c7290f66c52;hp=2c2713e54079a34f850fac50dd68040ba18382ed;hb=04f829aab1e5caaefe60391f756e7a5db2d1282b;hpb=2272c8f3fad706bece472bc5a1909e3ea0cc53e3 diff --git a/views.lisp b/views.lisp index 2c2713e..b5594a7 100644 --- a/views.lisp +++ b/views.lisp @@ -7,10 +7,9 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: views.lisp,v 1.35 2003/05/14 04:45:05 kevin Exp $ -;;;; -;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg +;;;; $Id: views.lisp,v 1.36 2003/05/14 05:29:48 kevin Exp $ ;;;; +;;;; This file is Copyright (c) 2000-2003 by Kevin M. Rosenberg ;;;; ************************************************************************* (in-package :hyperobject) @@ -512,19 +511,28 @@ (defvar +newline-string+ (format nil "~%")) +(defun write-user-name-maybe-plural (obj nitems strm) + (write-string + (if (> nitems 1) + (hyperobject-class-user-name-plural obj) + (hyperobject-class-user-name obj)) + strm)) + (defun initialize-text-view (view) (setf (list-start-str-or-func view) (compile nil (eval '(lambda (obj nitems strm) - (format strm "~a~P:~%" - (hyperobject-class-user-name obj) nitems))))) + (write-user-name-maybe-plural obj nitems strm) + (write-char #\: strm) + (write-char #\Newline strm))))) (setf (list-start-indent view) t) (setf (obj-data-indent view) t) (setf (obj-data-end-str view) +newline-string+)) (defun html-list-start-func (obj nitems strm) - (format strm "

~a~p:

" strm) + (write-user-name-maybe-plural obj nitems strm) + (write-string ":