Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
92 lines (82 sloc) 4 KB
{% extends '@ezdesign/content/content_edit/content_edit_base.html.twig' %}
{% trans_default_domain 'content_edit' %}
{% block meta %}
<meta name="LanguageCode" content="{{ language.languageCode }}" />
{% endblock %}
{% block details %}
<div class="container mt-5 px-5">
{% if baseLanguage is defined and baseLanguage is not null %}
<h2 class="ez-content-item-status">{{ 'editing_in_language_based_on'|trans({'%contentName%': content.name, '%languageName%': language.name, '%baseLanguageName%': baseLanguage.name})|desc('Editing - %contentName% in %languageName% based on %baseLanguageName%') }}</h2>
{% else %}
<h2 class="ez-content-item-status">{{ 'editing_in_language'|trans({'%contentName%': content.name, '%languageName%': language.name})|desc('Editing - %contentName% in %languageName%') }}</h2>
{% endif %}
<h1>
<svg class="ez-icon ez-icon-{{ contentType.identifier }}">
<use xlink:href="{{ ez_content_type_icon(contentType.identifier) }}"></use>
</svg>
{{ content.name }}
</h1>
<div class="small">
{{ contentType.name }} /
{% if creator is not null %}{{ 'created_by'|trans({'%name%': ez_content_name(creator)})|desc('Created by %name%') }} /{% endif %}
{{ content.versionInfo.contentInfo.publishedDate|ez_full_datetime }} /
{{ 'content_id'|trans({'%contentId%': content.id})|desc('Content ID: %contentId%') }},
{% if isPublished == false %}
{{ 'parent_location_id'|trans({'%locationId%': parentLocation.id})|desc('Parent Location ID: %locationId%') }}
{% else %}
{{ 'location_id'|trans({'%locationId%': location.id})|desc('Location ID: %locationId%') }}
{% endif %}
</div>
<div class="ez-content-item__errors-wrapper" hidden>
{{ 'errors.in.the.form'|trans({},'content_edit')|desc('Looks like something went wrong. Please check for required fields or errors and correct them') }}
</div>
{# @todo remove if statement once getDescription() bug is resolved in kernel #}
{% if contentType.descriptions is not empty %}
<div class="small text-muted">{{ contentType.description }}</div>
{% endif %}
</div>
{% endblock %}
{% block form_fields %}
<section class="container mt-4 px-5 mb-5">
<div class="card ez-card">
<div class="card-body">
{{ parent() }}
{{ form_widget(form.publish, {'attr': {'hidden': 'hidden'}}) }}
{{ form_widget(form.saveDraft, {'attr': {'hidden': 'hidden'}}) }}
{{ form_widget(form.cancel, {'attr': {'hidden': 'hidden'}}) }}
</div>
</div>
</section>
{% endblock %}
{% block right_sidebar %}
{% set content_edit_sidebar_right = knp_menu_get('ezplatform_admin_ui.menu.content_edit.sidebar_right', [], {
'content': content,
'content_type': contentType,
'location': location,
'parent_location': parentLocation,
'language': language
}) %}
{{ knp_menu_render(content_edit_sidebar_right, {'template': '@ezdesign/parts/menu/sidebar_right.html.twig'}) }}
{% endblock %}
{% block close_button %}
{% set referrerLocation = isPublished ? location : parentLocation %}
<a class="ez-content-edit-container__close" href="{{ path('_ezpublishLocation', {'locationId': referrerLocation.id }) }}"></a>
{% endblock %}
{% block form_before %}
{{ ezplatform_admin_ui_component_group('content-edit-form-before', {
'content': content,
'contentType': contentType,
'location': location,
'parent_location': parentLocation,
'language': language
}) }}
{% endblock %}
{% block form_after %}
{{ ezplatform_admin_ui_component_group('content-edit-form-after', {
'content': content,
'contentType': contentType,
'location': location,
'parent_location': parentLocation,
'language': language
}) }}
{% endblock %}
You can’t perform that action at this time.