summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-06-21 12:49:51 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-06-21 12:49:51 +0000
commit43adf6c1681cf62f2cfbfa90d75053a1d7da5d23 (patch)
tree0b663579038bfb1a702d939a4048008e0a0fd17c /data
parent5fae2ac0d0a85712bcf0611c99c5f7cf39421dc5 (diff)
Time and Place categories are now boolean, and small vnpage cleanup
git-svn-id: svn://vndb.org/vndb@32 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
Diffstat (limited to 'data')
-rw-r--r--data/tpl/vnpage26
1 files changed, 15 insertions, 11 deletions
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}) ]]
+
<h2>[[: $d{vn}{title} ]]</h2>
+-[[ if($p{AuthLoggedin}) { ]]
+<p class="mod">&lt; user options -
+ <a href="/u[[= $p{AuthId} ]]/votes" rel="voteDD" class="dropdown">[[= $d{vote}{vid} ? 'your vote: '.$d{vote}{vote} : 'vote' ]]</a>
+- <a href="/u[[= $p{AuthId} ]]/list" rel="listDD" class="dropdown">[[= !$d{list}{vid} ? 'add to vn list' : 'status: '.lc $VNDB::LSTAT->[$d{list}{status}] ]]</a>
+&gt;</p>
+[[ } ]]-
+
+
[[ if($d{vn}{hidden}) { ]]-
<span class="warning">
This item has been deleted from the database. File a request on the
@@ -55,14 +64,6 @@
[[ } ]]-
</div>
-
--[[ if($p{AuthLoggedin}) { ]]
-<p class="mod">&lt; user options -
- <a href="/u[[= $p{AuthId} ]]/votes" rel="voteDD" class="dropdown">[[= $d{vote}{vid} ? 'your vote: '.$d{vote}{vote} : 'vote' ]]</a>
-- <a href="/u[[= $p{AuthId} ]]/list" rel="listDD" class="dropdown">[[= !$d{list}{vid} ? 'add to vn list' : 'status: '.lc $VNDB::LSTAT->[$d{list}{status}] ]]</a>
-&gt;</p>
-[[ } ]]-
-
-[[
$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) { ]]
</dl>
[[ } ]]-
- [[ 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 |); ]]-
<h3>Categories</h3>
- <dl>
- [[ for (sort keys %$VNDB::CAT) {
+ <dl class="vnrel">
+ [[ 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) { ]]-
<dt>[[: $VNDB::CAT->{$c}[0] ]]</dt><dd>[[= join(', ', @c) ]]</dd>
[[ } } ]]
+ [[ if(grep $_->[0] =~ /^[tl]/, @{$d{vn}{categories}}) { ]]-
+ <dt>Place/Time</dt><dd>[[= join ', ', map $VNDB::CAT->{substr($_->[0],0,1)}[1]{substr($_->[0],1,2)}, sort grep $_->[0] =~ /^[tl]/, @{$d{vn}{categories}} ]]</dd>
+ [[ } ]]-
</dl>
[[ } ]]-