2019-03-28 19:24:34 +01:00
|
|
|
{% extends "main_card.html.twig" %}
|
|
|
|
|
|
|
|
{% block card_content %}
|
|
|
|
<div class="row">
|
2020-01-04 22:20:17 +01:00
|
|
|
<div class="col-sm-4">
|
2019-03-28 19:24:34 +01:00
|
|
|
|
2019-04-05 19:08:30 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-8">
|
2019-04-05 19:31:41 +02:00
|
|
|
<input id="tree-search" type="search" class="form-control" placeholder="{% trans %}search.placeholder{% endtrans %}">
|
2019-04-05 19:08:30 +02:00
|
|
|
</div>
|
2019-04-06 18:38:36 +02:00
|
|
|
<div class="btn-group btn-group-sm col-4" role="group">
|
|
|
|
<button type="button" class="btn btn-outline-secondary" id="tree-expand"
|
|
|
|
title="{% trans %}expandAll{% endtrans %}">
|
|
|
|
<i class="fas fa-plus fa-fw"></i>
|
|
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-outline-secondary" id="tree-reduce"
|
|
|
|
title="{% trans %}reduceAll{% endtrans %}">
|
|
|
|
<i class="fas fa-minus fa-fw"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
2019-04-05 19:08:30 +02:00
|
|
|
</div>
|
2019-04-05 18:35:06 +02:00
|
|
|
|
2019-04-05 19:08:30 +02:00
|
|
|
<div class="treeview-sm mt-2" id="tree" data-tree-data="{{ generateTreeData(entity) }}"
|
|
|
|
data-tree-search="#tree-search" data-tree-expand="#tree-expand" data-tree-reduce="#tree-reduce">
|
2019-04-05 17:49:02 +02:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2019-03-28 19:24:34 +01:00
|
|
|
</div>
|
|
|
|
|
2020-01-04 22:20:17 +01:00
|
|
|
<div class="col-sm-8">
|
2019-03-28 19:24:34 +01:00
|
|
|
|
|
|
|
<fieldset>
|
|
|
|
<legend>
|
|
|
|
{% if entity.ID %}
|
|
|
|
<strong>{% trans with {'%name': entity.name} %}edit.caption{% endtrans %}</strong>
|
|
|
|
{% else %}
|
|
|
|
<strong>{% trans %}new.caption{% endtrans %}</strong>
|
|
|
|
{% endif %}
|
|
|
|
</legend>
|
|
|
|
|
2019-09-11 13:37:51 +02:00
|
|
|
{{ form_errors(form) }}
|
|
|
|
|
2019-03-28 19:24:34 +01:00
|
|
|
<ul class="nav nav-tabs mt-2">
|
2019-04-07 19:51:07 +02:00
|
|
|
<li class="nav-item"><a class="link-anchor active nav-link" data-toggle="tab" href="#home">{% trans %}standard.label{% endtrans %}</a></li>
|
|
|
|
<li class="nav-item"><a data-toggle="tab" class="link-anchor nav-link" href="#info">{% trans %}infos.label{% endtrans %}</a></li>
|
2019-04-07 19:30:42 +02:00
|
|
|
{% if entity.id %}
|
2019-04-07 19:51:07 +02:00
|
|
|
<li class="nav-item"><a data-toggle="tab" class="link-anchor nav-link" href="#export">{% trans %}export.label{% endtrans %}</a> </li>
|
2019-04-11 19:09:22 +02:00
|
|
|
{% else %}
|
|
|
|
<li class="nav-item"><a data-toggle="tab" class="link-anchor nav-link" href="#import_export">{% trans %}import_export.label{% endtrans %}</a> </li>
|
2019-08-12 22:41:58 +02:00
|
|
|
<li class="nav-item"><a data-toggle="tab" class="link-anchor nav-link" href="#mass_creation">{% trans %}mass_creation.label{% endtrans %}</a></li>
|
2019-04-07 19:30:42 +02:00
|
|
|
{% endif %}
|
2019-03-28 19:24:34 +01:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="tab-content mb-3 mt-3">
|
2019-04-26 18:05:43 +02:00
|
|
|
|
2019-03-28 19:24:34 +01:00
|
|
|
<div id="home" class="tab-pane fade show active">
|
2019-04-26 18:05:43 +02:00
|
|
|
|
2019-04-07 19:30:42 +02:00
|
|
|
{{ form_start(form) }}
|
2019-04-26 18:05:43 +02:00
|
|
|
|
2019-09-24 18:28:35 +02:00
|
|
|
|
2019-04-26 18:05:43 +02:00
|
|
|
<ul class="nav nav-pills mb-2">
|
2019-09-24 18:28:35 +02:00
|
|
|
<li class="nav-item">
|
|
|
|
<a data-toggle="tab" class="nav-link link-anchor active" href="#common">{% trans %}admin.common{% endtrans %}</a>
|
|
|
|
</li>
|
2019-04-26 18:05:43 +02:00
|
|
|
{% block additional_pills %}{% endblock %}
|
2019-09-24 18:28:35 +02:00
|
|
|
<li class="nav-item">
|
|
|
|
<a data-toggle="tab" class="nav-link link-anchor" href="#attachments">{% trans %}admin.attachments{% endtrans %}</a>
|
|
|
|
</li>
|
2019-04-26 18:05:43 +02:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<!-- Tab panes -->
|
|
|
|
<div class="tab-content">
|
2019-09-24 18:28:35 +02:00
|
|
|
<div class="tab-pane active" id="common">
|
2019-04-26 18:05:43 +02:00
|
|
|
{{ form_row(form.name) }}
|
2019-04-28 14:18:11 +02:00
|
|
|
{% if form.parent%}
|
2019-08-13 23:04:06 +02:00
|
|
|
{{ form_row(form.parent) }}
|
|
|
|
{% endif %}
|
|
|
|
{% if form.not_selectable is defined %}
|
|
|
|
{{ form_row(form.not_selectable) }}
|
2019-04-28 14:18:11 +02:00
|
|
|
{% endif %}
|
2019-04-26 19:12:48 +02:00
|
|
|
|
|
|
|
{% block additional_controls %}{% endblock %}
|
|
|
|
|
|
|
|
{% block comment %}
|
2019-04-26 18:05:43 +02:00
|
|
|
{{ form_row(form.comment) }}
|
2019-04-26 19:12:48 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
2019-04-26 18:05:43 +02:00
|
|
|
</div>
|
|
|
|
{% block additional_panes %}{% endblock %}
|
2019-09-24 18:28:35 +02:00
|
|
|
|
|
|
|
<div class="tab-pane" id="attachments">
|
|
|
|
{% include "AdminPages/_attachments.html.twig" %}
|
2019-10-03 14:04:09 +02:00
|
|
|
{% block master_picture_block %}
|
|
|
|
{{ form_row(form.master_picture_attachment) }}
|
|
|
|
{% endblock %}
|
2019-09-24 18:28:35 +02:00
|
|
|
</div>
|
2019-04-26 18:05:43 +02:00
|
|
|
</div>
|
|
|
|
|
2019-04-07 19:30:42 +02:00
|
|
|
{{ form_row(form.save) }}
|
|
|
|
{{ form_row(form.reset) }}
|
|
|
|
{{ form_end(form) }}
|
|
|
|
|
2019-04-26 18:05:43 +02:00
|
|
|
|
2019-04-07 19:30:42 +02:00
|
|
|
{# Only include on existing parts #}
|
|
|
|
{% if entity.id %}
|
|
|
|
{{ include('AdminPages/_delete_form.html.twig') }}
|
|
|
|
{% endif %}
|
2019-04-26 18:05:43 +02:00
|
|
|
|
2019-03-28 19:24:34 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="info" class="tab-pane fade">
|
2019-09-04 19:37:35 +02:00
|
|
|
{% include "AdminPages/_info.html.twig" %}
|
2019-03-28 19:24:34 +01:00
|
|
|
</div>
|
|
|
|
|
2019-04-26 18:05:43 +02:00
|
|
|
|
|
|
|
|
2019-04-07 19:30:42 +02:00
|
|
|
{% if entity.id %}
|
|
|
|
<div id="export" class="tab-pane fade">
|
2019-04-20 19:42:08 +02:00
|
|
|
{% include 'AdminPages/_export_form.html.twig' with {'path' : path('attachment_type_export', {'id': entity.id})} %}
|
2019-04-07 19:30:42 +02:00
|
|
|
</div>
|
2019-04-11 19:09:22 +02:00
|
|
|
{% else %} {# For new element we have a combined import/export tab #}
|
|
|
|
<div id="import_export" class="tab-pane fade">
|
|
|
|
|
2019-04-11 22:41:21 +02:00
|
|
|
{{ form_start(import_form) }}
|
2019-04-11 19:09:22 +02:00
|
|
|
|
2019-04-11 22:41:21 +02:00
|
|
|
{{ form_end(import_form) }}
|
2019-04-11 19:09:22 +02:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<fieldset>
|
2019-04-20 19:42:08 +02:00
|
|
|
<legend>{% trans %}export_all.label{% endtrans %}</legend>
|
|
|
|
{% include 'AdminPages/_export_form.html.twig' with {'path' : path('attachment_type_export_all')} %}
|
2019-04-11 19:09:22 +02:00
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
|
2019-08-12 22:41:58 +02:00
|
|
|
<div id="mass_creation" class="tab-pane fade">
|
|
|
|
<span class="text-muted">{% trans %}mass_creation.help{% endtrans %}</span>
|
|
|
|
{{ form(mass_creation_form) }}
|
|
|
|
</div>
|
|
|
|
|
2019-04-11 19:09:22 +02:00
|
|
|
|
2019-04-07 19:30:42 +02:00
|
|
|
{% endif %}
|
2019-04-26 18:05:43 +02:00
|
|
|
|
|
|
|
|
2019-04-07 19:30:42 +02:00
|
|
|
</div>
|
2019-03-28 19:24:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-06 18:38:36 +02:00
|
|
|
|
2019-04-07 19:30:42 +02:00
|
|
|
</fieldset>
|
2019-03-28 19:24:34 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|