* Elegant patch from Ethan to clean up the display of page names in the
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 21 Feb 2007 00:17:50 +0000 (00:17 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 21 Feb 2007 00:17:50 +0000 (00:17 +0000)
  dropdown when creating a new page.

IkiWiki/CGI.pm
debian/changelog
doc/patchqueue/friendly_pagelocs.mdwn [deleted file]
po/ikiwiki.pot

index af3bb8a4aca307f84bc63914978f312c6dddc301..e23ef8afd748e66caefe29b0e09a69e06e7d1229 100644 (file)
@@ -459,7 +459,8 @@ sub cgi_editpage ($$) { #{{{
                        
                        $form->tmpl_param("page_select", 1);
                        $form->field(name => "page", type => 'select',
-                               options => \@editable_locs, value => $best_loc);
+                               options => { map { $_ => pagetitle($_, 1) } @editable_locs },
+                               value => $best_loc);
                        $form->field(name => "type", type => 'select',
                                options => \@page_types);
                        $form->title(sprintf(gettext("creating %s"), pagetitle($page)));
index 95811f7f5ea3fd81e317a71a34c196d11aa72818..6a6dc8f8246db63adbdb0fa3cbcefc8f36d06a67 100644 (file)
@@ -25,8 +25,10 @@ ikiwiki (1.44) UNRELEASED; urgency=low
   * Detect old versions of xgettext and avoid using them.
   * perl is broken: print "" || die fails! Work around this insanity.
   * Smarter detection of no-op changes to po files.
+  * Elegant patch from Ethan to clean up the display of page names in the
+    dropdown when creating a new page.
 
- -- Joey Hess <joeyh@debian.org>  Tue, 20 Feb 2007 18:12:44 -0500
+ -- Joey Hess <joeyh@debian.org>  Tue, 20 Feb 2007 19:14:39 -0500
 
 ikiwiki (1.43) unstable; urgency=low
 
diff --git a/doc/patchqueue/friendly_pagelocs.mdwn b/doc/patchqueue/friendly_pagelocs.mdwn
deleted file mode 100644 (file)
index 2fbfbf5..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-When you create a new page, the choices for page location have underscores and
-numbers in them to represent spaces and "special characters". This patch lets
-ikiwiki display more user-friendly names. --Ethan
-
-<pre>
-diff -urX ignorepats ikiwiki/IkiWiki/CGI.pm ikidev/IkiWiki/CGI.pm
---- ikiwiki/IkiWiki/CGI.pm      2007-02-14 18:17:12.000000000 -0800
-+++ ikidev/IkiWiki/CGI.pm       2007-02-20 15:54:13.761158000 -0800
-@@ -450,6 +450,8 @@
-                                map { check_canedit($_, $q, $session) } @page_locs;
-                        }
-
-+                       # don't escape (will be done by formbuilder)
-+                       my %loc_options = map { $_ => pagetitle($_, 1) } @editable_locs;
-                        my @page_types;
-                        if (exists $hooks{htmlize}) {
-                                @page_types=keys %{$hooks{htmlize}};
-@@ -457,7 +459,7 @@
-
-                        $form->tmpl_param("page_select", 1);
-                        $form->field(name => "page", type => 'select',
--                               options => \@editable_locs, value => $best_loc);
-+                               options => \%loc_options, value => $best_loc);
-                        $form->field(name => "type", type => 'select',
-                                options => \@page_types);
-                        $form->title(sprintf(gettext("creating %s"), pagetitle($page)));
-</pre>
\ No newline at end of file
index 29673a1d1d79df4c0027f9e5170df8a3746af7f1..76337ff7efa2f53dae46d1ef097f8a4e6d17b06e 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-20 18:12-0500\n"
+"POT-Creation-Date: 2007-02-20 19:07-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -36,21 +36,21 @@ msgstr ""
 msgid "discussion"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:465
+#: ../IkiWiki/CGI.pm:466
 #, perl-format
 msgid "creating %s"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:482 ../IkiWiki/CGI.pm:510 ../IkiWiki/CGI.pm:543
+#: ../IkiWiki/CGI.pm:483 ../IkiWiki/CGI.pm:511 ../IkiWiki/CGI.pm:544
 #, perl-format
 msgid "editing %s"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:651
+#: ../IkiWiki/CGI.pm:652
 msgid "You are banned."
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:683
+#: ../IkiWiki/CGI.pm:684
 msgid "login failed, perhaps you need to turn on cookies?"
 msgstr ""