[bknr-cvs] ksprotte changed trunk/projects/bos/web/poi-handlers.lisp

BKNR Commits bknr at bknr.net
Thu Sep 4 10:52:32 UTC 2008


Revision: 3788
Author: ksprotte
URL: http://bknr.net/trac/changeset/3788

display the web link of all poi media
U   trunk/projects/bos/web/poi-handlers.lisp

Modified: trunk/projects/bos/web/poi-handlers.lisp
===================================================================
--- trunk/projects/bos/web/poi-handlers.lisp	2008-09-04 10:40:59 UTC (rev 3787)
+++ trunk/projects/bos/web/poi-handlers.lisp	2008-09-04 10:52:31 UTC (rev 3788)
@@ -223,6 +223,9 @@
                       :br
                       (submit-button "upload" "upload"))))
                (:tr ((:td :colspan "2" :height "10")))
+               (:tr (:td "web link")
+                    (:td (:princ-safe (medium-web-link medium))))
+               (:tr ((:td :colspan "2" :height "10")))
                ((:form :method "post")
                 (:tr (:td "title")
                      (:td (text-field "title"
@@ -244,6 +247,13 @@
   (:method ((medium poi-airal)) "Airal")
   (:method ((medium poi-movie)) "Movie"))
 
+(defgeneric medium-web-link (medium)
+  (:method ((medium store-image))
+    (format nil "http://~A/image/~A"
+            (website-host) (store-object-id medium)))  
+  (:method ((medium poi-movie))
+    (poi-movie-url medium)))
+
 (defgeneric medium-handler-preview (medium &key small)
   (:method ((medium poi-medium) &key small)
     (declare (ignore small))




More information about the Bknr-cvs mailing list