{% ckan_extends %} {% block content_action %} {% set wf_stage = h.get_stage_from_package(pkg) %} {% if wf_stage %} {% if wf_stage.reject() is none and h.check_access('purge_unpublished_dataset', pkg) %} {{ _('Purge') }} {% endif %} {% if wf_stage.reject() is not none and h.check_access('workflow_rescind_dataset', pkg) %} {{ _('Rescind') }} {% endif %} {% if h.check_access('move_to_next_stage', pkg) and wf_stage.approve() %} {{ _(wf_stage.approval_msg) }} {% endif %} {% if h.check_access('move_to_next_stage', pkg) and wf_stage.reject() %} {% if wf_stage.rejection_effect %} {{ _(wf_stage.reject_msg) }} {% else %} {{ _(wf_stage.reject_msg) }} {% endif %} {% endif %} {% endif %} {{ super() }} {% endblock %} {% block primary %} {{ super() }} {% endblock %}