Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
groupe-calcul
website
Commits
7b8ba624
Commit
7b8ba624
authored
Apr 15, 2020
by
Roland Denis
Browse files
Full description as directive attribute
To allow right display of nested nodes
parent
d03c95a5
Pipeline
#9673
failed with stages
in 12 seconds
Changes
3
Pipelines
14
Hide whitespace changes
Inline
Side-by-side
plugins/meso_list/directives.py
View file @
7b8ba624
...
...
@@ -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
]
...
...
plugins/meso_list/json.py
View file @
7b8ba624
...
...
@@ -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"] %}
...
...
plugins/meso_list/templates/meso.tpl
View file @
7b8ba624
...
...
@@ -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 %}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment