2019-03-28 19:24:34 +01:00
|
|
|
{% extends "main_card.html.twig" %}
|
|
|
|
|
|
|
|
{% block card_content %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-4">
|
|
|
|
|
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>
|
|
|
|
|
|
|
|
<div class="col-8">
|
|
|
|
|
|
|
|
<fieldset>
|
|
|
|
<legend>
|
|
|
|
{% if entity.ID %}
|
|
|
|
<strong>{% trans with {'%name': entity.name} %}edit.caption{% endtrans %}</strong>
|
|
|
|
{% else %}
|
|
|
|
<strong>{% trans %}new.caption{% endtrans %}</strong>
|
|
|
|
{% endif %}
|
|
|
|
</legend>
|
|
|
|
|
|
|
|
<ul class="nav nav-tabs mt-2">
|
|
|
|
<li class="nav-item"><a class="link-anchor active nav-link" data-toggle="tab" href="#home">standard.label</a></li>
|
|
|
|
<li class="nav-item"><a data-toggle="tab" class="link-anchor nav-link" href="#info">infos.label</a></li>
|
2019-04-07 19:30:42 +02:00
|
|
|
{% if entity.id %}
|
|
|
|
<li class="nav-item"><a data-toggle="tab" class="link-anchor nav-link" href="#export">export.label</a> </li>
|
|
|
|
{% endif %}
|
2019-03-28 19:24:34 +01:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="tab-content mb-3 mt-3">
|
|
|
|
<div id="home" class="tab-pane fade show active">
|
2019-04-07 19:30:42 +02:00
|
|
|
{{ form_start(form) }}
|
2019-03-28 19:24:34 +01:00
|
|
|
{{ form_row(form.name) }}
|
|
|
|
{{ form_row(form.parent) }}
|
|
|
|
{% block additional_controls %}{% endblock %}
|
|
|
|
{{ form_row(form.comment) }}
|
2019-04-07 19:30:42 +02:00
|
|
|
{{ form_row(form.save) }}
|
|
|
|
{{ form_row(form.reset) }}
|
|
|
|
{{ form_end(form) }}
|
|
|
|
|
|
|
|
{# Only include on existing parts #}
|
|
|
|
{% if entity.id %}
|
|
|
|
{{ include('AdminPages/_delete_form.html.twig') }}
|
|
|
|
{% endif %}
|
2019-03-28 19:24:34 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="info" class="tab-pane fade">
|
|
|
|
<div class="form-group row">
|
|
|
|
<label class="col-form-label col-md-3">{% trans %}id.label{% endtrans %}</label>
|
|
|
|
<div class="col-md-9">
|
|
|
|
<p class="form-control-plaintext">{% if entity.iD %}{{ entity.id }}{% else %}-{% endif %}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group row">
|
|
|
|
<label class="col-form-label col-md-3">{% trans %}createdAt{% endtrans %}</label>
|
|
|
|
<div class="col-md-9">
|
|
|
|
<p class="form-control-plaintext">
|
2019-04-06 15:33:25 +02:00
|
|
|
{% if date(entity.addedDate) > date('1900/01/01') %}
|
2019-03-28 19:24:34 +01:00
|
|
|
{{ entity.addedDate | localizeddate("long") }}
|
|
|
|
{% else %}
|
|
|
|
-
|
|
|
|
{% endif %}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group row">
|
|
|
|
<label class="col-form-label col-md-3">{% trans %}lastModified{% endtrans %}</label>
|
|
|
|
<div class="col-md-9">
|
|
|
|
<p class="form-control-plaintext">
|
2019-04-06 15:33:25 +02:00
|
|
|
{% if date(entity.lastModified) > date('1900/01/01') %}
|
2019-03-28 19:24:34 +01:00
|
|
|
{{ entity.lastModified | localizeddate("long") }}
|
|
|
|
{% else %}
|
|
|
|
-
|
|
|
|
{% endif %}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2019-04-07 19:30:42 +02:00
|
|
|
{% if entity.id %}
|
|
|
|
<div id="export" class="tab-pane fade">
|
|
|
|
<form class="form-horizontal" data-no-ajax method="post" action="{{ path('attachment_type_export', {'id': entity.id}) }}">
|
|
|
|
|
|
|
|
<div class="form-row">
|
|
|
|
<label class="col-form-label col-md-2">{% trans %}export.format{% endtrans %}</label>
|
|
|
|
<div class="col">
|
|
|
|
<select class="form-control" name="format">
|
|
|
|
<option value="json">JSON</option>
|
|
|
|
<option value="xml">XML</option>
|
|
|
|
<option value="csv">CSV</option>
|
|
|
|
<option value="yaml">YAML</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-row mt-2">
|
|
|
|
<label class="col-form-label col-md-2">{% trans %}export.level{% endtrans %}</label>
|
|
|
|
<div class="col">
|
|
|
|
<select class="form-control" name="level">
|
|
|
|
<option value="simple">{% trans %}export.level.simple{% endtrans %}</option>
|
|
|
|
<option value="extended" selected>{% trans %}export.level.extended{% endtrans %}</option>
|
|
|
|
<option value="full">{% trans %}export.level.full{% endtrans %}</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-row mt-2">
|
|
|
|
<div class="offset-2 col">
|
|
|
|
<div class="form-check abc-checkbox">
|
|
|
|
<input class="form-check-input" name="include_children" id="include_children" type="checkbox" checked>
|
|
|
|
<label class="form-check-label" for="include_children">
|
|
|
|
{% trans %}export.include_children{% endtrans %}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-row mt-2">
|
|
|
|
<div class="offset-2 col">
|
|
|
|
<button type="submit" class="btn btn-primary">{% trans %}export.btn{% endtrans %}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</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 %}
|