summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-12-12 11:04:11 +0100
committerYorhel <git@yorhel.nl>2021-12-12 11:04:15 +0100
commita267984143315dbae21bcb90c3670be100dc3c2a (patch)
treeeefbb7ae6482dba887954d5cfefa82790632b740
parenta6383ccdbf640436114f238d10fe68315efece1a (diff)
VN::Page: Add next/prev buttons to screenshot image viewer in revisions
https://vndb.org/t950.1118
-rw-r--r--lib/VNWeb/VN/Page.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VNWeb/VN/Page.pm b/lib/VNWeb/VN/Page.pm
index d0efad1d..92bc3bac 100644
--- a/lib/VNWeb/VN/Page.pm
+++ b/lib/VNWeb/VN/Page.pm
@@ -112,11 +112,12 @@ sub rev_ {
}],
[ anime => 'Anime', fmt => sub { a_ href => "https://anidb.net/anime/$_->{aid}", "a$_->{aid}" }],
[ screenshots => 'Screenshots', fmt => sub {
+ my $rev = $_[0]{chid} == $v->{chid} ? 'new' : 'old';
txt_ '[';
a_ href => "/$_->{rid}", $_->{rid} if $_->{rid};
txt_ 'no release' if !$_->{rid};
txt_ '] ';
- a_ href => imgurl($_->{scr}{id}), 'data-iv' => "$_->{scr}{width}x$_->{scr}{height}::$_->{scr}{sexual}$_->{scr}{violence}$_->{scr}{votecount}", $_->{scr}{id};
+ a_ href => imgurl($_->{scr}{id}), 'data-iv' => "$_->{scr}{width}x$_->{scr}{height}:$rev:$_->{scr}{sexual}$_->{scr}{violence}$_->{scr}{votecount}", $_->{scr}{id};
txt_ ' [';
a_ href => "/img/$_->{scr}{id}", image_flagging_display $_->{scr};
txt_ '] ';