{% import "components/tree_macros.html.twig" as tree %} {% import "helper.twig" as helper %} {# @var entity \App\Entity\Base\AbstractStructuralDBElement #} {% 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_5_layout.html.twig' %} {% block card_content %}
{{ tree.treeview(entity) }}
{% if entity.ID %} {% block edit_title %}{% trans with {'%name': entity.name|escape } %}edit.caption{% endtrans %}{% endblock %} {% if timeTravel is defined and timeTravel is not null %} ({{ timeTravel|format_datetime('short') }}) {% endif %}
{% block quick_links %}{% endblock %} {% block preview_picture %} {{ helper.entity_preview_sm(entity) }} {% 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) }} {% block nav_pills_container %} {% endblock %}
{{ 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 "admin/_attachments.html.twig" %} {% block master_picture_block %} {{ form_row(form.master_picture_attachment) }} {% endblock %}
{% if entity.parameters is defined %}
{% include "admin/_parameters.html.twig" %}
{% endif %}
{{ form_widget(form.save) }}
{{ form_row(form.reset) }} {{ form_end(form) }} {# Only include on existing parts #} {% if entity.id %} {{ include('admin/_duplicate.html.twig') }} {{ include('admin/_delete_form.html.twig') }} {% endif %}
{% include "admin/_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 'admin/_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 'admin/_export_form.html.twig' with {'path' : path(route_base ~ '_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 %}