Skip to content

Commit

Permalink
fix(templates): fix layout of delete button;
Browse files Browse the repository at this point in the history
- Fix layout of delete button with upload button.
- Changed delete button icon.
  • Loading branch information
JVickery-TBS committed Jan 29, 2024
1 parent 8bb72fd commit 1a1bd14
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions ckanext/xloader/templates/xloader/resource_data.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,32 @@
{% set delete_action = h.url_for('xloader.delete_datastore_table', id=pkg.id, resource_id=res.id) %}
{% set show_table = true %}

{% block upload_ds_button %}
<form method="post" action="{{ action }}" class="datapusher-form mb-3 mr-3 d-inline-block">
{{ h.csrf_input() if 'csrf_input' in h }}
<button class="btn btn-primary" name="save" type="submit">
<i class="fa fa-cloud-upload"></i> {{ _('Upload to DataStore') }}
</button>
</form>
{% endblock %}

<div class="clear-fix mx-1 d-inline-block"></div>

{% block delete_ds_button %}
{% if res.datastore_active %}
<form method="post" action="{{ delete_action }}" class="mb-3 d-inline-block">
{{ h.csrf_input() if 'csrf_input' in h }}
<a href="{{ h.url_for('xloader.delete_datastore_table', id=pkg.id, resource_id=res.id) }}"
class="btn btn-danger pull-left"
class="btn btn-danger"
type="submit"
data-module="confirm-action"
data-module-with-data=true
data-module-content="{{ _('Are you sure you want to delete the DataStore and Data Dictionary?') }}"
>{% block delete_datastore_button_text %}<i class="fa fa-remove"></i>{{ _('Delete from DataStore') }}{% endblock %}</a>
>{% block delete_datastore_button_text %}<i class="fa fa-trash-alt"></i> {{ _('Delete from DataStore') }}{% endblock %}</a>
</form>
{% endif %}
{% endblock %}

{% block upload_ds_button %}
<form method="post" action="{{ action }}" class="datapusher-form mb-3 d-inline-block">
{{ h.csrf_input() if 'csrf_input' in h }}
<button class="btn btn-primary" name="save" type="submit">
<i class="fa fa-cloud-upload"></i> {{ _('Upload to DataStore') }}
</button>
</form>
{% endblock %}

{% if status.error and status.error.message %}
{% set show_table = false %}
<div class="alert alert-error">
Expand Down

0 comments on commit 1a1bd14

Please sign in to comment.