]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Add color parameter to postsparkline. Closes: #438900
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 20 Aug 2007 18:57:21 +0000 (18:57 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 20 Aug 2007 18:57:21 +0000 (18:57 +0000)
IkiWiki/Plugin/postsparkline.pm
debian/changelog
doc/plugins/postsparkline.mdwn
po/ikiwiki.pot

index 6f7558bc44d2375afcfb3a6a38a7680fe3ffbb1b..ac7ad9d73b7c6fb6a5c7f26e05ce2b598ef6177d 100644 (file)
@@ -55,11 +55,15 @@ sub preprocess (@) { #{{{
        if ($@) {
                return "[[postsparkline error $@]]";
        }
+
+       my $color=exists $params{color} ? "($params{color})" : "";
+
        delete $params{pages};
        delete $params{formula};
        delete $params{ftime};
+       delete $params{color};
        return IkiWiki::Plugin::sparkline::preprocess(%params, 
-               map { $_ => "" } reverse @data);
+               map { $_.$color => "" } reverse @data);
 } # }}}
 
 sub perfoo ($@) {
index cca99ecf1b32dd4c50a298ee4f33b2c2b303f2c9..9dc028615ba573475f80b5f98c64066e2eeb1762 100644 (file)
@@ -42,8 +42,9 @@ ikiwiki (2.6) UNRELEASED; urgency=low
       (This was needed for compatability with a bug in CGI::FormBuilder
       3.0401, but ikiwiki already needs a newer version.)
   * Pass buttons to all other formbuilder_setup hooks too.
+  * Add color parameter to postsparkline. Closes: #438900
 
- -- Joey Hess <joeyh@debian.org>  Fri, 17 Aug 2007 01:19:44 -0400
+ -- Joey Hess <joeyh@debian.org>  Mon, 20 Aug 2007 14:56:51 -0400
 
 ikiwiki (2.5) unstable; urgency=low
 
index da2e6830e83923547152da4c64b24bd3da1e12df..d799f0a0c8c5488def524779734230583a01e305 100644 (file)
@@ -16,8 +16,8 @@ statistics about a set of pages, such as posts to a blog.
 
 # usage
 
-All options aside fron the `pages`, `max`, `formula`, and `time` options
-are passed on to the sparkline plugin.
+All options aside fron the `pages`, `max`, `formula`, `time`, and `color`
+options are passed on to the sparkline plugin.
 
 You don't need to specify any data points (though you can if you want to).
 Instead, data points are automatically generated based on the creation
@@ -40,6 +40,9 @@ The `time` parameter has a default value of "ctime", since forumae use
 the creation times of pages by default. If you instead want
 them to use the modification times of pages, set it to "mtime".
 
+To change the color used to draw the sparkline, use the `color` parameter.
+For example, "color=red".
+
 # adding formulae
 
 Additional formulae can be added without modifying this plugin by writing
index 929ff3da4de7c483978196419573919e3f169c91..9d6882764035e8bf09d2f0b6f422db1d0c871586 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-08-15 04:07-0400\n"
+"POT-Creation-Date: 2007-08-17 15:44-0400\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"
@@ -20,50 +20,50 @@ msgstr ""
 msgid "You need to log in first."
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:223
+#: ../IkiWiki/CGI.pm:224
 msgid "Login"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:224
+#: ../IkiWiki/CGI.pm:225
 msgid "Preferences"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:225
+#: ../IkiWiki/CGI.pm:226
 msgid "Admin"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:282
+#: ../IkiWiki/CGI.pm:284
 msgid "Preferences saved."
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:348
+#: ../IkiWiki/CGI.pm:352
 #, perl-format
 msgid "%s is not an editable page"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:427 ../IkiWiki/Plugin/brokenlinks.pm:24
+#: ../IkiWiki/CGI.pm:431 ../IkiWiki/Plugin/brokenlinks.pm:24
 #: ../IkiWiki/Plugin/inline.pm:208 ../IkiWiki/Plugin/opendiscussion.pm:17
 #: ../IkiWiki/Plugin/orphans.pm:28 ../IkiWiki/Render.pm:99
 #: ../IkiWiki/Render.pm:179
 msgid "discussion"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:473
+#: ../IkiWiki/CGI.pm:477
 #, perl-format
 msgid "creating %s"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:491 ../IkiWiki/CGI.pm:510 ../IkiWiki/CGI.pm:521
-#: ../IkiWiki/CGI.pm:548 ../IkiWiki/CGI.pm:593
+#: ../IkiWiki/CGI.pm:495 ../IkiWiki/CGI.pm:514 ../IkiWiki/CGI.pm:525
+#: ../IkiWiki/CGI.pm:552 ../IkiWiki/CGI.pm:597
 #, perl-format
 msgid "editing %s"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:688
+#: ../IkiWiki/CGI.pm:692
 msgid "You are banned."
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:708
+#: ../IkiWiki/CGI.pm:712
 msgid "login failed, perhaps you need to turn on cookies?"
 msgstr ""