Skip to content

Commit

Permalink
Merge pull request #10 from tum-gis/delete-button
Browse files Browse the repository at this point in the history
Add delete button
  • Loading branch information
MarijaKnezevic authored Jul 24, 2023
2 parents 100c55a + 41b01f5 commit 00f3ce3
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
{% block buttons %}
{% block delete_button %}
{% if data.id %}
{#{% if h.check_access('resource_delete', {'id': data.id}) %}
{% if h.check_access('resource_delete', {'id': data.id}) %}
{% set locale = h.dump_json({'content': _('Are you sure you want to delete this resource?')}) %}
<a class="btn btn-danger pull-left" href="{% url_for controller='package', action='resource_delete', resource_id=data.id, id=pkg_name %}" data-module="confirm-action" data-module-i18n="{{ locale }}">{% block delete_button_text %}{{ _('Delete') }}{% endblock %}</a>
{% endif %} #}
<a class="btn btn-danger pull-left" href="{% url_for dataset_type ~ '_resource.delete', resource_id=data.id, id=pkg_name %}" data-module="confirm-action" data-module-content="{{ _('Are you sure you want to delete this resource?') }}">{% block delete_button_text %}{{ _('Delete') }}{% endblock %}</a>
{% endif %}
{% endif %}
{% endblock %}
{% if stage %}
Expand All @@ -84,7 +84,6 @@
<button class="btn btn-primary" name="save" value="go-metadata" type="submit">{% block save_button_text %}{{ _('Finish') }}{% endblock %}</button>
{% endblock %}


{% else %}
{% block add_button %}
<button class="btn btn-primary" name="save" value="go-dataset-complete" type="submit">{{ _('Add') }}</button>
Expand All @@ -93,4 +92,3 @@
{% endblock %}
</div>
</form>

0 comments on commit 00f3ce3

Please sign in to comment.