Commit 4e0606ca authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-4208: ensure that the content moderation block only appears once

parent 66154328
......@@ -81,7 +81,7 @@
]
%}
{% if uw_content_moderation_form %}
{% if uw_content_moderation_form and node.nid.value == uw_content_moderation_form['#mods'].nid %}
{{ uw_content_moderation_form }}
{% endif %}
......
{{ attach_library('uw_custom_blocks/uw_content_moderation') }}
<div class="uw-content-moderation">
<div class="uw-content-moderation__wrapper">
Revision State: <i>{{ mods.mod_state }}</i><br />
Most recent version: <i>{{ mods.latest }}</i><br />
Actions: <a href="admin/uw-content-moderation/{{ mods.nid }}/{{ mods.vid }}/{{ mods.status }}">{% if mods.status %}unpublish {% else %}publish {% endif %} this content</a>
{% set current_path = url('<current>')['#markup'] %}
{% set current_path = current_path|replace({'https://' : ''}) %}
{% set current_path = current_path|split('/')|last %}
{% if current_path != 'layout' and mods != NULL %}
<div class="uw-content-moderation">
<div class="uw-content-moderation__wrapper">
Revision State: <i> {% if mods.status %} Published {% else %} Unpublished {% endif %} </i><br />
Most recent version: <i>{{ mods.latest }}</i><br />
Actions: <a href="admin/uw-content-moderation/{{ mods.nid }}/{{ mods.vid }}">{% if mods.status %}Unpublish {% else %}Publish {% endif %} this content</a>
</div>
</div>
</div>
{% endif %}
Supports Markdown
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