diff options
author | Yorhel <git@yorhel.nl> | 2009-05-22 17:20:57 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-05-22 17:20:57 +0200 |
commit | 63fb2bab0519357d78846107e6fe3acf42a65122 (patch) | |
tree | d0458d6dc2456726f7401d50f0d59e78be0081c4 /lib/VNDB | |
parent | 5f0ae1ac7f55b679a7df910d92a9cd1f9b9287ad (diff) |
Show comparable CERO ratings on /r+/edit input field
Diffstat (limited to 'lib/VNDB')
-rw-r--r-- | lib/VNDB/Handler/Releases.pm | 9 | ||||
-rw-r--r-- | lib/VNDB/Handler/VNPage.pm | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/VNDB/Handler/Releases.pm b/lib/VNDB/Handler/Releases.pm index 19de1e4a..501c90e9 100644 --- a/lib/VNDB/Handler/Releases.pm +++ b/lib/VNDB/Handler/Releases.pm @@ -175,7 +175,7 @@ sub _infotable { if($r->{minage} >= 0) { Tr ++$i % 2 ? (class => 'odd') : (); td 'Age rating'; - td $self->{age_ratings}{$r->{minage}}; + td $self->{age_ratings}{$r->{minage}}[0]; end; } @@ -357,7 +357,8 @@ sub _form { [ date => short => 'released', name => 'Release date' ], [ static => content => 'Leave month or day blank if they are unknown' ], [ select => short => 'minage', name => 'Age rating', - options => [ map [ $_, $self->{age_ratings}{$_} ], sort { $a <=> $b } keys %{$self->{age_ratings}} ] ], + options => [ map [ $_, $self->{age_ratings}{$_}[0].($self->{age_ratings}{$_}[1]?" (e.g. $self->{age_ratings}{$_}[1])":'') ], + sort { $a <=> $b } keys %{$self->{age_ratings}} ] ], [ select => short => 'resolution', name => 'Resolution', options => [ map [ $_, @{$self->{resolutions}[$_]} ], 0..$#{$self->{resolutions}} ] ], [ select => short => 'voiced', name => 'Voiced', options => [ @@ -485,7 +486,7 @@ sub browse { td class => 'tc1'; lit datestr $l->{released}; end; - td class => 'tc2', $l->{minage} > -1 ? $self->{age_ratings}{$l->{minage}} : ''; + td class => 'tc2', $l->{minage} > -1 ? $self->{age_ratings}{$l->{minage}}[0] : ''; td class => 'tc3'; $_ ne 'oth' && cssicon $_, $self->{platforms}{$_} for (@{$l->{platforms}}); cssicon "lang $l->{language}", $self->{languages}{$l->{language}}; @@ -534,7 +535,7 @@ sub _filters { end; txt ' than or equal to '; Select id => 'ma_a', name => 'ma_a', style => 'width: 80px; text-align: center'; - $_>=0 && option value => $_, $f->{ma_a} == $_ ? ('selected' => 'selected') : (), $self->{age_ratings}{$_} + $_>=0 && option value => $_, $f->{ma_a} == $_ ? ('selected' => 'selected') : (), $self->{age_ratings}{$_}[0] for (sort { $a <=> $b } keys %{$self->{age_ratings}}); end; end; diff --git a/lib/VNDB/Handler/VNPage.pm b/lib/VNDB/Handler/VNPage.pm index d5d1c0a1..fac6305b 100644 --- a/lib/VNDB/Handler/VNPage.pm +++ b/lib/VNDB/Handler/VNPage.pm @@ -422,7 +422,7 @@ sub _releases { for my $rel (grep $l eq $_->{language}, @$r) { Tr; td class => 'tc1'; lit datestr $rel->{released}; end; - td class => 'tc2', $rel->{minage} < 0 ? '' : $self->{age_ratings}{$rel->{minage}}; + td class => 'tc2', $rel->{minage} < 0 ? '' : $self->{age_ratings}{$rel->{minage}}[0]; td class => 'tc3'; for (sort @{$rel->{platforms}}) { next if $_ eq 'oth'; |