summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-01-03 21:37:30 +0100
committerYorhel <git@yorhel.nl>2011-01-03 21:39:22 +0100
commita48a7f5b0d4e65a70337d40f7df287810f27d547 (patch)
tree7c922bccf1aa2c4e36a6fc5e8f0d466c2ce61605 /lib/VNDB/Handler
parentdf6dc445df2f73381829b8af8db606cea67f589d (diff)
Added tag overrule indicators to tag link browser and VN tag editor
This is the second step in adding support for overruling tag votes by moderators. This required a different approach to calculating the score in dbTagStats(). For some reason this approach turns out to be slightly faster as well...
Diffstat (limited to 'lib/VNDB/Handler')
-rw-r--r--lib/VNDB/Handler/Tags.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/VNDB/Handler/Tags.pm b/lib/VNDB/Handler/Tags.pm
index ad736027..7d9b10fa 100644
--- a/lib/VNDB/Handler/Tags.pm
+++ b/lib/VNDB/Handler/Tags.pm
@@ -450,7 +450,7 @@ sub taglinks {
a href => $url->(u=>$l->{uid}), class => 'setfil', '> ' if !$f->{u};
a href => "/u$l->{uid}", $l->{username};
end;
- td class => 'tc3';
+ td class => 'tc3'.($l->{ignore}?' ignored':'');
tagscore $l->{vote};
end;
td class => 'tc4';
@@ -544,7 +544,8 @@ sub vntagmod {
td class => 'tc_myspoil', defined $m->{spoiler} ? $m->{spoiler} : -1;
td class => 'tc_allvote';
tagscore !$m->{vote} ? $t->{rating} : $t->{cnt} == 1 ? 0 : ($t->{rating}*$t->{cnt} - $m->{vote}) / ($t->{cnt}-1);
- i ' ('.($t->{cnt} - ($m->{vote} ? 1 : 0)).')';
+ i $t->{overruled} ? (class => 'grayedout') : (), ' ('.($t->{cnt} - ($m->{vote} ? 1 : 0)).')';
+ b class => 'standout', style => 'font-weight: bold', ' !' if $t->{overruled};
end;
td class => 'tc_allspoil', sprintf '%.2f', $t->{spoiler};
td class => 'tc_allwho';