From 38abda544ff1e8bc6b7f4b5404272955b965e18b Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Wed, 28 Feb 2018 18:00:56 +0100 Subject: [PATCH] Improve module docs wrt. required params (#36812) So I am still not satisfied with how required parameters are being displayed (before it was yes/no, then it became required/optional, and only required). Now it will display in small green 'required' under the parameter name. This is more convenient, and provides more room for the description. Especially on smaller screens. --- docs/templates/plugin.rst.j2 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/templates/plugin.rst.j2 b/docs/templates/plugin.rst.j2 index 48b62b3756..260fc9706f 100644 --- a/docs/templates/plugin.rst.j2 +++ b/docs/templates/plugin.rst.j2 @@ -91,7 +91,6 @@ Options {# Header of the documentation #}
Parameter
-
Required?
Default
Choices
{% if plugin_type != 'module' %} @@ -109,12 +108,12 @@ Options {% endfor %}
- @{ key }@
{% if value.version_added %} (added in @{value.version_added}@){% endif %}
+ @{ key }@ + {% if value.get('required', False) %}
required
{% endif %} + {% if value.version_added %}
(added in @{value.version_added}@)
{% endif %}
- {# required #} -
{% if value.get('required', False) %}required{% endif %}
{# default value #}
{% if value.default %}@{ value.default | html_ify }@{% endif %}
{# choices #}