summaryrefslogtreecommitdiff
path: root/lib/VNWeb
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-08-03 20:07:33 +0200
committerYorhel <git@yorhel.nl>2021-08-03 20:07:35 +0200
commit2f2a97fbe6705f02c1fe0d1ecc245f78637e5d7b (patch)
treebc66ad6d76a76dc5a3bace55331656feb7bbaa8d /lib/VNWeb
parentef986fa381776222a967fd6dcdaf5ab02973df49 (diff)
VN Length list: add release id column
A bit useless as just an ID, but meh, may improve later on.
Diffstat (limited to 'lib/VNWeb')
-rw-r--r--lib/VNWeb/VN/Length.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/VNWeb/VN/Length.pm b/lib/VNWeb/VN/Length.pm
index ea0eaee9..8ce1e927 100644
--- a/lib/VNWeb/VN/Length.pm
+++ b/lib/VNWeb/VN/Length.pm
@@ -32,7 +32,8 @@ sub listing_ {
td_ class => 'tc2', sub { txt_ 'Title'; sortable_ 'title', $opt, \&url } if !$vn;
td_ class => 'tc3', colspan => 2, sub { txt_ 'Time'; sortable_ 'length', $opt, \&url };
td_ class => 'tc4', sub { txt_ 'Speed'; sortable_ 'speed', $opt, \&url };
- td_ class => 'tc5', 'Notes';
+ td_ class => 'tc5', 'Rel';
+ td_ class => 'tc6', 'Notes';
} };
tr_ sub {
td_ class => 'tc1', fmtdate $_->{date};
@@ -43,7 +44,8 @@ sub listing_ {
td_ class => 'tc3a', $_->{length} >= 60 ? floor($_->{length}/60).'h' : '';
td_ class => 'tc3b', $_->{length} % 60 > 0 ? ($_->{length}%60).'m' : '';
td_ class => 'tc4', ['Slow','Normal','Fast']->[$_->{speed}];
- td_ class => 'tc5', sub { lit_ bb_format $_->{notes}, inline => 1 };
+ td_ class => 'tc5', sub { a_ href => "/$_->{rid}", $_->{rid} };
+ td_ class => 'tc6', sub { lit_ bb_format $_->{notes}, inline => 1 };
} for @$list;
};
};
@@ -67,7 +69,7 @@ TUWF::get qr{/(?<thing>$RE{vid}|$RE{uid})/lengthvotes}, sub {
my $count = tuwf->dbVali('SELECT COUNT(*) FROM vn_length_votes l WHERE', $where);
my $lst = tuwf->dbPagei({results => $opt->{s}->results, page => $opt->{p}},
- 'SELECT l.uid, l.vid, l.length, l.speed, l.notes, ', sql_totime('l.date'), 'AS date, ',
+ 'SELECT l.uid, l.vid, l.length, l.speed, l.notes, l.rid, ', sql_totime('l.date'), 'AS date, ',
$vn ? sql_user() : 'v.title, v.original', '
FROM vn_length_votes l',
$vn ? 'LEFT JOIN users u ON u.id = l.uid'