* Add color parameter to postsparkline. Closes: #438900

master
joey 2007-08-20 18:57:21 +00:00
parent 56b29914bd
commit a9b7f01ec8
4 changed files with 24 additions and 16 deletions

View 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 ($@) {

3
debian/changelog vendored
View 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

View 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

View 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 ""