diff options
Diffstat (limited to 'lib/VNDB/Util/CommonHTML.pm')
-rw-r--r-- | lib/VNDB/Util/CommonHTML.pm | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/VNDB/Util/CommonHTML.pm b/lib/VNDB/Util/CommonHTML.pm index 41370b4b..5f2fb330 100644 --- a/lib/VNDB/Util/CommonHTML.pm +++ b/lib/VNDB/Util/CommonHTML.pm @@ -72,8 +72,8 @@ sub htmlMainTabs { } if( $type eq 'u' && ($self->authInfo->{id} && $obj->{id} == $self->authInfo->{id} || $self->authCan('usermod')) - || $type =~ /[vrp]/ && $self->authCan('edit') && (!$obj->{locked} || $self->authCan('lock')) && (!$obj->{hidden} || $self->authCan('del')) - || $type eq 'c' && $self->authCan('charedit') && (!$obj->{locked} || $self->authCan('lock')) && (!$obj->{hidden} || $self->authCan('del')) + || $type =~ /[vrp]/ && $self->authCan('edit') && ((!$obj->{locked} && !$obj->{hidden}) || $self->authCan('dbmod')) + || $type eq 'c' && $self->authCan('charedit') && ((!$obj->{locked} && !$obj->{hidden}) || $self->authCan('dbmod')) || $type =~ /[gi]/ && $self->authCan('tagmod') ) { li $sel eq 'edit' ? (class => 'tabselected') : (); @@ -143,7 +143,7 @@ sub htmlHiddenMessage { end; end; end 'div'; - return $self->htmlFooter() || 1 if !$self->authCan('del'); + return $self->htmlFooter() || 1 if !$self->authCan('dbmod'); return 0; } @@ -163,6 +163,15 @@ sub htmlRevision { div class => 'mainbox revision'; h1 mt '_revision_title', $new->{rev}; + # character information may be rather spoilerous + if($type eq 'c') { + div class => 'warning'; + h2 mt '_revision_spoil_title'; + lit mt '_revision_spoil_msg', "/c$new->{id}"; + end; + br;br; + } + # previous/next revision links a class => 'prev', href => sprintf('/%s%d.%d', $type, $new->{id}, $new->{rev}-1), '<- '.mt '_revision_previous' if $new->{rev} > 1; @@ -174,7 +183,7 @@ sub htmlRevision { # no previous revision, just show info about the revision itself if(!$old) { - div; + div class => 'rev'; revheader($self, $type, $new); br; b mt '_revision_new_summary'; |