From ee9e545f7e25694d6712d72cf1cfcccbd5639b54 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 20 Oct 2023 12:14:42 -0400 Subject: [PATCH 1/2] render 'choices' when they are a dictionary When a list, it is just a list of values, but as a dictionary, they keys are values and the values are descriptions for each key. --- collection_prep/cmd/plugin.rst.j2 | 36 ++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/collection_prep/cmd/plugin.rst.j2 b/collection_prep/cmd/plugin.rst.j2 index 703898b..94b8bcc 100644 --- a/collection_prep/cmd/plugin.rst.j2 +++ b/collection_prep/cmd/plugin.rst.j2 @@ -137,19 +137,29 @@ Parameters {# Show possible choices and highlight details #} {% if value.choices %} {% endif %} {# Show default value, when multiple choice or no choices #} From 570042c17b949e9d859b270081a669b6efb224c4 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 20 Oct 2023 12:17:44 -0400 Subject: [PATCH 2/2] remove bad chioce --- collection_prep/cmd/plugin.rst.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collection_prep/cmd/plugin.rst.j2 b/collection_prep/cmd/plugin.rst.j2 index 94b8bcc..e28ab62 100644 --- a/collection_prep/cmd/plugin.rst.j2 +++ b/collection_prep/cmd/plugin.rst.j2 @@ -142,7 +142,7 @@ Parameters {% if (value.default is not list and value.default == choice) or (value.default is list and choice in value.default) %}
  • @{ choice | escape }@: @{ value.choices[choice] | escape }@←
  • {% else %} -
  • @{ choice | escape }@: @{ value.choices[chioce] }@
  • +
  • @{ choice | escape }@: @{ value.choices[choice] | escape }@
  • {% endif %} {% endfor %} {% else %}