summaryrefslogtreecommitdiff
path: root/lib/VNDB/Util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-05-01 11:07:39 +0200
committerYorhel <git@yorhel.nl>2011-05-01 11:07:39 +0200
commit2bf4818105a11abeca313b36d820c3cc397dc5b3 (patch)
tree016496ecbf101ee0b96e0ee5ee506efe0973fcc5 /lib/VNDB/Util
parent196e3bd79e08a4f84f9df90e4a88685449b9bee5 (diff)
Don't show some contribute links when you can't contribute
Diffstat (limited to 'lib/VNDB/Util')
-rw-r--r--lib/VNDB/Util/LayoutHTML.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm
index e1e21924..752f6728 100644
--- a/lib/VNDB/Util/LayoutHTML.pm
+++ b/lib/VNDB/Util/LayoutHTML.pm
@@ -99,9 +99,13 @@ sub _menu {
a href => "$uid/hist", mt '_menu_mychanges'; br;
a href => '/g/links?u='.$self->authInfo->{id}, mt '_menu_mytags'; br;
br;
- a href => '/v/new', mt '_menu_addvn'; br;
- a href => '/p/new', mt '_menu_addproducer'; br;
- a href => '/c/new', mt '_menu_addcharacter'; br;
+ if($self->authCan('edit')) {
+ a href => '/v/new', mt '_menu_addvn'; br;
+ a href => '/p/new', mt '_menu_addproducer'; br;
+ }
+ if($self->authCan('charedit')) {
+ a href => '/c/new', mt '_menu_addcharacter'; br;
+ }
br;
a href => "$uid/logout", mt '_menu_logout';
end;