Bugzilla – Attachment 5311 Details for
Bug 5916
Don't show the link to edit authorities to people who don't have permissions to edit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch (updated)
0001-Bug-5916-MT-2685-don-t-show-authority-edition-menu.patch (text/plain), 2.48 KB, created by
Paul Poulain
on 2011-09-05 16:13:12 UTC
(
hide
)
Description:
proposed patch (updated)
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2011-09-05 16:13:12 UTC
Size:
2.48 KB
patch
obsolete
>From 28ab13b60d983589fbd9868589512b171fe12486 Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Mon, 5 Sep 2011 18:10:53 +0200 >Subject: [PATCH] Bug 5916 : (MT #2685) don't show authority edition menu > >this patch add a check of rights to show the authority edition menu, if the user have no rights of authority edition, we hide the menu. > >(original patch from Nahuel Angelinetti, rewritten for T::T) >--- > .../prog/en/includes/authorities-toolbar.inc | 43 ++++++++++---------- > 1 files changed, 22 insertions(+), 21 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc >index 214bc20..410e181 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc >@@ -14,28 +14,29 @@ > > function yuiToolbar() { > >- var newmenu = [ >- [% FOREACH authtypesloo IN authtypesloop %]{ text: "[% authtypesloo.authtypetext %]", url: "/cgi-bin/koha/authorities/authorities.pl?authtypecode=[% authtypesloo.value %]"}, >-[% END %] >- ] >+ [% IF ( CAN_user_editauthorities ) %] >+ var newmenu = [ >+ [% FOREACH authtypesloo IN authtypesloop %]{ text: "[% authtypesloo.authtypetext %]", url: "/cgi-bin/koha/authorities/authorities.pl?authtypecode=[% authtypesloo.value %]"}, >+ [% END %] >+ ] >+ new YAHOO.widget.Button({ >+ type: "menu", >+ label: _("New Authority"), >+ name: "newmenubutton", >+ menu: newmenu, >+ container: "newmenuc" >+ }); >+ >+ var editButton = new YAHOO.widget.Button("editAuth"); > >- new YAHOO.widget.Button({ >- type: "menu", >- label: _("New Authority"), >- name: "newmenubutton", >- menu: newmenu, >- container: "newmenuc" >- }); >- >- var editButton = new YAHOO.widget.Button("editAuth"); >- >- var delAuthButton = new YAHOO.widget.Button({ >- id: "delAuth", >- type: "button", >- label: _("Delete"), >- container: "delAuthc", >- onclick: {fn: confirm_deletion } >- }); >+ var delAuthButton = new YAHOO.widget.Button({ >+ id: "delAuth", >+ type: "button", >+ label: _("Delete"), >+ container: "delAuthc", >+ onclick: {fn: confirm_deletion } >+ }); >+ [% END %] > } > > //]]> >-- >1.7.4.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 5916
:
3377
|
3396
| 5311 |
5337
|
5338