diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-07-16 05:24:31 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-07-16 05:24:31 +0000 |
commit | c92ab9cdddddb5eab9579bcdb79e913ce942a135 (patch) | |
tree | 82602057f30003c5660688c6f0d06c62d927bc35 /IkiWiki/CGI.pm | |
parent | 3ead2e742074efa99c4c71229daced6800345a8e (diff) | |
download | ikiwiki-c92ab9cdddddb5eab9579bcdb79e913ce942a135.tar ikiwiki-c92ab9cdddddb5eab9579bcdb79e913ce942a135.tar.gz |
* 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.
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r-- | IkiWiki/CGI.pm | 17 |
1 files changed, 12 insertions, 5 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 { |