From c92ab9cdddddb5eab9579bcdb79e913ce942a135 Mon Sep 17 00:00:00 2001 From: joey Date: Mon, 16 Jul 2007 05:24:31 +0000 Subject: * Wrap the editpage template in the standard misctemplate, this allows the pagetemplate hook to work for that page. * Above change fixes the favicon plugin to work on edit pages. --- IkiWiki/CGI.pm | 17 ++++++++++++----- debian/changelog | 8 ++++++++ po/ikiwiki.pot | 10 +++++----- templates/editpage.tmpl | 29 +++++------------------------ 4 files changed, 30 insertions(+), 34 deletions(-) diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 3b1cab9a8..9fc65e34a 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -316,6 +316,7 @@ sub cgi_editpage ($$) { #{{{ javascript => 0, params => $q, action => $config{cgiurl}, + header => 0, table => 0, template => scalar template_params("editpage.tmpl"), wikiname => $config{wikiname}, @@ -472,6 +473,7 @@ sub cgi_editpage ($$) { #{{{ $form->field(name => "type", type => 'select', options => \@page_types); $form->title(sprintf(gettext("creating %s"), pagetitle($page))); + } elsif ($form->field("do") eq "edit") { check_canedit($page, $q, $session); @@ -491,7 +493,8 @@ sub cgi_editpage ($$) { #{{{ $form->title(sprintf(gettext("editing %s"), pagetitle($page))); } - print $form->render(submit => \@buttons); + printheader($session); + print misctemplate($form->title, $form->render(submit => \@buttons)); } else { # save page @@ -504,7 +507,8 @@ sub cgi_editpage ($$) { #{{{ $form->field(name => "page", type => 'hidden'); $form->field(name => "type", type => 'hidden'); $form->title(sprintf(gettext("editing %s"), $page)); - print $form->render(submit => \@buttons); + printheader($session); + print misctemplate($form->title, $form->render(submit => \@buttons)); return; } elsif (-e "$config{srcdir}/$file" && @@ -519,7 +523,8 @@ sub cgi_editpage ($$) { #{{{ value => readfile("$config{srcdir}/$file"). "\n\n\n".$form->field("editcontent"), force => 1); - print $form->render(submit => \@buttons); + printheader($session); + print misctemplate($form->title, $form->render(submit => \@buttons)); return; } @@ -541,7 +546,8 @@ sub cgi_editpage ($$) { #{{{ $form->field(name => "page", type => 'hidden'); $form->field(name => "type", type => 'hidden'); $form->title(sprintf(gettext("editing %s"), $page)); - print $form->render(submit => \@buttons); + printheader($session); + print misctemplate($form->title, $form->render(submit => \@buttons)); return; } @@ -585,7 +591,8 @@ sub cgi_editpage ($$) { #{{{ $form->field(name => "page", type => 'hidden'); $form->field(name => "type", type => 'hidden'); $form->title(sprintf(gettext("editing %s"), $page)); - print $form->render(submit => \@buttons); + printheader($session); + print misctemplate($form->title, $form->render(submit => \@buttons)); return; } else { diff --git a/debian/changelog b/debian/changelog index ae5810abe..bccab6f24 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +ikiwiki (2.5) UNRELEASED; urgency=low + + * Wrap the editpage template in the standard misctemplate, this allows the + pagetemplate hook to work for that page. + * Above change fixes the favicon plugin to work on edit pages. + + -- Joey Hess Mon, 16 Jul 2007 01:11:03 -0400 + ikiwiki (2.4) unstable; urgency=low * Make the toc plugin use html-compatible anchors. This is necessary since diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index 5e9ca0f99..9ce93ec1b 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-07-15 15:03-0400\n" +"POT-Creation-Date: 2007-07-16 01:17-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -53,17 +53,17 @@ msgstr "" msgid "creating %s" msgstr "" -#: ../IkiWiki/CGI.pm:491 ../IkiWiki/CGI.pm:506 ../IkiWiki/CGI.pm:517 -#: ../IkiWiki/CGI.pm:543 ../IkiWiki/CGI.pm:587 +#: ../IkiWiki/CGI.pm:492 ../IkiWiki/CGI.pm:507 ../IkiWiki/CGI.pm:518 +#: ../IkiWiki/CGI.pm:544 ../IkiWiki/CGI.pm:588 #, perl-format msgid "editing %s" msgstr "" -#: ../IkiWiki/CGI.pm:684 +#: ../IkiWiki/CGI.pm:685 msgid "You are banned." msgstr "" -#: ../IkiWiki/CGI.pm:716 +#: ../IkiWiki/CGI.pm:717 msgid "login failed, perhaps you need to turn on cookies?" msgstr "" diff --git a/templates/editpage.tmpl b/templates/editpage.tmpl index 08f160881..18e00849b 100644 --- a/templates/editpage.tmpl +++ b/templates/editpage.tmpl @@ -1,17 +1,3 @@ - - - - - -<TMPL_VAR FORM-TITLE> - - - - - - -

Your changes conflict with other changes made to the page. @@ -54,9 +40,6 @@ together before saving.

-
-/ -
@@ -74,20 +57,18 @@ Page type: Optional comment about this change:

- + + + +
Page preview:
-
+
- - - -- cgit v1.2.3