@@ -, +, @@ permission - Create a vendor with a few contracts - Create a staff user with - superlibrarian = can view edit/delete contracts - full acq perms = same - without manage_contracts = can view, but action buttons are gone - Make sure the sorting of the contracts table works in all cases --- .../intranet-tmpl/prog/en/modules/acqui/supplier.tt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt @@ -351,7 +351,9 @@ Description Start date End date - Actions + [% IF CAN_user_acquisition_contracts_manage %] + Actions + [% END %] @@ -363,10 +365,12 @@ [% contract.contractdescription | html %] [% contract.contractstartdate | $KohaDates %] [% contract.contractenddate | $KohaDates %] - - Edit - Delete - + [% IF CAN_user_acquisition_contracts_manage %] + + Edit + Delete + + [% END %] [% END %] @@ -426,7 +430,11 @@ $(document).ready(function() { var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, { "aoColumnDefs": [ + [% IF CAN_user_acquisition_contracts_manage %] { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, + [% ELSE %] + { "bSortable": false, "bSearchable": false }, + [% END %] { "sType": "title-string", "aTargets" : [ "title-string" ] } ], 'sDom': 't' --