summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/VNBrowse.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-01-16 15:16:39 +0100
committerYorhel <git@yorhel.nl>2009-01-16 15:16:39 +0100
commit9ee7694a4b6f7dce174ec785cf5a71a5a38774bb (patch)
tree38e6dbb83d21dffec285f731fc1ae421e55801f5 /lib/VNDB/Handler/VNBrowse.pm
parent6dc9a434619d28f87eaf768b00d3696bb7c24c61 (diff)
parent910bb9f397cec1a49526e09e7d2c9b856bd5bdae (diff)
Merge branch 'beta'2.2
Diffstat (limited to 'lib/VNDB/Handler/VNBrowse.pm')
-rw-r--r--lib/VNDB/Handler/VNBrowse.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/VNDB/Handler/VNBrowse.pm b/lib/VNDB/Handler/VNBrowse.pm
index 8af5791e..d7cacaa0 100644
--- a/lib/VNDB/Handler/VNBrowse.pm
+++ b/lib/VNDB/Handler/VNBrowse.pm
@@ -16,7 +16,7 @@ sub list {
my($self, $char) = @_;
my $f = $self->formValidate(
- { name => 's', required => 0, default => 'title', enum => [ qw|title rel| ] },
+ { name => 's', required => 0, default => 'title', enum => [ qw|title rel pop| ] },
{ name => 'o', required => 0, default => 'a', enum => [ 'a','d' ] },
{ name => 'p', required => 0, default => 1, template => 'int' },
{ name => 'q', required => 0, default => '' },
@@ -61,7 +61,7 @@ sub list {
$q ? ( search => $q ) : (),
results => 50,
page => $f->{p},
- order => ($f->{s} eq 'rel' ? 'c_released' : 'title').($f->{o} eq 'a' ? ' ASC' : ' DESC'),
+ order => ($f->{s} eq 'rel' ? 'c_released' : $f->{s} eq 'pop' ? 'c_popularity' : 'title').($f->{o} eq 'a' ? ' ASC' : ' DESC'),
@cati ? ( cati => \@cati ) : (),
@cate ? ( cate => \@cate ) : (),
@lang ? ( lang => \@lang ) : (),
@@ -85,6 +85,7 @@ sub list {
[ '', 0 ],
[ '', 0 ],
[ 'Released', 'rel' ],
+ [ 'Popularity', 'pop' ],
],
row => sub {
my($s, $n, $l) = @_;
@@ -103,6 +104,7 @@ sub list {
td class => 'tc4';
lit monthstr $l->{c_released};
end;
+ td class => 'tc5', sprintf '%.2f', $l->{c_popularity}*100;
end;
},
);