Commit 7b8ba624 authored by Roland Denis's avatar Roland Denis

Full description as directive attribute

To allow right display of nested nodes
parent d03c95a5
Pipeline #9673 failed with stages
in 12 seconds
......@@ -122,6 +122,7 @@ class Meso(Directive):
'servicename': multiline_list(str),
'etptnumber': float,
'accesspolicy': multiline_list(str),
'fulldescription': str,
}
has_content = True
......@@ -132,6 +133,8 @@ class Meso(Directive):
for key in self.option_spec:
node[key] = self.options.get(key, None)
# FIXME: nested parse of fulldescription (e.g. for url formatting)
self.state.nested_parse(self.content, self.content_offset, node)
return [node]
......
......@@ -42,7 +42,6 @@ def build_meso(meso):
return {
'name': meso['name'],
'options': filter_options(directives.Meso, meso),
'content': meso.get('fullDescription', ''),
'cluster_list': list(map(build_cluster, meso.get('clusterList', []))),
'storage_list': list(map(build_storage, meso.get('storageList', []))),
}
......@@ -119,10 +118,6 @@ _json_mesolist_rst_template = _json_mesolist_rst_env.from_string(dedent("""
{{ l }}
{%- endfor %}
{% for l in meso["content"] | splitlines %}
{{ l }}
{%- endfor %}
.. cluster_list::
{% for cluster in meso["cluster_list"] %}
......
......@@ -16,10 +16,7 @@
</div>
{% endif %}
</h4>
<p>
{% endif %}
{% if footer %}
</p>
<p>{{ meso['fulldescription'] }}</p>
</div>
<div class="card-body">
<div class="plus-minus plus" onclick="$(this).closest('.card-body').find('.collapse').collapse('toggle'); $(this).toggleClass('plus minus')"></div>
......@@ -70,6 +67,10 @@
</p>
{% endif %}
</div>
<div>
{% endif %}
{% if footer %}
</div>
</div>
</div>
{% endif %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment