mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-07-29 12:41:40 +00:00
* Add per-parameter "visible in symbol" flag for KiCad EDA export
Introduce a nullable tri-state eda_symbol_visibility on part parameters
that drives the KiCad field's "visible" flag in the EDA HTTP-library API
response. This is independent of the existing eda_visibility, which only
controls whether the parameter is exported as a field at all.
When the per-parameter flag is null, the new system default
KiCadEDASettings::defaultParameterSymbolVisibility applies. Both default
such that exported parameter fields keep their previous behavior
("visible": "False"), so the change is backward compatible.
- Entity: eda_symbol_visibility column + accessors, with matching
serialization groups and a multi-platform migration
- Form: second TriStateCheckboxType, shown for part parameters only
- KiCadHelper: resolve the flag (explicit, else system default) and pass
it to createField()
- Settings: defaultParameterSymbolVisibility (default false)
- Templates: new eye-icon column in the specifications table
- Translations (en) + tests
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Fixed message ids
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
33 lines
No EOL
1.6 KiB
Twig
33 lines
No EOL
1.6 KiB
Twig
{% form_theme form with ['parts/edit/edit_form_styles.html.twig'] %}
|
|
|
|
{% import 'components/collection_type.macro.html.twig' as collection %}
|
|
|
|
<div {{ collection.controller(form.parameters, 'parameter.delete.confirm') }}>
|
|
<table class="table table-striped table-sm table-bordered table-responsive-md" id="specifications_table" {{ collection.target() }}>
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans %}specifications.property{% endtrans %}</th>
|
|
<th>{% trans %}specifications.symbol{% endtrans %}</th>
|
|
<th>{% trans %}specifications.value_min{% endtrans %}</th>
|
|
<th>{% trans %}specifications.value_typ{% endtrans %}</th>
|
|
<th>{% trans %}specifications.value_max{% endtrans %}</th>
|
|
<th>{% trans %}specifications.unit{% endtrans %}</th>
|
|
<th>{% trans %}specifications.text{% endtrans %}</th>
|
|
<th>{% trans %}specifications.group{% endtrans %}</th>
|
|
<th title="{% trans %}specifications.eda_visibility.help{% endtrans %}"><i class="fas fa-bolt fa-fw"></i></th>
|
|
<th title="{% trans %}specifications.eda_symbol_visibility.help{% endtrans %}"><i class="fas fa-eye fa-fw"></i></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for param in form.parameters %}
|
|
{{ form_widget(param) }}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<button type="button" class="btn btn-success" {% if not is_granted('edit', part) %}disabled{% endif %} {{ collection.create_btn() }}>
|
|
<i class="fas fa-plus-square fa-fw"></i>
|
|
{% trans %}specification.create{% endtrans %}
|
|
</button>
|
|
</div> |