mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-07 15:59:35 +00:00
* Initial plan * Make form column layout configurable with global Twig variables Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com> * Rename form column Twig globals to shorter names: label_col, input_col, offset_col Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com> * Fixed remaining places where offsets where used * Fixed margin of delete button on admin forms * Rename Twig globals: col_label, col_input, offset_label Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com> * Added documentation to our twig class variables --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com> Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
61 lines
2.1 KiB
Twig
61 lines
2.1 KiB
Twig
{% extends "admin/base_admin.html.twig" %}
|
|
|
|
{% block card_title %}
|
|
<i class="fas fa-qrcode fa-fw"></i> {{ type_label_p(entity) }}
|
|
{% endblock %}
|
|
|
|
{% block additional_pills %}
|
|
<li class="nav-item"><a data-bs-toggle="tab" class="nav-link link-anchor" href="#tab_advanced">{% trans %}label_profile.advanced{% endtrans %}</a></li>
|
|
<li class="nav-item"><a data-bs-toggle="tab" class="nav-link link-anchor" href="#tab_comment">{% trans %}label_profile.comment{% endtrans %}</a></li>
|
|
{% endblock %}
|
|
|
|
{% block additional_panes %}
|
|
<div class="tab-pane" id="tab_advanced">
|
|
{{ form_row(form.options.additional_css) }}
|
|
{{ form_widget(form.options) }}
|
|
</div>
|
|
|
|
<div class="tab-pane" id="tab_comment">
|
|
{{ form_widget(form.comment) }}
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block comment %}{% endblock %}
|
|
|
|
{% block additional_controls %}
|
|
{{ form_row(form.show_in_dropdown) }}
|
|
{{ form_row(form.options.supported_element) }}
|
|
<div class="mb-2 row">
|
|
{{ form_label(form.options.width) }}
|
|
<div class="{{ col_input }}">
|
|
<div class="input-group">
|
|
{{ form_widget(form.options.width) }}
|
|
|
|
<span class="input-group-text">x</span>
|
|
|
|
{{ form_widget(form.options.height) }}
|
|
|
|
<span class="input-group-text">mm</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ form_row(form.options.barcode_type) }}
|
|
{{ form_row(form.options.lines) }}
|
|
{% endblock %}
|
|
|
|
{% block additional_content %}
|
|
{% if pdf_data is defined and pdf_data is not empty %}
|
|
<div class="card mt-2 mb-2 p-1 border-secondary" style="resize: vertical; overflow: scroll; height: 250px;">
|
|
<object id="pdf_preview" data="{{ pdf_data | data_uri(mime='application/pdf') }}"style="height: inherit">
|
|
</object>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block edit_title %}
|
|
{% trans %}label_profile.edit{% endtrans %}: <a href="{{ path("label_dialog_profile", {"profile": entity.id}) }}" >{{ entity.name }}</a>
|
|
{% endblock %}
|
|
|
|
{% block new_title %}
|
|
{% trans %}label_profile.new{% endtrans %}
|
|
{% endblock %}
|