X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=doc%2Ftodo%2FAllow_edittemplate_to_set_file_type.mdwn;h=1b99a4e05e1efa916893cb8bb03cd9fefc3aa905;hb=937b24e0cf98d75dd353d80267efddcecab9e908;hp=54fff6a194d71b9aba1c0434686fd4a538995af4;hpb=a6fc3b411f64f18cd2aabfcd2496b3f7e275e7ef;p=ikiwiki.git diff --git a/doc/todo/Allow_edittemplate_to_set_file_type.mdwn b/doc/todo/Allow_edittemplate_to_set_file_type.mdwn index 54fff6a19..1b99a4e05 100644 --- a/doc/todo/Allow_edittemplate_to_set_file_type.mdwn +++ b/doc/todo/Allow_edittemplate_to_set_file_type.mdwn @@ -5,13 +5,16 @@ Below is a [[patch]] to [[plugins/edittemplate]] that does a few things: * It makes the description of what was registered link to the template page (which gives feedback for typos or allows template creation) * It adds a colon to the standard string correcting the syntax. +[[done]] except for the colon change; it's referring to the template as an +edittemplate there. --[[Joey]] + ---- diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm index 98308de..c381940 100644 --- a/IkiWiki/Plugin/edittemplate.pm +++ b/IkiWiki/Plugin/edittemplate.pm - @@ -56,8 +56,14 @@ sub preprocess (@) { #{{{ + @@ -56,8 +56,14 @@ sub preprocess (@) { $pagestate{$params{page}}{edittemplate}{$params{match}}=$params{template}; @@ -25,10 +28,10 @@ Below is a [[patch]] to [[plugins/edittemplate]] that does a few things: + + return sprintf(gettext("edittemplate: %s registered for %s"), + $linkHTML, $params{match}); - } # }}} + } - sub formbuilder (@) { #{{{ - @@ -89,6 +95,9 @@ sub formbuilder (@) { #{{{ + sub formbuilder (@) { + @@ -89,6 +95,9 @@ sub formbuilder (@) { if (pagespec_match($p, $pagespec, location => $registering_page)) { $form->field(name => "editcontent", value => filltemplate($pagestate{$registering_page}{edittemplate}{$pagespec}, $page)); @@ -39,5 +42,3 @@ Below is a [[patch]] to [[plugins/edittemplate]] that does a few things: } } - -[[done]]