{% import "components/tree_macros.html.twig" as tree %} {% extends "main_card.html.twig" %} {% block title %} {% if entity.id is null %} {{ block("new_title") }} {% else %} {{ block("edit_title")|striptags }} {% endif %} {% endblock %} {% block card_type %} {% if timeTravel is defined and timeTravel is not null %} bg-primary-striped text-white {% else %} bg-primary text-white {% endif %} {% endblock %} {% form_theme form.log_comment 'bootstrap_4_layout.html.twig' %} {% block card_content %}
{{ tree.treeview(entity) }}
{% if entity.ID %} {% block edit_title %}{% trans with {'%name': entity.name} %}edit.caption{% endtrans %}{% endblock %} {% if timeTravel is defined and timeTravel is not null %} ({{ timeTravel|format_datetime('short') }}) {% endif %} {% block quick_links %}{% endblock %} {% else %} {% block new_title %}{% trans %}new.caption{% endtrans %}{% endblock %} {% endif %} {% if timeTravel is defined and timeTravel is not null %} {% trans with {'%timestamp%': timeTravel|format_datetime('short')} %}part.info.timetravel_hint{% endtrans %} {% endif %} {{ form_errors(form) }}
{{ form_start(form) }}
{{ form_row(form.name) }} {% if form.parent%} {{ form_row(form.parent) }} {% endif %} {% if form.not_selectable is defined %} {{ form_row(form.not_selectable) }} {% endif %} {% block additional_controls %}{% endblock %} {% block comment %} {{ form_row(form.comment) }} {% endblock %}
{% block additional_panes %}{% endblock %}
{% include "AdminPages/_attachments.html.twig" %} {% block master_picture_block %} {{ form_row(form.master_picture_attachment) }} {% endblock %}
{% if entity.parameters is defined %}
{% include "AdminPages/_parameters.html.twig" %}
{% endif %}
{{ form_widget(form.save) }}
{{ form_row(form.reset) }} {{ form_end(form) }} {# Only include on existing parts #} {% if entity.id %} {{ include('AdminPages/_duplicate.html.twig') }} {{ include('AdminPages/_delete_form.html.twig') }} {% endif %}
{% include "AdminPages/_info.html.twig" %}
{% if datatable is defined and datatable is not null %}
{% import "components/history_log_macros.html.twig" as log %} {{ log.element_history_component(datatable) }}
{% endif %} {% if entity.id %}
{% include 'AdminPages/_export_form.html.twig' with {'path' : path(route_base ~ '_export', {'id': entity.id})} %}
{% else %} {# For new element we have a combined import/export tab #}
{{ form_start(import_form) }} {{ form_end(import_form) }}
{% trans %}export_all.label{% endtrans %} {% include 'AdminPages/_export_form.html.twig' with {'path' : path('attachment_type_export_all')} %}
{% trans %}mass_creation.help{% endtrans %} {{ form(mass_creation_form) }}
{% endif %}
{# Include turbo control things, so we can still control page title and reloading #} {% include "_turbo_control.html.twig" %}
{% endblock %}