From 43adf6c1681cf62f2cfbfa90d75053a1d7da5d23 Mon Sep 17 00:00:00 2001 From: yorhel Date: Sat, 21 Jun 2008 12:49:51 +0000 Subject: Time and Place categories are now boolean, and small vnpage cleanup git-svn-id: svn://vndb.org/vndb@32 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b --- data/tpl/vnpage | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'data') diff --git a/data/tpl/vnpage b/data/tpl/vnpage index f6f12225..026f347f 100644 --- a/data/tpl/vnpage +++ b/data/tpl/vnpage @@ -1,6 +1,15 @@ [[= ttabs('v', $d{vn}) ]] +

[[: $d{vn}{title} ]]

+-[[ if($p{AuthLoggedin}) { ]] +

< user options - + [[= $d{vote}{vid} ? 'your vote: '.$d{vote}{vote} : 'vote' ]] +- [[= !$d{list}{vid} ? 'add to vn list' : 'status: '.lc $VNDB::LSTAT->[$d{list}{status}] ]] +>

+[[ } ]]- + + [[ if($d{vn}{hidden}) { ]]- This item has been deleted from the database. File a request on the @@ -55,14 +64,6 @@ [[ } ]]- - --[[ if($p{AuthLoggedin}) { ]] -

< user options - - [[= $d{vote}{vid} ? 'your vote: '.$d{vote}{vote} : 'vote' ]] -- [[= !$d{list}{vid} ? 'add to vn list' : 'status: '.lc $VNDB::LSTAT->[$d{list}{status}] ]] ->

-[[ } ]]- - -[[ $d{vn}{c_votes} =~ s#^([0-9]{2}.[0-9]{2})\|([0-9]{4})$#$2 == 0 ? 'No votes yet' : $1 == 0 ? sprintf 'N/A (%d vote%s)', $2, $2>1?'s':'' : sprintf '%.2f (%d vote%s)', $1, $2, $2>1?'s':''#e; @@ -100,10 +101,10 @@ if($d{vn}{length} || $d{vn}{alias} || @links || $prod) { ]] [[ } ]]- - [[ if(@{$d{vn}{categories}}) { my %nolvl = (map {$_=>1} qw| pli pbr gaa gab hfa hfe |); ]]- + [[ if(@{$d{vn}{categories}}) { my %nolvl = (map {$_=>1} qw| pli pbr gaa gab hfa hfe lea lfa lsp tfu tpa tpr |); ]]-

Categories

-
- [[ for (sort keys %$VNDB::CAT) { +
+ [[ for (qw|e s g p h|) { my $c = $_; my @c = map { my $s=$_; my ($cs) = grep { $_->[0] eq $c.$s } @{$d{vn}{categories}}; @@ -113,6 +114,9 @@ if($d{vn}{length} || $d{vn}{alias} || @links || $prod) { ]] if(@c) { ]]-
[[: $VNDB::CAT->{$c}[0] ]]
[[= join(', ', @c) ]]
[[ } } ]] + [[ if(grep $_->[0] =~ /^[tl]/, @{$d{vn}{categories}}) { ]]- +
Place/Time
[[= join ', ', map $VNDB::CAT->{substr($_->[0],0,1)}[1]{substr($_->[0],1,2)}, sort grep $_->[0] =~ /^[tl]/, @{$d{vn}{categories}} ]]
+ [[ } ]]-
[[ } ]]- -- cgit v1.2.3