summaryrefslogtreecommitdiff
path: root/data/tpl/vnlist
blob: d2763b39c2da89e898df84d9e749f5032a0b3f35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
[[= ttabs('u', $d{user}) ]]
<h2>[[: $p{PageTitle} ]]</h2>
[[
  my $url = sprintf '/u%d/vlist', $d{user}{id}; 
  my $surl = sprintf '%s?s=%s;o=%s', $url, $d{order}[0], $d{order}[1];
  my $purl = $surl . ';t='.$d{status};
  my $sourl = $url . '?t='.$d{status};
  my $furl = $purl . ';p='.$d{page};
]]

<span class="warning">
 This visual novel list is read-only, only visible to you, and may be
 deleted in future versions of the site. You are highly encouraged to
 move everything in this list to the new <a href="/u[[= $d{user}{id} ]]/list">visual novel list</a>.
</span>

<p class="chr">
 status: -[[ for (-1..$#$VNDB::LSTAT) { if($_ >= 0) { ]]- | -[[ }
  if($d{status} == $_) { ]]<b>[[= $_ eq -1 ? 'all' : lc $VNDB::LSTAT->[$_] ]]</b>[[ }
  else { ]]<a href="[[= $surl ]]&amp;t=[[= $_ ]]">[[= $_ eq -1 ? 'all' : lc $VNDB::LSTAT->[$_] ]]</a>[[ } } ]]
 <br /><br />
</p>


[[ if($#{$d{list}} < 0) { ]]-
<p>
[[ if($d{status} >= 0) { ]]
 No results found...
[[ } elsif($d{user}{username} eq $p{AuthUsername}) { ]]
 Your visual novel list is empty. You can keep track of all the visual novels
 you'd like to play, you're currently playing, or you've finished. Just go to
 a visual novel page and add it to your VN list!
[[ } else { ]]
 [[: $d{user}{username} ]]'s visual novel list is empty...
[[ } ]]
</p>

[[ } else { ]]
[[= pagebut($purl) ]]-
<form method="post" action="[[= $furl ]]" class="tblf">
<table id="tvl">
 <thead><tr>
  <td class="tc1">Title [[= sortbut($sourl, 'title') ]]</td>
  <td class="tc2">Status</td>
  <td class="tc3">Added [[= sortbut($sourl, 'date') ]]</td>
  <td class="tc4">Personal note</td>
  <td class="tc5">&nbsp;</td>
 </tr></thead>
 [[ for (@{$d{list}}) { ]]-
 <tr>
  <td class="tc1"><a href="/v[[= $_->{vid} ]]" title="[[: $_->{title} ]]">[[: length($_->{title})>40 ? substr($_->{title},0, 37).'...' : $_->{title} ]]</a></td>
  <td class="tc2">[[= $VNDB::LSTAT->[$_->{status}] ]]</td>
  <td class="tc3">[[= formatdate('%Y-%m-%d', $_->{date}, 'dh') ]]</td>
  <td class="tc4">[[: $_->{comments}||'-' ]]</td>
  <td class="tc5"><input type="checkbox" name="sel" value="[[= $_->{vid} ]]" /></td>
 </tr>
 [[ } ]]-
</table>
<input type="submit" value="Delete selected items" class="right" />
</form>
-[[= pagebut($purl) ]]
[[ } ]]-