web commit by http://madduck.net/
authorJoey Hess <joey@kitenet.net>
Mon, 17 Mar 2008 15:25:18 +0000 (11:25 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 17 Mar 2008 15:25:18 +0000 (11:25 -0400)
doc/todo/turn_edittemplate_verbosity_off_by_default.mdwn [new file with mode: 0644]

diff --git a/doc/todo/turn_edittemplate_verbosity_off_by_default.mdwn b/doc/todo/turn_edittemplate_verbosity_off_by_default.mdwn
new file mode 100644 (file)
index 0000000..8b69413
--- /dev/null
@@ -0,0 +1,30 @@
+`edittemplate` replaces its directive with a note like "edittemplate person
+registered for people/*". It would be nice if this were dependent on
+a `verbose` parameter and default to off. I don't see the value in it, and by
+disabling the output, I can keep template registration as close as possible to
+the action as needed.
+
+I think this (untested) patch might just do the trick:
+
+    --- a/IkiWiki/Plugin/edittemplate.pm
+    +++ b/IkiWiki/Plugin/edittemplate.pm
+    @@ -46,8 +46,13 @@ sub preprocess (@) { #{{{
+
+      $pagestate{$params{page}}{edittemplate}{$params{match}}=$params{template};
+
+    -       return sprintf(gettext("edittemplate %s registered for %s"),
+    -               $params{template}, $params{match});
+    +       if (yesno($params{verbose})) {
+    +               return sprintf(gettext("edittemplate %s registered for %s"),
+    +                       $params{template}, $params{match});
+    +       }
+    +       else {
+    +               return '';
+    +       }
+    } # }}}
+
+    sub formbuilder (@) { #{{{
+
+--[[madduck]]
+
+[[tags wishlist patch]]