diff options
Diffstat (limited to 'data/tpl/hist')
-rw-r--r-- | data/tpl/hist | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/data/tpl/hist b/data/tpl/hist new file mode 100644 index 00000000..e02a149f --- /dev/null +++ b/data/tpl/hist @@ -0,0 +1,103 @@ +[[= $d{type} && $d{type} ne 'u' ? ttabs($d{type}, $d{obj}, 'hist') : '' ]]- +<h2 class="rss">[[: $p{PageTitle} ]]</h2> +[[ if($d{type} eq 'u' && $#{$d{hist}} < 0) { ]] +<p> + You haven't made any changes yet. +</p> +[[ } ]] +<br /><br /> + +[[ + my $url = !$d{type} ? '/hist' : '/'.$d{type}.$d{id}.'/hist'; + my $furl = $url.'?e='.$d{sele}.';t='; + my $eurl = $url.'?t='.$d{selt}.';e='; + my $purl = !$d{type}?$eurl.$d{sele}:$d{type} eq 'v' && $d{seli} ? $url.'?i=1' : $url; + my $rurl = $url.'/rss'.(!$d{type}?'?t='.$d{selt}.';e='.$d{sele}:$d{type} eq 'v' && $d{seli} ? '?i=1' : ''); + local $_ = $d{selt}; + my @fil = ( + /a/ ? 'all items' : '<a href="%sa">all items</a>', + /v/ ? 'visual novels' : '<a href="%sv">visual novels</a>', + /r/ ? 'releases' : '<a href="%sr">releases</a>', + /p/ ? 'producers' : '<a href="%sp">producers</a>', + ); + local $_ = $d{sele}; + my @edi = ( + /0/ ? 'all changes' : '<a href="%s0">all changes</a>', + /2/ ? 'edits only' : '<a href="%s2">edits only</a>', + /1/ ? 'newly created pages only' : '<a href="%s1">newly created pages only</a>', + ); + local $_ = $d{seli}; + my @inc = ( + /0/ ? 'exclude' : '<a href="'.$url.'">exclude</a>', + /1/ ? 'include' : '<a href="'.$url.'?i=1">include</a>', + ); +]] + +[[ if(!$d{type}) { ]]- +<p class="browse"> + [[= join(' | ', map { sprintf $_, $furl } @fil) ]]<br /> + [[= join(' | ', map { sprintf $_, $eurl } @edi) ]]<br /><br /><br /> +</p> +[[ } if($d{type} eq 'v') { ]]- +<p class="browse"> + ([[= join(' | ', @inc) ]]) edits of releases. +</p> +[[ } ]] + +[[ if($d{act} eq 'r') { ]] +<span class="msg"> + Performed the mass-revert, please see the following list for details. +</span> +[[ } elsif($d{act} eq 'd') { ]] +<span class="msg"> + The following edits have been completely deleted. +</span> +[[ } ]]- + + +<a class="rss" href="[[= $rurl ]]">RSS</a> +[[= pagebut($purl) ]] +[[ if(0 and $p{Authmod} || $p{Authdel}) { ]] +<form method="post" action="[[= $purl ]]" class="tblf"> +[[ } ]] +<table id="thi"> + <thead><tr> + <td class="tc1">Rev.</td> + <td class="tc2">Date</td> + [[ if($d{type} ne 'u' || $d{act}) { ]]- + <td class="tc3">User</td>[[ } ]]- + [[ if(!$d{type} || $d{type} eq 'u' || $d{act} || ($d{type} eq 'v' && $d{seli})) { ]]- + <td class="tc4">Page</td>[[ } ]]- + [[ if($d{type} && !$d{act}) { ]]- + <td class="tc5">Summary</td>[[ } ]]- + [[ if($d{act} eq 'r') { ]]- + <td class="tc5">Action</td>[[ } ]]- + [[ if(0 and $p{Authmod}) { ]]- + <td class="tc6"><input type="checkbox" id="checkall" name="sel" value="all" /></td>[[ } ]]- + </tr></thead> + + [[ for (@{$d{hist}}) { my $t = (qw|v r p|)[$_->{type}]; ]]- + <tr> + <td class="tc1"><a href="/[[= $t.$_->{iid} ]]?rev=[[= $_->{id} ]]">[[= $_->{id} ]]</a></td> + <td class="tc2">[[= formatdate('%Y-%m-%d %R', $_->{added}, 'dh') ]]</td> + [[ if($d{type} ne 'u' || $d{act}) { ]]- + <td class="tc3"><a href="/u[[= $_->{requester} ]]">[[: $_->{username} ]]</a></td>[[ } ]]- + [[ if(!$d{type} || $d{type} eq 'u' || $d{act}) { ]]- + <td class="tc4">[[= $_->{prev} ? $t.$_->{iid} : '<b>'.$t.$_->{iid}.'</b>' ]]:<a href="/[[= $t.$_->{iid} ]]?rev=[[= $_->{id} ]]" title="[[: $_->{ititle} ]]">[[: length($_->{ititle}) > 30 ? substr($_->{ititle},0,27).'...' : $_->{ititle} ]]</a></td>[[ } ]]- + [[ if($d{type} eq 'v' && $d{seli}) { ]]- + <td class="tc4"><a href="/[[= $t.$_->{iid} ]]" title="[[: $_->{ititle} ]]">[[= $_->{prev} ? $t.$_->{iid} : '<b>'.$t.$_->{iid}.'</b>' ]]</a></td>[[ } ]]- + [[ if($d{type} && !$d{act}) { ]]- + <td class="tc5">[[= summary($_->{comments}, $d{type} eq 'u' ? 40 : 60)||'[empty]' ]]</td>[[ } ]]- + [[ if($d{act} eq 'r') { ]]- + <td class="tc5">[[: $_->{_status} ]]</td>[[ } ]]- + [[ if(0 and $p{Authmod} && !$d{act}) { ]]- + <td class="tc6"><input type="checkbox" name="sel" value="[[= $_->{id} ]]" /></td>[[ } ]]- + </tr> + [[ } ]] + +</table> +[[ if(0 and $p{Authmod}) { ]]<input type="submit" class="right" name="post" value="Mass revert" />[[ } ]] +[[ if(0 and $p{Authdel}) { ]]<input type="submit" class="right" name="post" value="Mass delete" id="massdel" />[[ } ]] +[[ if(0 and $p{Authmod} || $p{Authdel}) { ]]</form>[[ } ]] +[[= pagebut($purl) ]] + |