From 3c1ad5c0aeb939168d776d31dcb27011877171b1 Mon Sep 17 00:00:00 2001 From: phoffmann Date: Tue, 18 May 2021 08:52:08 +0200 Subject: [PATCH 1/3] Put default value output in choices condition --- collection_prep/cmd/plugin.rst.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/collection_prep/cmd/plugin.rst.j2 b/collection_prep/cmd/plugin.rst.j2 index 5cf357a..56ace2b 100644 --- a/collection_prep/cmd/plugin.rst.j2 +++ b/collection_prep/cmd/plugin.rst.j2 @@ -151,10 +151,10 @@ Parameters {% endif %} {% endfor %} - {% endif %} - {# Show default value, when multiple choice or no choices #} - {% if value.default is defined and value.default not in value.choices %} + {# Show default value, when multiple choice or no choices #} + {% if value.default is defined and value.default not in value.choices %} Default:
@{ value.default | tojson | escape }@
+ {% endif %} {% endif %} {# configuration #} From f0fa8b843b8bb7a95a233c99d2829e3db39e2166 Mon Sep 17 00:00:00 2001 From: phoffmann Date: Wed, 19 May 2021 17:53:18 +0200 Subject: [PATCH 2/3] revert previous commit and extended if statement --- collection_prep/cmd/plugin.rst.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/collection_prep/cmd/plugin.rst.j2 b/collection_prep/cmd/plugin.rst.j2 index 56ace2b..7473e79 100644 --- a/collection_prep/cmd/plugin.rst.j2 +++ b/collection_prep/cmd/plugin.rst.j2 @@ -151,10 +151,10 @@ Parameters {% endif %} {% endfor %} - {# Show default value, when multiple choice or no choices #} - {% if value.default is defined and value.default not in value.choices %} - Default:
@{ value.default | tojson | escape }@
{% endif %} + {# Show default value, when multiple choice or no choices #} + {% if value.default is defined and (not value.choices or value.default not in value.choices) %} + Default:
@{ value.default | tojson | escape }@
{% endif %} {# configuration #} From 0daae94e4e6ab236bb27f66a9868ae9fcc88a845 Mon Sep 17 00:00:00 2001 From: phoffmann Date: Thu, 2 Dec 2021 11:39:37 +0100 Subject: [PATCH 3/3] fix indentation --- collection_prep/cmd/plugin.rst.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collection_prep/cmd/plugin.rst.j2 b/collection_prep/cmd/plugin.rst.j2 index 7473e79..43d4891 100644 --- a/collection_prep/cmd/plugin.rst.j2 +++ b/collection_prep/cmd/plugin.rst.j2 @@ -151,10 +151,10 @@ Parameters {% endif %} {% endfor %} - {% endif %} + {% endif %} {# Show default value, when multiple choice or no choices #} {% if value.default is defined and (not value.choices or value.default not in value.choices) %} - Default:
@{ value.default | tojson | escape }@
+ Default:
@{ value.default | tojson | escape }@
{% endif %} {# configuration #}