mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-31 16:24:54 +02:00
Show parameters on info page & improved parameter editing.
This commit is contained in:
parent
719e21c0df
commit
bc8748e6f4
11 changed files with 1176 additions and 773 deletions
|
@ -1,6 +1,6 @@
|
|||
{% form_theme form with ['Parts/edit/edit_form_styles.html.twig', "bootstrap_4_layout.html.twig"] %}
|
||||
|
||||
<table class="table table-striped table-sm table-responsive-md" id="specifications_table" data-prototype="{% if form.parameters.vars.prototype is defined %}{{ form_widget(form.parameters.vars.prototype)|e('html_attr') }}{% endif %}">
|
||||
<table class="table table-striped table-sm table-bordered table-responsive-md" id="specifications_table" data-prototype="{% if form.parameters.vars.prototype is defined %}{{ form_widget(form.parameters.vars.prototype)|e('html_attr') }}{% endif %}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans %}specifications.property{% endtrans %}</th>
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<td>{{ form_widget(form.unit) }}{{ form_errors(form.unit) }}</td>
|
||||
<td>{{ form_widget(form.value_text) }}{{ form_errors(form.value_text) }}</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-danger order_btn_delete" onclick="delete_specification_entry(this);" title="{% trans %}orderdetail.delete{% endtrans %}">
|
||||
<button type="button" class="btn btn-danger btn-sm order_btn_delete" onclick="delete_specification_entry(this);" title="{% trans %}orderdetail.delete{% endtrans %}">
|
||||
<i class="fas fa-trash-alt fa-fw"></i>
|
||||
</button>
|
||||
{{ form_errors(form) }}
|
||||
|
|
18
templates/Parts/info/_specifications.html.twig
Normal file
18
templates/Parts/info/_specifications.html.twig
Normal file
|
@ -0,0 +1,18 @@
|
|||
{# var \App\Entity\Parts\Part part #}
|
||||
|
||||
<table class="table table-hover table-striped table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans %}specifications.property{% endtrans %}</th>
|
||||
<th>{% trans %}specifications.value{% endtrans %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for param in part.parameters %}
|
||||
<tr>
|
||||
<td>{{ param.name }}</td>
|
||||
<td>{{ param.formattedValue }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
|
@ -57,6 +57,12 @@
|
|||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" role="tab" href="#specifications">
|
||||
<i class="fas fa-atlas fa-fw"></i>
|
||||
{% trans %}part.info.specifications{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="attachment-tab" data-toggle="tab"
|
||||
href="#attachments" role="tab">
|
||||
|
@ -121,6 +127,10 @@
|
|||
{% include "Parts/info/_tools.html.twig" %}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="specifications" role="tabpanel" aria-labelledby="tools-tab">
|
||||
{% include "Parts/info/_specifications.html.twig" %}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="extended_info" role="tabpanel" aria-labelledby="extended_info-tab">
|
||||
|
||||
{% include "Parts/info/_extended_infos.html.twig" %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue