diff options
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/templates/ishtar/import_list.html | 2 | ||||
| -rw-r--r-- | ishtar_common/views.py | 5 | 
2 files changed, 7 insertions, 0 deletions
| diff --git a/ishtar_common/templates/ishtar/import_list.html b/ishtar_common/templates/ishtar/import_list.html index a5fa34660..f98f47b66 100644 --- a/ishtar_common/templates/ishtar/import_list.html +++ b/ishtar_common/templates/ishtar/import_list.html @@ -2,6 +2,7 @@  {% load i18n inline_formset %}  {% block pre_container %} +{% if autorefresh_available %}  <button id="autorefreshpage"          class="nav-button btn btn-sm btn-secondary disabled"          data-link="{% url 'current_imports_table' %}" @@ -9,6 +10,7 @@          title="{% trans 'Autorefresh the table (useful when waiting for an import result)' %}">    <i class="fa fa-refresh" aria-hidden="true"></i>  </button> +{% endif %}  <form action="." method="post">{% csrf_token %}  {% endblock %} diff --git a/ishtar_common/views.py b/ishtar_common/views.py index c2b292ed4..8b0d51601 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -1823,6 +1823,11 @@ class ImportListView(IshtarMixin, LoginRequiredMixin, ListView):                  imprt.archive()          return HttpResponseRedirect(reverse(self.current_url)) +    def get_context_data(self, **kwargs): +        dct = super(ImportListView, self).get_context_data(**kwargs) +        dct['autorefresh_available'] = settings.USE_BACKGROUND_TASK +        return dct +  class ImportListTableView(ImportListView):      template_name = 'ishtar/import_table.html' | 
