(www-display-object-desc): Add a link-button for RDF.
[chise/est.git] / cwiki-view.el
index 1605d68..42fe042 100644 (file)
@@ -14,6 +14,9 @@
     (setq format 'default))
   (unless value
     (setq value (www-get-feature-value char feature-name)))
+  (if (and (symbolp value)
+          (eq format 'wiki-text))
+      (setq value (list (list value))))
   (princ
    (format "<p><input type=\"text\" name=\"feature-name\"
 size=\"32\" maxlength=\"256\" value=\"%s\">"
@@ -35,8 +38,7 @@ size=\"64\" maxlength=\"256\" value=\"%s\">
                         ((eq c ?\u0022) "&quot;")
                         (t
                          (char-to-string c))))
-                     (www-format-value char feature-name
-                                       value format 'without-tags)
+                     (est-format-list value format nil nil " ")
                      "")))
   )
 
@@ -93,16 +95,23 @@ size=\"64\" maxlength=\"256\" value=\"%s\">
 <input type=\"submit\" value=\"Edit\" />
 </a>
 <input type=\"submit\" value=\"New Account\" />
+<a href=\"http://www.chise.org/est/rdf.cgi?%s=%s\">
+<input type=\"submit\" value=\"RDF\" />
+</a>
 </div>
 <hr />\n"
          "<div style=\"text-align:right;\">
 <a href=\"../view.cgi?%s=%s\">
 <input type=\"submit\" value=\"Simple\" />
 </a>
+<input type=\"submit\" value=\"New Account\" />
+<a href=\"http://www.chise.org/est/rdf.cgi?%s=%s\">
+<input type=\"submit\" value=\"RDF\" />
+</a>
 </div>
 <hr />\n")
-       genre
-       uri-object))
+       genre uri-object
+       genre uri-object))
       (when (setq parents (www-get-feature-value object '<-denotational))
        (princ (format "<p>%s %s</p>\n<hr>\n"
                       (www-format-value-as-char-list parents)
@@ -116,11 +125,7 @@ size=\"64\" maxlength=\"256\" value=\"%s\">
       (princ (format "<h%d>%s%s</h%d>\n"
                     level
                     (www-format-encode-string
-                     (est-format-object object)
-                      ;; (if (eq genre 'character)
-                      ;;     (char-to-string object)
-                      ;;   (format "%s" (concord-object-id object)))
-                     )
+                     (est-format-object object 'readable))
                     (if GlyphWiki-id
                         (format
                          " <a href=\"http://glyphwiki.org/wiki/%s\"><img alt=\"%s\" src=\"http://glyphwiki.org/glyph/%s.50px.png\" /></a>"
@@ -323,7 +328,8 @@ size=\"30\" maxlength=\"30\" value=\"%s\" />"
                    (or (www-feature-value-format feature-name)
                        'default)
                    'default
-                   'without-tags)))
+                   'without-tags)
+                  ))
     (unless simple
       (princ
        (format
@@ -382,7 +388,7 @@ size=\"30\" maxlength=\"30\" value=\"%s\" />"
                           (car (split-string accept-language ","))
                           ";"))
                     "-"))))
-            ret)
+            ret genre)
        (princ "Content-Type: text/html; charset=UTF-8
 
 <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
@@ -402,12 +408,13 @@ size=\"30\" maxlength=\"30\" value=\"%s\" />"
          (setq target
                (mapcar (lambda (cell)
                          (if (string-match "=" cell)
-                             (cons
-                              (intern
-                               (decode-uri-string
-                                (substring cell 0 (match-beginning 0))
-                                'utf-8-mcs-er))
-                              (substring cell (match-end 0)))
+                             (progn
+                               (setq genre (substring cell 0 (match-beginning 0))
+                                     ret (substring cell (match-end 0)))
+                               (cons
+                                (intern
+                                 (decode-uri-string genre 'utf-8-mcs-er))
+                                ret))
                            (list (decode-uri-string cell 'utf-8-mcs-er))))
                        (split-string target "&")))
          (setq ret (car target))