X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/a6fc3b411f64f18cd2aabfcd2496b3f7e275e7ef..922e149de93844561160c2978d71531f3c08345e:/doc/todo/Allow_edittemplate_to_set_file_type.mdwn 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]]