[import] Show skip link to all when there is more than 10 failed imports.

This commit is contained in:
Fabien Basmaison 2021-03-05 22:09:56 +01:00
parent 097b8e5811
commit 99e5e3e414
2 changed files with 14 additions and 5 deletions

View file

@ -1,3 +1,8 @@
html {
scroll-behavior: smooth;
scroll-padding-top: 20%;
}
/* --- --- */ /* --- --- */
.image { .image {
overflow: hidden; overflow: hidden;

View file

@ -38,9 +38,13 @@
{% csrf_token %} {% csrf_token %}
{% with failed_count=failed_items|length %} {% with failed_count=failed_items|length %}
<a class="skip-link" href="#select-all-failed-imports"> {% if failed_count > 10 %}
{% blocktrans %}Jump to the bottom of the list to select the {{ failed_count }} items which failed to import.{% endblocktrans %} <p class="block">
</a> <a href="#select-all-failed-imports">
{% blocktrans %}Jump to the bottom of the list to select the {{ failed_count }} items which failed to import.{% endblocktrans %}
</a>
</p>
{% endif %}
{% endwith %} {% endwith %}
<fieldset id="failed-imports"> <fieldset id="failed-imports">
@ -64,7 +68,7 @@
<fieldset class="mt-3"> <fieldset class="mt-3">
<a name="select-all-failed-imports"></a> <a name="select-all-failed-imports"></a>
<label class="label is-inline mb-1"> <label class="label is-inline">
<input <input
id="toggle-all-checkboxes-failed-imports" id="toggle-all-checkboxes-failed-imports"
class="checkbox" class="checkbox"
@ -75,7 +79,7 @@
{% trans "Select all" %} {% trans "Select all" %}
</label> </label>
<button class="button is-block" type="submit">{% trans "Retry items" %}</button> <button class="button is-block mt-3" type="submit">{% trans "Retry items" %}</button>
</fieldset> </fieldset>
<hr> <hr>