Skip to content

Commit

Permalink
draft can be deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
toavina committed Oct 15, 2024
1 parent f24e688 commit 302443f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ckanext/zarr/templates/package/new_package_form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% ckan_extends %}

{% block delete_button %}
{% if form_style == 'edit' and h.check_access('package_delete', {'id': pkg_dict.id}) %}
{{ super() }}
{% elif data.state == 'draft' %}
{% if h.check_access('package_delete', {'id': data.id}) and not data.state == 'deleted' %}
<a class="btn btn-danger pull-left" href="{% url_for dataset_type ~ '.delete', id=data.id %}" data-module="confirm-action" data-module-content="{{ h.humanize_entity_type('package', dataset_type, 'delete confirmation') or _('Are you sure you want to delete this dataset?') }}">
{{ _('Delete draft') }}
</a>
{% endif %}
{% endif %}
{% endblock %}

0 comments on commit 302443f

Please sign in to comment.