mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-31 23:39:32 +00:00
Added custom part status (#1053)
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
* Benutzerdefinierten Bauteilstatus einführen * PartCustomStateController hinzufügen * Umstellung Migrationen bzgl. Multi-Plattform-Support. Zunächst MySQL, SQLite Statements integrieren. * Postgre Statements integrieren * Semikolon in Migration entfernen * Migration für PartCustomState aktualisieren * Benutzerdefinierten Bauteilstatus in TableSettings aufnehmen * PartCustomStateControllerTest: Attribute für PHPUnit-Gruppen umgestellt * PartCustomState: Mapping für Parameter korrigieren * PartCustomState: Darstellung und Zuordnung von Anhängen ergänzt Die Sidebar wurde um die Anzeige des benutzerdefinierten Bauteilstatus erweitert, inklusive Vorschaubild, sofern vorhanden. * Migrationen zusammenführen * PartCustomState: Anpassungen bzgl. Tests * PartCustomStateEndpoint hinzufügen * Made custom part states plural for consistency with other entity captions * Fixed phpunit error * Fixed phpstan issues --------- Co-authored-by: Marcel Diegelmann <marcel.diegelmann@gmail.com> Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
This commit is contained in:
parent
600686c32b
commit
14a4f1f437
65 changed files with 2044 additions and 18 deletions
|
|
@ -86,7 +86,7 @@
|
|||
<li class="nav-item">
|
||||
<a data-bs-toggle="tab" class="nav-link link-anchor" href="#attachments">{% trans %}admin.attachments{% endtrans %}</a>
|
||||
</li>
|
||||
{% if entity.parameters is defined %}
|
||||
{% if entity.parameters is defined and showParameters == true %}
|
||||
<li class="nav-item">
|
||||
<a data-bs-toggle="tab" class="nav-link link-anchor" href="#parameters">{% trans %}admin.parameters{% endtrans %}</a>
|
||||
</li>
|
||||
|
|
|
|||
14
templates/admin/part_custom_state_admin.html.twig
Normal file
14
templates/admin/part_custom_state_admin.html.twig
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{% extends "admin/base_admin.html.twig" %}
|
||||
|
||||
{% block card_title %}
|
||||
<i class="fas fa-balance-scale fa-tools"></i> {% trans %}part_custom_state.caption{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block edit_title %}
|
||||
{% trans %}part_custom_state.edit{% endtrans %}: {{ entity.name }}
|
||||
{% endblock %}
|
||||
|
||||
{% block new_title %}
|
||||
{% trans %}part_custom_state.new{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
|
|
@ -2,4 +2,5 @@
|
|||
{{ form_row(form.favorite) }}
|
||||
{{ form_row(form.mass) }}
|
||||
{{ form_row(form.ipn) }}
|
||||
{{ form_row(form.partUnit) }}
|
||||
{{ form_row(form.partUnit) }}
|
||||
{{ form_row(form.partCustomState) }}
|
||||
|
|
@ -36,6 +36,19 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if part.partCustomState is not null %}
|
||||
<div class="mt-1">
|
||||
<h6>
|
||||
<span class="badge bg-primary" title="{% trans %}part_custom_state.caption{% endtrans %}"><i class="fas fa-tools fa-fw"></i> {{ part.partCustomState.name }}</span>
|
||||
|
||||
{% if part.partCustomState is not null and part.partCustomState.masterPictureAttachment and attachment_manager.fileExisting(part.partCustomState.masterPictureAttachment) %}
|
||||
<br/>
|
||||
<img class="img-fluid img-thumbnail thumbnail-sm" src="{{ attachment_thumbnail(part.partCustomState.masterPictureAttachment, 'thumbnail_md') }}" alt="{% trans %}attachment.preview.alt{% endtrans %}" />
|
||||
{% endif %}
|
||||
</h6>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Favorite Status tag #}
|
||||
{% if part.favorite %}
|
||||
<div class="mt-1">
|
||||
|
|
@ -79,4 +92,4 @@
|
|||
</a>
|
||||
</h6>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@
|
|||
{{ form_row(filterForm.favorite) }}
|
||||
{{ form_row(filterForm.needsReview) }}
|
||||
{{ form_row(filterForm.measurementUnit) }}
|
||||
{{ form_row(filterForm.partCustomState) }}
|
||||
{{ form_row(filterForm.mass) }}
|
||||
{{ form_row(filterForm.dbId) }}
|
||||
{{ form_row(filterForm.ipn) }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue