diff options
author | yorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b> | 2008-07-29 14:04:31 +0000 |
---|---|---|
committer | yorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b> | 2008-07-29 14:04:31 +0000 |
commit | c77ece04d45d0ae05a4de17bcfd94df90b64758e (patch) | |
tree | 6f76aa8a27de3aa5b141011ad021e6dc3eb830f5 /data | |
parent | 7aea19c2f8e71a7d630b613a57325c4dce1b1363 (diff) |
- Further polished the rlist feature
- Re-added old VN list, delete-only and with a warning
- Small code cleanup
git-svn-id: svn://vndb.org/vndb@75 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
Diffstat (limited to 'data')
-rw-r--r-- | data/tpl/main | 2 | ||||
-rw-r--r-- | data/tpl/userpage | 2 | ||||
-rw-r--r-- | data/tpl/vnlist | 38 | ||||
-rw-r--r-- | data/tpl/vnpage | 14 | ||||
-rw-r--r-- | data/tpl/vnpage_rel | 3 | ||||
-rw-r--r-- | data/tpl/vnpage_stats | 2 |
6 files changed, 19 insertions, 42 deletions
diff --git a/data/tpl/main b/data/tpl/main index d0739537..9dd70b24 100644 --- a/data/tpl/main +++ b/data/tpl/main @@ -109,6 +109,8 @@ <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} ]]/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="/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/userpage b/data/tpl/userpage index a45fc8af..aa02062e 100644 --- a/data/tpl/userpage +++ b/data/tpl/userpage @@ -6,7 +6,7 @@ <dl> <dt>Username</dt><dd>[[: $d{user}{username} ]]- (<a href="/u[[= $d{user}{id} ]]">u[[= $d{user}{id} ]]</a>)</dd> <dt>Registered</dt><dd>[[= formatdate('%Y-%m-%d', $d{user}{registered}) ]]</dd> - <dt>Votes</dt><dd>[[= $d{pl} ? $d{user}{list}.' (<a href="/u'.$d{user}{id}.'/list">view all</a>)' : '(hidden)' ]]</dd> + <dt>Votes</dt><dd>[[= $d{pl} ? $d{user}{votes}.' (<a href="/u'.$d{user}{id}.'/list">view all</a>)' : '(hidden)' ]]</dd> <dt>Changes</dt><dd>[[= $d{user}{changes}.($d{user}{changes}>0?' (<a href="/u'.$d{user}{id}.'/hist">recent changes</a>)':'') ]]</dd> </dl> diff --git a/data/tpl/vnlist b/data/tpl/vnlist index 0fb20509..d2763b39 100644 --- a/data/tpl/vnlist +++ b/data/tpl/vnlist @@ -1,12 +1,19 @@ -[[= ttabs('u', $d{user}, 'list') ]] +[[= ttabs('u', $d{user}) ]] <h2>[[: $p{PageTitle} ]]</h2> [[ - my $url = sprintf '/u%d/list', $d{user}{id}; + 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>[[ } @@ -30,46 +37,27 @@ [[ } else { ]] [[= pagebut($purl) ]]- -[[ if($d{user}{username} eq $p{AuthUsername}) { ]] <form method="post" action="[[= $furl ]]" class="tblf"> -<input type="hidden" class="hidden" name="comments" id="comments" value="" />[[ } ]] <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> - [[ if($d{user}{username} eq $p{AuthUsername}) { ]]- <td class="tc4">Personal note</td> - <td class="tc5"> </td>[[ } ]]- + <td class="tc5"> </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> - [[ if($d{user}{username} eq $p{AuthUsername}) { ]] <td class="tc4">[[: $_->{comments}||'-' ]]</td> - <td class="tc5"><input type="checkbox" name="sel" value="[[= $_->{vid} ]]" /></td>[[ } ]] + <td class="tc5"><input type="checkbox" name="sel" value="[[= $_->{vid} ]]" /></td> </tr> [[ } ]]- </table> -[[ if($d{user}{username} eq $p{AuthUsername}) { ]] -<select id="vnlistchange" name="vnlistchange" class="right"> - <option value="-3">- with selected -</option> - <option value="-1">Delete</option> - <option value="-2">Update personal note</option> - <optgroup label="Update status:"> - [[ for (0..$#$VNDB::LSTAT) { ]]- - <option value="[[= $_ ]]">[[: $VNDB::LSTAT->[$_] ]]</option> - [[ } ]] - </optgroup> -</select> -</form>[[ } ]] +<input type="submit" value="Delete selected items" class="right" /> +</form> -[[= pagebut($purl) ]] [[ } ]]- -[[ if($d{user}{username} eq $p{AuthUsername}) { ]]- -<p> - <br /><br /> - NOTE: Your personal notes are only visible to you, other people can't see them. -</p>[[ } ]] diff --git a/data/tpl/vnpage b/data/tpl/vnpage index f59c0a1c..1077c202 100644 --- a/data/tpl/vnpage +++ b/data/tpl/vnpage @@ -167,7 +167,6 @@ if($d{vn}{length} || $d{vn}{alias} || @links || $prod) { ]] [[ if($d{page} eq 'rg') { ]][[+ vnpage_rg ]][[ } ]] [[ if($p{AuthLoggedin}) { ]]- - <div class="dropdown" id="voteDD"> <ul> [[ if($d{vote}{vid}) { ]]- @@ -177,19 +176,6 @@ if($d{vn}{length} || $d{vn}{alias} || @links || $prod) { ]] [[ } ]] </ul> </div> - -[[ if(0) { ]] -<div class="dropdown" id="listDD"> - <ul> - [[ for (0..$#$VNDB::LSTAT) { ]]- - <li><a href="/v[[= $d{vn}{id} ]]/list?s=[[= $_ ]]" [[= $_ == 6 ? ' id="askcomment"' : '' ]]>[[: $VNDB::LSTAT->[$_] ]]</a></li> - [[ } if($d{list}{vid}) { ]]- - <li><a href="/v[[= $d{vn}{id} ]]/list?s=-1">Remove</a></li> - [[ } ]]- - </ul> -</div> -[[ } ]] - [[ } ]] diff --git a/data/tpl/vnpage_rel b/data/tpl/vnpage_rel index ed39477f..ff981b0e 100644 --- a/data/tpl/vnpage_rel +++ b/data/tpl/vnpage_rel @@ -35,7 +35,8 @@ </td> <td class="tc4"><a href="/r[[= $_->{id} ]]" title="[[: $_->{original} || $_->{title} ]]">[[: shorten $_->{title},60 ]]</a></td> <td class="tc5">[[ if($p{AuthId}) { ]] - [[= sprintf '<a href="/r%d/list?s=%d" class="dropdown above" rel="rlistDD%1$d">%s</a>', $_->{id}, $_->{rlist} ? (-1, 'x') : (1, '-') ]] + [[= sprintf '<a href="/r%d" class="dropdown above" rel="rlistDD%1$d">%s</a>', $_->{id}, $_->{rlist} ? + (substr($$VNDB::RSTAT[$_->{rlist}{rstat}],0,1).'/'.substr($$VNDB::VSTAT[$_->{rlist}{vstat}],0,1)) : '---' ]] [[ } else { ]] [[ } ]]</td> <td class="tc6">[[ if($_->{website}) { ]]<a href="[[: $_->{website} ]]" class="icons ext" title="WWW"> </a>[[ } ]]</td> </tr> diff --git a/data/tpl/vnpage_stats b/data/tpl/vnpage_stats index b4a3b018..cb24bd1c 100644 --- a/data/tpl/vnpage_stats +++ b/data/tpl/vnpage_stats @@ -8,7 +8,7 @@ $sum += ($_+1) * $d{votes}{graph}[$_]; } ]] -[[ if(!$d{user} || ($d{pv} && $d{user}{votes})) { ]]- +[[ if(!$d{user} || ($d{pl} && $d{user}{votes})) { ]]- <li><h3>Vote graph <p class="actions">[[= $total ]]- vote[[= $total==1?'':'s' ]]- total [[= $total && $d{user} ? sprintf(', average: %.1f.', $sum/$total) : '' ]]</p></h3> <table id="tvg"> |