mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-06 02:59:29 +00:00
* Implementiere bevorzugte Sprachauswahl und Datenquellen-Synonyme Die Spracheinstellungen/System-Settings wurden um die Möglichkeit ergänzt, bevorzugte Sprachen für die Dropdown-Menüs festzulegen. Zudem wurde ein Datenquellen-Synonymsystem implementiert, um benutzerfreundlichere Bezeichnungen anzuzeigen und zu personalisieren. * Anpassung aus Analyse * Entferne alten JSON-basierten Datenquellen-Synonym-Handler Die Verwaltung der Datenquellen-Synonyme wurde überarbeitet, um ein flexibleres und strukturiertes Konzept zu ermöglichen. Der bestehende JSON-basierte Ansatz wurde durch eine neue Service-basierte Architektur ersetzt, die eine bessere Handhabung und Erweiterbarkeit erlaubt. * Ermögliche Rückgabe aller möglichen Sprachoptionen in Verbindung mit den vom Nutzer freigeschalteten. * Removed unnecessary service definition The tag is applied via autoconfiguration * Use default translations for the NotBlank constraint * Started refactoring ElementTypeNameGenerator * Made ElementTypeNameGenerator class readonly * Modified form to work properly with new datastructure * Made the form more beautiful and space saving * Made synonym form even more space saving * Allow to define overrides for any element label there is * Use defined synonyms in ElementTypeNameGenerator * Use ElementTypeNameGenerator where possible * Register synonyms for element types as global translation parameters * Revert changes done to permission layout * Use new synonym system for admin page titles * Removed now unnecessary services * Reworked settings name and translation * Renamed all files to Synonyms * Removed unnecessary translations * Removed unnecessary translations * Fixed duplicate check * Renamed synoynms translations * Use our synonyms for permission translations * Fixed phpstan issue * Added tests --------- Co-authored-by: Marcel Diegelmann <marcel.diegelmann@gmail.com> Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
62 lines
2.4 KiB
Twig
62 lines
2.4 KiB
Twig
{% extends "admin/base_admin.html.twig" %}
|
|
|
|
{# @var entity App\Entity\ProjectSystem\Project #}
|
|
|
|
{% block card_title %}
|
|
<i class="fas fa-archive fa-fw"></i> {{ type_label_p(entity) }}
|
|
{% 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_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 %}
|