Tweak conditions for CSV row download link

This commit is contained in:
Lance Edgar 2018-01-06 19:27:37 -06:00
parent aa4051a7cd
commit b2020686f5

View file

@ -61,7 +61,7 @@
% if master.cloneable and request.has_perm('{}.clone'.format(permission_prefix)): % if master.cloneable and request.has_perm('{}.clone'.format(permission_prefix)):
<li>${h.link_to("Clone this as new {}".format(model_title), url('{}.clone'.format(route_prefix), uuid=instance.uuid))}</li> <li>${h.link_to("Clone this as new {}".format(model_title), url('{}.clone'.format(route_prefix), uuid=instance.uuid))}</li>
% endif % endif
% if master.rows_downloadable_csv and request.has_perm('{}.row_results_csv'.format(permission_prefix)): % if master.has_rows and master.rows_downloadable_csv and request.has_perm('{}.row_results_csv'.format(permission_prefix)):
<li>${h.link_to("Download row results as CSV", url('{}.row_results_csv'.format(route_prefix), uuid=instance.uuid))}</li> <li>${h.link_to("Download row results as CSV", url('{}.row_results_csv'.format(route_prefix), uuid=instance.uuid))}</li>
% endif % endif
</%def> </%def>