From ec249059d3d28fc05dc69cfab9f64c67fe00a022 Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Mon, 5 Apr 2010 09:57:46 +0900 Subject: [PATCH] (www-display-feature-desc): Add new optional argument `simple'; display "Edit" and "New Account" buttons when running with simple mode; display "Simple" button when running with edit mode. (www-batch-view): Modify for `www-display-feature-desc' to support mode. --- cwiki-view.el | 81 ++++++++++++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 36 deletions(-) diff --git a/cwiki-view.el b/cwiki-view.el index 9659fc4..9442281 100644 --- a/cwiki-view.el +++ b/cwiki-view.el @@ -140,7 +140,8 @@ size=\;; "30\" maxlength=\"30\" value=\"\" />") "
  • \n")) ))) -(defun www-display-feature-desc (uri-feature-name uri-char &optional lang) +(defun www-display-feature-desc (uri-feature-name uri-char + &optional lang simple) (let ((feature-name (www-uri-decode-feature-name uri-feature-name)) (name@lang (intern (format "name@%s" lang)))) (princ @@ -152,24 +153,37 @@ size=\;; "30\" maxlength=\"30\" value=\"\" />") 'utf-8-mcs-er)) (princ "\n") (princ + (format + (if simple + "
    + + + + +
    +
    \n" + "
    + + + +
    +
    \n") + uri-feature-name uri-char)) + (princ (format "

    %s

    \n" (www-format-encode-string (symbol-name feature-name)))) (princ (format "

    name : %s " (or (www-format-feature-name feature-name) ""))) (princ - (format " " - chise-wiki-edit-url - uri-feature-name - uri-char)) - ;; (www-html-display-text - ;; (format "[[[edit|%s?feature=%s&property=name&char=%s]]]" - ;; ;; (char-feature-property feature-name 'name) - ;; chise-wiki-edit-url - ;; uri-feature-name ; (www-uri-encode-feature-name feature-name) - ;; uri-char)) - (princ "

    ") + (format + " " + chise-wiki-edit-url + uri-feature-name + uri-char)) + (unless simple + (princ "")) + (princ "\n

    \n") (when lang (princ "

    ") (princ @@ -178,19 +192,15 @@ size=\;; "30\" maxlength=\"30\" value=\"\" />") name@lang (or (char-feature-property feature-name name@lang) "")))) (princ - (format " " - chise-wiki-edit-url - uri-feature-name - name@lang - uri-char)) - ;; (www-html-display-text - ;; (format " [[[edit|%s?feature=%s&property=%s&char=%s]]]" - ;; chise-wiki-edit-url - ;; uri-feature-name - ;; name@lang - ;; uri-char)) - (princ "

    ")) + (format + " " + chise-wiki-edit-url + uri-feature-name + name@lang + uri-char)) + (unless simple + (princ "")) + (princ "\n

    \n")) (www-html-display-paragraph (format "type : %s" (or (www-feature-type feature-name) @@ -203,18 +213,16 @@ size=\;; "30\" maxlength=\"30\" value=\"\" />") 'default) 'default 'without-tags))) - ;; (www-html-display-paragraph - ;; (format "value-format : %s" - ;; (www-xml-format-list - ;; (or (www-feature-value-format feature-name) - ;; 'default)))) (princ (format "

    " +>" chise-wiki-edit-url uri-feature-name uri-char)) + (unless simple + (princ "")) + (princ "\n

    \n") (www-html-display-paragraph (format "format : %s" @@ -279,15 +287,16 @@ size=\;; "30\" maxlength=\"30\" value=\"\" />") (setq ret (car target)) (cond ((eq (car ret) 'char) (www-display-char-desc - (cdr ret) ; (decode-uri-string (cdr ret) 'utf-8-mcs-er) - lang nil (eq mode 'simple)) + (cdr ret) + lang nil + (eq mode 'simple)) ) ((eq (car ret) 'feature) (www-display-feature-desc (decode-uri-string (cdr ret) 'utf-8-mcs-er) (cdr (assq 'char target)) - ;; (decode-uri-string (cdr (assq 'char target))) - lang) + lang + (eq mode 'simple)) )) )) (princ "\n
    \n") -- 1.7.10.4