summaryrefslogtreecommitdiff
path: root/data/tpl
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-08-01 10:35:11 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-08-01 10:35:11 +0000
commitb274ff8a37e90a90c7613b47a84bad1cdc6ddf5f (patch)
tree13798abeee6d3893af98093312ae8d694a404619 /data/tpl
parent68d66b006656ed90e08187a2d5ceb95b08e4f279 (diff)
Added wishlist feature and re-added "my profile" link to user menu
git-svn-id: svn://vndb.org/vndb@77 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
Diffstat (limited to 'data/tpl')
-rw-r--r--data/tpl/defs.pl6
-rw-r--r--data/tpl/main6
-rw-r--r--data/tpl/rlist1
-rw-r--r--data/tpl/useredit3
-rw-r--r--data/tpl/vnpage15
5 files changed, 25 insertions, 6 deletions
diff --git a/data/tpl/defs.pl b/data/tpl/defs.pl
index 27d1443d..a7355840 100644
--- a/data/tpl/defs.pl
+++ b/data/tpl/defs.pl
@@ -216,6 +216,7 @@ sub ttabs { # [vrpu], obj, sel
$t eq 'u' ? (
$o->{flags} & $VNDB::UFLAGS->{list} ? ( $s eq 'list' ? 'list' : '<a href="/%s/list">list</a>', ) : (),
+ $o->{flags} & $VNDB::UFLAGS->{list} ? ( $s eq 'wish' ? 'wishlist' : '<a href="/%s/wish">wishlist</a>', ) : (),
) : (),
$t ne 'r' ? (
@@ -296,8 +297,9 @@ my %pagetitles = (
$p{tedit}{t} ? 'Reply to thread' : 'Start a new thread' },
userpage => sub {
return 'User: '.$p{userpage}{user}{username} },
- vnlist => sub {
- return $p{vnlist}{user}{username} eq $p{AuthUsername} ? 'My visual novel list' : ($p{vnlist}{user}{username}.'\'s visual novel list'); },
+ vnlist => 'My visual novel list (old)',
+ wlist => sub {
+ return $p{wlist}{user}{username} eq $p{AuthUsername} ? 'My wishlist' : ($p{wlist}{user}{username}.'\'s wishlist'); },
rlist => sub {
return $p{rlist}{user}{username} eq $p{AuthUsername} ? 'My visual novel list' : ($p{rlist}{user}{username}.'\'s visual novel list'); },
useredit => sub {
diff --git a/data/tpl/main b/data/tpl/main
index 9dd70b24..762fdb58 100644
--- a/data/tpl/main
+++ b/data/tpl/main
@@ -18,7 +18,7 @@
<link rel="icon" href="/favicon.gif" type="image/gif" />
<meta name="robots" content="noindex, nofollow" />
[[ } elsif(
- grep($p{$_}, qw| userlist userpage userlogin userreg userpass vnlist rlist hist |)
+ grep($p{$_}, qw| userlist userpage userlogin userreg userpass vnlist rlist wlist hist |)
|| ($p{ttag} && $p{ttag}{iid})
|| ($p{vnpage} && $p{vnpage}{page} eq 'stats')
|| grep { $p{$_} && $p{$_}{change} } qw|vnpage ppage rpage|
@@ -66,6 +66,7 @@
[[ if($p{ppage}) { %d = %{$p{ppage}}; ]] [[+ ppage ]][[ } ]]
[[ if($p{vnlist}) { %d = %{$p{vnlist}}; ]] [[+ vnlist ]][[ }# ]]
[[ if($p{rlist}) { %d = %{$p{rlist}}; ]] [[+ rlist ]][[ }# ]]
+[[ if($p{wlist}) { %d = %{$p{wlist}}; ]] [[+ wlist ]][[ }# ]]
[[ if($p{hist}) { %d = %{$p{hist}}; ]] [[+ hist ]][[ }# ]]
[[ if($p{rpage}) { %d = %{$p{rpage}}; ]] [[+ rpage ]][[ } ]]
[[ if($p{docs}) { %d = %{$p{docs}}; ]] [[+ docs ]][[ } ]]
@@ -107,10 +108,11 @@
<h2>User menu</h2>
<ul>
<li><a href="/u[[= $p{AuthId} ]]">[[: $p{AuthUsername} ]]</a> ([[: $p{AuthRankname} ]])</li>
- <!--<li><a href="/u[[= $p{AuthId} ]]/edit">My profile</a></li>-->
+ <li><a href="/u[[= $p{AuthId} ]]/edit">My profile</a></li>
<li><a href="/u[[= $p{AuthId} ]]/list">My visual novel list</a></li>
[[ if($p{AuthOldList}) { ]]-
<li><a href="/u[[= $p{AuthId} ]]/vlist">My visual novel list (old)</a></li>[[ } ]]-
+ <li><a href="/u[[= $p{AuthId} ]]/wish">My wishlist</a></li>
<li><a href="/t/u[[= $p{AuthId} ]]">My messages</a></li>
<li><a href="/u[[= $p{AuthId} ]]/hist">My recent changes</a></li>
[[ if($p{Authedit}) { ]]-
diff --git a/data/tpl/rlist b/data/tpl/rlist
index f586a92b..e95286f3 100644
--- a/data/tpl/rlist
+++ b/data/tpl/rlist
@@ -60,7 +60,6 @@
<select id="vnlistchange" name="vnlistchange" class="right">
<option value="n">- with selected -</option>
<option value="d">Delete</option>
- <!--<option value="-2">Update personal note</option>-->
<optgroup label="Update release status:">
[[ for (0..$#$VNDB::RSTAT) { ]]-
<option value="r[[= $_ ]]">[[: $VNDB::RSTAT->[$_] ]]</option>
diff --git a/data/tpl/useredit b/data/tpl/useredit
index f9db7c61..e6243fb5 100644
--- a/data/tpl/useredit
+++ b/data/tpl/useredit
@@ -20,7 +20,8 @@
{ type => 'pass', name => 'Confirm', short => 'pass2' },
{ type => 'sub', title => 'Miscellaneous options', short => 'misc' },
- { type => 'check', short => 'plist', name => sprintf 'Allow other people to see my visual novel list (<a href="/u%d/list">/u%1$d/list</a>)', $d{user} },
+ { type => 'check', short => 'plist', name => sprintf
+ 'Allow other people to see my visual novel list (<a href="/u%d/list">/u%1$d/list</a>) and wishlist (<a href="/u%1$d/wish">/u%1$d/wish</a>)', $d{user} },
{ type => 'check', short => 'pign_nsfw', name => 'Disable warnings for images that are not safe for work.' },
$d{adm} ? (
diff --git a/data/tpl/vnpage b/data/tpl/vnpage
index 1077c202..39374ed8 100644
--- a/data/tpl/vnpage
+++ b/data/tpl/vnpage
@@ -13,7 +13,9 @@
-[[ if($p{AuthLoggedin}) { ]]
<p class="mod">&lt;
+ user options -
<a href="/u[[= $p{AuthId} ]]/list" rel="voteDD" class="dropdown">[[= $d{vote}{vid} ? 'your vote: '.$d{vote}{vote} : 'vote' ]]</a>
+ - <a href="/u[[= $p{AuthId} ]]/wish" rel="wishDD" class="dropdown">[[= $d{wlist}{vid} ? 'wishlist: '.lc($$VNDB::WSTAT[$d{wlist}{wstat}]) : 'wishlist' ]]</a>
&gt;</p>
[[ } ]]-
@@ -176,6 +178,19 @@ if($d{vn}{length} || $d{vn}{alias} || @links || $prod) { ]]
[[ } ]]
</ul>
</div>
+
+<div class="dropdown" id="wishDD">
+ <ul>
+ [[ for (0..$#$VNDB::WSTAT) {
+ if($d{wlist}{vid} && $d{wlist}{wstat} == $_) { ]]-
+ <li><b>[[: $$VNDB::WSTAT[$_] ]]</b></li>
+ [[ } else { ]]-
+ <li><a href="/v[[= $d{vn}{id} ]]/wish?w=[[= $_ ]]">[[: $$VNDB::WSTAT[$_] ]]</a></li>
+ [[ } } if($d{wlist}{vid}) { ]]-
+ <li><a href="/v[[= $d{vn}{id} ]]/wish?w=-1">remove</a></li>
+ [[ } ]]
+ </ul>
+</div>
[[ } ]]