diff --git a/tailbone/templates/batch/view.mako b/tailbone/templates/batch/view.mako index 13ba7ecb..c2cfd609 100644 --- a/tailbone/templates/batch/view.mako +++ b/tailbone/templates/batch/view.mako @@ -16,12 +16,14 @@ location.href = '${url('{}.worksheet'.format(route_prefix), uuid=batch.uuid)}'; }); % endif - $('#refresh-data').click(function() { - $(this) - .button('option', 'disabled', true) - .button('option', 'label', "Working, please wait..."); - location.href = '${url('{}.refresh'.format(route_prefix), uuid=batch.uuid)}'; - }); + % if master.batch_refreshable(batch) and request.has_perm('{}.refresh'.format(permission_prefix)): + $('#refresh-data').click(function() { + $(this) + .button('option', 'disabled', true) + .button('option', 'label', "Working, please wait..."); + location.href = '${url('{}.refresh'.format(route_prefix), uuid=batch.uuid)}'; + }); + % endif });