summaryrefslogtreecommitdiff
path: root/lib/VNDB/Util/CommonHTML.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2008-12-11 17:19:45 +0100
committerYorhel <git@yorhel.nl>2008-12-11 17:19:45 +0100
commit4aec68f3b46540a1ce329260c42f969139756063 (patch)
tree3715d9ebd01c569416807dc2edaa9e66151cc55a /lib/VNDB/Util/CommonHTML.pm
parentb03787002a5065a33d51bfac3d5d87787d23fd79 (diff)
Recent changes on userpages
Diffstat (limited to 'lib/VNDB/Util/CommonHTML.pm')
-rw-r--r--lib/VNDB/Util/CommonHTML.pm48
1 files changed, 47 insertions, 1 deletions
diff --git a/lib/VNDB/Util/CommonHTML.pm b/lib/VNDB/Util/CommonHTML.pm
index df114cd7..77af4dca 100644
--- a/lib/VNDB/Util/CommonHTML.pm
+++ b/lib/VNDB/Util/CommonHTML.pm
@@ -11,7 +11,7 @@ use Encode 'encode_utf8', 'decode_utf8';
our @EXPORT = qw|
htmlMainTabs htmlDenied htmlHiddenMessage htmlBrowse htmlBrowseNavigate
- htmlRevision htmlEditMessage htmlItemMessage htmlVoteStats
+ htmlRevision htmlEditMessage htmlItemMessage htmlVoteStats htmlHistory
|;
@@ -442,4 +442,50 @@ sub htmlVoteStats {
}
+sub htmlHistory {
+ my($self, $list, $f, $np, $url) = @_;
+ $self->htmlBrowse(
+ items => $list,
+ options => $f,
+ nextpage => $np,
+ pageurl => $url,
+ class => 'history',
+ header => [
+ sub { td colspan => 2, class => 'tc1', 'Rev.' },
+ [ 'Date' ],
+ [ 'User' ],
+ [ 'Page' ],
+ ],
+ row => sub {
+ my($s, $n, $i) = @_;
+ my $tc = [qw|v r p|]->[$i->{type}];
+ my $revurl = "/$tc$i->{iid}.$i->{rev}";
+
+ Tr $n % 2 ? ( class => 'odd' ) : ();
+ td class => 'tc1_1';
+ a href => $revurl, "$tc$i->{iid}";
+ end;
+ td class => 'tc1_2';
+ a href => $revurl, ".$i->{rev}";
+ end;
+ td date $i->{added};
+ td;
+ lit userstr($i);
+ end;
+ td;
+ a href => $revurl, title => $i->{ioriginal}, shorten $i->{ititle}, 80;
+ end;
+ end;
+ if($i->{comments}) {
+ Tr $n % 2 ? ( class => 'odd' ) : ();
+ td colspan => 5, class => 'editsum';
+ lit bb2html $i->{comments}, 150;
+ end;
+ end;
+ }
+ },
+ );
+}
+
+
1;