]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
editpage, comment: Clean up title when editing or creating a page or comment.
authorJoey Hess <joey@kitenet.net>
Sat, 25 Dec 2010 17:38:26 +0000 (13:38 -0400)
committerJoey Hess <joey@kitenet.net>
Sat, 25 Dec 2010 17:38:26 +0000 (13:38 -0400)
Now that page.tmpl is used for cgi, the parentlinks are able to be
displayed even when creating or editing a page. So it's redundant to
include the path to the page in the title, remove it.

IkiWiki/Plugin/comments.pm
IkiWiki/Plugin/editpage.pm
debian/changelog

index 68ac4cfae4844dd7de3b44e7af9956d00ab3ac75..63e9ab499bde535b1b5524219f22e8cf8d131e63 100644 (file)
@@ -375,7 +375,7 @@ sub editcomment ($$) {
        my $baseurl = urlto($page);
 
        $form->title(sprintf(gettext("commenting on %s"),
        my $baseurl = urlto($page);
 
        $form->title(sprintf(gettext("commenting on %s"),
-                       IkiWiki::pagetitle($page)));
+                       IkiWiki::pagetitle(IkiWiki::basename($page))));
 
        $form->tmpl_param('helponformattinglink',
                htmllink($page, $page, 'ikiwiki/formatting',
 
        $form->tmpl_param('helponformattinglink',
                htmllink($page, $page, 'ikiwiki/formatting',
index da071d4920fe0e5fcafde8f20419925522278d31..537b86ad1d12c1c507d2710a237051b7d4e3c91a 100644 (file)
@@ -291,7 +291,7 @@ sub cgi_editpage ($$) {
                                value => $best_loc);
                        $form->field(name => "type", type => 'select',
                                options => \@page_types);
                                value => $best_loc);
                        $form->field(name => "type", type => 'select',
                                options => \@page_types);
-                       $form->title(sprintf(gettext("creating %s"), pagetitle($page)));
+                       $form->title(sprintf(gettext("creating %s"), pagetitle(basename($page))));
                        
                }
                elsif ($form->field("do") eq "edit") {
                        
                }
                elsif ($form->field("do") eq "edit") {
@@ -309,7 +309,7 @@ sub cgi_editpage ($$) {
                        $form->tmpl_param("page_select", 0);
                        $form->field(name => "page", type => 'hidden');
                        $form->field(name => "type", type => 'hidden');
                        $form->tmpl_param("page_select", 0);
                        $form->field(name => "page", type => 'hidden');
                        $form->field(name => "type", type => 'hidden');
-                       $form->title(sprintf(gettext("editing %s"), pagetitle($page)));
+                       $form->title(sprintf(gettext("editing %s"), pagetitle(basename($page))));
                }
                
                showform($form, \@buttons, $session, $q,
                }
                
                showform($form, \@buttons, $session, $q,
index 630a4498a18b79a435ae17717d9e56b4c73bb2c9..89617d5de223f12bdb6d62cb4b0e676f4a249806 100644 (file)
@@ -17,6 +17,8 @@ ikiwiki (3.20101202) UNRELEASED; urgency=low
     like title_overridden that do not appear on the template. (intrigeri)
     (See https://rt.cpan.org/Public/Bug/Display.html?id=64158)
   * inline: Force an absolute page location when the inline postform is used.
     like title_overridden that do not appear on the template. (intrigeri)
     (See https://rt.cpan.org/Public/Bug/Display.html?id=64158)
   * inline: Force an absolute page location when the inline postform is used.
+  * editpage, comment: Clean up title when editing or creating a page or
+    comment.
 
  -- Joey Hess <joeyh@debian.org>  Mon, 29 Nov 2010 14:44:13 -0400
 
 
  -- Joey Hess <joeyh@debian.org>  Mon, 29 Nov 2010 14:44:13 -0400