View live functionality is more prominent

This commit is contained in:
Ivo Valchev
2020-04-02 12:33:27 +02:00
parent 2ab2c5564c
commit 5fa026f532

View File

@@ -5,37 +5,27 @@
{{ macro.button('action.save', 'fa-save', 'success', {'type': 'submit', 'form': 'editcontent'}) }}
{% if record.id %}
<div class="btn-group">
<div class="btn-group">
{{ macro.button(
'action.preview',
'fa-external-link-square-alt',
'primary',
{ 'type': 'submit',
'form': 'editcontent',
'formtarget': '_blank',
'formaction': path('bolt_content_edit_preview', {'id': record.id })
})
}}
{{ macro.button(
'action.preview',
'fa-external-link-square-alt',
'primary',
{ 'type': 'submit',
'form': 'editcontent',
'formtarget': '_blank',
'formaction': path('bolt_content_edit_preview', {'id': record.id })
}) }}
{% if record.status == "published" %}
<button class="btn btn-primary dropdown-toggle dropdown-toggle-split mb-3" aria-expanded="false" aria-haspopup="true"
data-toggle="dropdown" type="button">
<span class="sr-only">{{ 'buttons.button_toggle'|trans }}</span>
</button>
<div class="dropdown-menu dropdown-menu-right">
<button class="btn"
form="editcontent"
formaction="{{ path('bolt_content_edit_viewsave', {'id': record.id }) }}"
formtarget="_blank" style="white-space: nowrap; padding-right: 1rem;"
type="submit">
<i class="fas fa-external-link-square-alt mr-2 ml-2"></i>
{{ 'action.view_saved'|trans }}
</button>
</div>
{% if record.status == "published" %}
<div>
<strong>View live</strong><br>
<a href="{{ record|link(true) }}">{{ record|link(true)|trim('https://', side='left') }}</a>
</div>
{% endif %}
{% endif %}
</div>
{% endif %}
</div>