diff options
-rw-r--r-- | lib/VNWeb/User/Lists.pm | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/lib/VNWeb/User/Lists.pm b/lib/VNWeb/User/Lists.pm index 2854987c..6b6fbedd 100644 --- a/lib/VNWeb/User/Lists.pm +++ b/lib/VNWeb/User/Lists.pm @@ -372,27 +372,13 @@ sub vn_ { }; }; + td_ class => 'tc_voted', $v->{vote_date} ? fmtdate $v->{vote_date}, 'compact' : '-' if in voted => $opt->{c}; + td_ mkclass(tc_vote => 1, compact => $own, stealth => $own), sub { txt_ fmtvote $v->{vote} if !$own; elm_ 'UList.VoteEdit' => $VNVOTE, { uid => $uid, vid => $v->{id}, vote => fmtvote($v->{vote}) }, fmtvote $v->{vote} if $own; } if in vote => $opt->{c}; - td_ class => 'tc_voted', $v->{vote_date} ? fmtdate $v->{vote_date}, 'compact' : '-' if in voted => $opt->{c}; - td_ class => 'tc_added', fmtdate $v->{added}, 'compact' if in added => $opt->{c}; - td_ class => 'tc_modified', fmtdate $v->{lastmod}, 'compact' if in modified => $opt->{c}; - - td_ class => 'tc_started', sub { - txt_ $v->{started}||'' if !$own; - elm_ 'UList.DateEdit' => $VNDATE, { uid => $uid, vid => $v->{id}, date => $v->{started}||'', start => 1 }, $v->{started}||'' if $own; - } if in started => $opt->{c}; - - td_ class => 'tc_finished', sub { - txt_ $v->{finished}||'' if !$own; - elm_ 'UList.DateEdit' => $VNDATE, { uid => $uid, vid => $v->{id}, date => $v->{finished}||'', start => 0 }, $v->{finished}||'' if $own; - } if in finished => $opt->{c}; - - td_ class => 'tc_rel', sub { rdate_ $v->{c_released} } if in rel => $opt->{c}; - td_ class => 'tc_rating', sub { txt_ sprintf '%.2f', ($v->{c_rating}||0)/10; b_ class => 'grayedout', sprintf ' (%d)', $v->{c_votecount}; @@ -412,6 +398,21 @@ sub vn_ { a_ href => "/v$v->{id}", title => $v->{original}||$v->{title}, shorten $v->{title}, 70; b_ class => 'grayedout', id => 'ulist_notes_'.$v->{id}, $v->{notes} if $v->{notes} || $own; }; + + td_ class => 'tc_added', fmtdate $v->{added}, 'compact' if in added => $opt->{c}; + td_ class => 'tc_modified', fmtdate $v->{lastmod}, 'compact' if in modified => $opt->{c}; + + td_ class => 'tc_started', sub { + txt_ $v->{started}||'' if !$own; + elm_ 'UList.DateEdit' => $VNDATE, { uid => $uid, vid => $v->{id}, date => $v->{started}||'', start => 1 }, $v->{started}||'' if $own; + } if in started => $opt->{c}; + + td_ class => 'tc_finished', sub { + txt_ $v->{finished}||'' if !$own; + elm_ 'UList.DateEdit' => $VNDATE, { uid => $uid, vid => $v->{id}, date => $v->{finished}||'', start => 0 }, $v->{finished}||'' if $own; + } if in finished => $opt->{c}; + + td_ class => 'tc_rel', sub { rdate_ $v->{c_released} } if in rel => $opt->{c}; }; tr_ mkclass(hidden => 1, 'collapsed_vid'.$v->{id} => 1, odd => $n % 2 == 0), sub { @@ -483,15 +484,15 @@ sub listing_ { # TODO: Thumbnail view? paginate_ $url, $opt->{p}, [ $count, 50 ], 't', sub { elm_ ColSelect => undef, [ $url->(), [ - [ vote => 'Vote' ], [ voted => 'Vote date' ], + [ vote => 'Vote' ], + [ rating => 'Rating' ], + [ label => 'Labels' ], [ added => 'Added' ], [ modified => 'Modified' ], [ started => 'Start date' ], [ finished => 'Finish date' ], [ rel => 'Release date' ], - [ rating => 'Rating' ], - [ label => 'Labels' ], ] ]; }; div_ class => 'mainbox browse ulist', sub { @@ -501,16 +502,16 @@ sub listing_ { input_ type => 'checkbox', class => 'checkall', name => 'collapse_vid', id => 'collapse_vid'; label_ for => 'collapse_vid', sub { txt_ 'Opt' }; }; - td_ class => 'tc_vote', sub { txt_ 'Vote'; sortable_ 'vote', $opt, $url } if in vote => $opt->{c}; td_ class => 'tc_voted', sub { txt_ 'Vote date'; sortable_ 'voted', $opt, $url } if in voted => $opt->{c}; + td_ class => 'tc_vote', sub { txt_ 'Vote'; sortable_ 'vote', $opt, $url } if in vote => $opt->{c}; + td_ class => 'tc_rating', sub { txt_ 'Rating'; sortable_ 'rating', $opt, $url } if in rating => $opt->{c}; + td_ class => 'tc_labels', sub { txt_ 'Labels'; sortable_ 'label', $opt, $url } if in label => $opt->{c}; + td_ class => 'tc_title', sub { txt_ 'Title'; sortable_ 'title', $opt, $url; debug_ $lst }; td_ class => 'tc_added', sub { txt_ 'Added'; sortable_ 'added', $opt, $url } if in added => $opt->{c}; td_ class => 'tc_modified', sub { txt_ 'Modified'; sortable_ 'modified', $opt, $url } if in modified => $opt->{c}; td_ class => 'tc_started', sub { txt_ 'Start date'; sortable_ 'started', $opt, $url } if in started => $opt->{c}; td_ class => 'tc_finished', sub { txt_ 'Finish date'; sortable_ 'finished', $opt, $url } if in finished => $opt->{c}; td_ class => 'tc_rel', sub { txt_ 'Release date';sortable_ 'rel', $opt, $url } if in rel => $opt->{c}; - td_ class => 'tc_rating', sub { txt_ 'Rating'; sortable_ 'rating', $opt, $url } if in rating => $opt->{c}; - td_ class => 'tc_labels', sub { txt_ 'Labels'; sortable_ 'label', $opt, $url } if in label => $opt->{c}; - td_ class => 'tc_title', sub { txt_ 'Title'; sortable_ 'title', $opt, $url; debug_ $lst }; }}; vn_ $uid, $own, $opt, $_, $lst->[$_], $labels for (0..$#$lst); }; |