From 9de4b4598f5833f5b9d0e2f4e4023575db7ee855 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 9 Nov 2018 15:04:41 +0000 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20show=20move=20when=20there?= =?UTF-8?q?=E2=80=99s=20nothing=20to=20move?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/templates/views/templates/_move_to.html | 2 +- app/templates/views/templates/choose.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/views/templates/_move_to.html b/app/templates/views/templates/_move_to.html index 7da4a2a05..4b9564c3d 100644 --- a/app/templates/views/templates/_move_to.html +++ b/app/templates/views/templates/_move_to.html @@ -1,7 +1,7 @@ {% from "components/radios.html" import radios %} {% 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) }} {{ page_footer('Move selected', button_name='operation', button_value='move') }} {% endif %} diff --git a/app/templates/views/templates/choose.html b/app/templates/views/templates/choose.html index 7d170dfd3..952d7ef7a 100644 --- a/app/templates/views/templates/choose.html +++ b/app/templates/views/templates/choose.html @@ -82,7 +82,7 @@ {% with templates=templates, template_folders=template_folders %} {% include 'views/templates/_template_list.html' %} {% 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' %} {% endwith %}