Only show add TO button if user has create task order perms
This commit is contained in:
parent
65363129fb
commit
6a94b150ff
@ -1,6 +1,6 @@
|
||||
{% from "components/icon.html" import Icon %}
|
||||
|
||||
{% macro EmptyState(message, action_label, action_href, icon=None, sub_message=None) -%}
|
||||
{% macro EmptyState(message, action_label, action_href, icon=None, sub_message=None, add_perms=True) -%}
|
||||
<div class='empty-state'>
|
||||
<p class='empty-state__message'>{{ message }}</p>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<p class='empty-state__sub-message'>{{ sub_message }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if action_href and action_label %}
|
||||
{% if add_perms and (action_href and action_label) %}
|
||||
<a href='{{ action_href }}' class='usa-button usa-button-big'>{{ action_label }}</a>
|
||||
{% endif %}
|
||||
|
||||
|
@ -113,6 +113,7 @@
|
||||
action_label='Add a New Task Order',
|
||||
action_href=url_for('task_orders.edit', portfolio_id=portfolio.id),
|
||||
icon='cloud',
|
||||
add_perms=user_can(permissions.CREATE_TASK_ORDER)
|
||||
) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user