mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-12 05:09:33 +00:00
Ermöglicht benutzerdefinierte Synonyme für Datenquellen basierend auf Locale. Synonyme werden in verschiedenen Bereichen wie Bäumen, Übersetzungen und Vorlagen genutzt, um anpassbare Namen anzuzeigen.
64 lines
No EOL
2.7 KiB
Twig
64 lines
No EOL
2.7 KiB
Twig
{% extends "admin/base_admin.html.twig" %}
|
|
|
|
{# @var entity App\Entity\ProjectSystem\Project #}
|
|
|
|
{% block card_title %}
|
|
{% set dataSourceName = get_data_source_name('project', 'project.caption') %}
|
|
{% set translatedSource = 'project.caption'|trans %}
|
|
<i class="fas fa-archive fa-fw"></i> {% if dataSourceName != translatedSource %}{{ 'datasource.synonym'|trans({'%name%': translatedSource, '%synonym%': dataSourceName}) }}{% else %}{{ translatedSource }}{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block edit_title %}
|
|
{% trans %}project.edit{% endtrans %}: {{ entity.name }}
|
|
{% endblock %}
|
|
|
|
{% block new_title %}
|
|
{% trans %}project.new{% endtrans %}
|
|
{% endblock %}
|
|
|
|
{% block additional_pills %}
|
|
<li class="nav-item"><a data-bs-toggle="tab" class="nav-link link-anchor" href="#bom">BOM</a></li>
|
|
{% endblock %}
|
|
|
|
{% block quick_links %}
|
|
<div class="btn-toolbar" style="display: inline-block;">
|
|
<div class="btn-group">
|
|
<a class="btn btn-outline-secondary" href="{{ entity_url(entity) }}"><i class="fas fa-eye fa-fw"></i></a>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block additional_controls %}
|
|
{{ form_row(form.description) }}
|
|
{{ form_row(form.status) }}
|
|
{% if entity.id %}
|
|
<div class="mb-2 row">
|
|
<label class="col-form-label col-sm-3">{% trans %}project.edit.associated_build_part{% endtrans %}</label>
|
|
<div class="col-sm-9">
|
|
{% if entity.buildPart %}
|
|
<span class="form-control-static"><a href="{{ entity_url(entity.buildPart) }}">{{ entity.buildPart.name }}</a></span>
|
|
{% else %}
|
|
<a href="{{ path('part_new_build_part_project', {"project_id": entity.id , "_redirect": uri_without_host(app.request)}) }}"
|
|
class="btn btn-outline-success">{% trans %}project.edit.associated_build_part.add{% endtrans %}</a>
|
|
{% endif %}
|
|
<p class="text-muted">{% trans %}project.edit.associated_build.hint{% endtrans %}</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
{% block additional_panes %}
|
|
<div class="tab-pane" id="bom">
|
|
{% form_theme form.bom_entries with ['form/collection_types_layout.html.twig'] %}
|
|
{{ form_errors(form.bom_entries) }}
|
|
{{ form_widget(form.bom_entries) }}
|
|
{% if entity.id %}
|
|
<a href="{{ path('project_import_bom', {'id': entity.id}) }}" class="btn btn-secondary mb-2"
|
|
{% if not is_granted('edit', entity) %}disabled="disabled"{% endif %}>
|
|
<i class="fa-solid fa-file-import fa-fw"></i>
|
|
{% trans %}project.edit.bom.import_bom{% endtrans %}
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %} |