Save element parameters in its own database table (dont use JSON)

This makes it easier to query for specific parameters.
This commit is contained in:
Jan Böhmer 2020-03-11 21:48:47 +01:00
parent a6e0f1738b
commit 719e21c0df
35 changed files with 738 additions and 183 deletions

View file

@ -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.specifications.vars.prototype is defined %}{{ form_widget(form.specifications.vars.prototype)|e('html_attr') }}{% endif %}">
<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 %}">
<thead>
<tr>
<th>{% trans %}specifications.property{% endtrans %}</th>
@ -14,8 +14,8 @@
</tr>
</thead>
<tbody>
{% for spec in form.specifications %}
{{ form_widget(spec) }}
{% for param in form.parameters %}
{{ form_widget(param) }}
{% endfor %}
</tbody>
</table>

View file

@ -64,7 +64,7 @@
</tr>
{% endblock %}
{% block specification_widget %}
{% block parameter_widget %}
<tr>
<td>{{ form_widget(form.name) }}{{ form_errors(form.name) }}</td>
<td>{{ form_widget(form.symbol) }}{{ form_errors(form.symbol) }}</td>