Don’t show move when there’s nothing to move

This commit is contained in:
Chris Hill-Scott
2018-11-09 15:04:41 +00:00
parent 38e8cca606
commit 9de4b4598f
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
{% from "components/radios.html" import radios %} {% from "components/radios.html" import radios %}
{% from "components/page-footer.html" import page_footer %} {% from "components/page-footer.html" import page_footer %}
{% if templates_and_folders_form.move_to.choices %} {% if templates_and_folders_form.move_to.choices and (templates or template_folders) %}
{{ radios(templates_and_folders_form.move_to) }} {{ radios(templates_and_folders_form.move_to) }}
{{ page_footer('Move selected', button_name='operation', button_value='move') }} {{ page_footer('Move selected', button_name='operation', button_value='move') }}
{% endif %} {% endif %}

View File

@@ -82,7 +82,7 @@
{% with templates=templates, template_folders=template_folders %} {% with templates=templates, template_folders=template_folders %}
{% include 'views/templates/_template_list.html' %} {% include 'views/templates/_template_list.html' %}
{% endwith %} {% endwith %}
{% with templates_and_folders_form=templates_and_folders_form %} {% with templates=templates, template_folders=template_folders, templates_and_folders_form=templates_and_folders_form %}
{% include 'views/templates/_move_to.html' %} {% include 'views/templates/_move_to.html' %}
{% endwith %} {% endwith %}
</form> </form>