Renamed AdminPages/ templates folder to recommended snake_case style

This commit is contained in:
Jan Böhmer 2023-02-04 23:34:39 +01:00
parent 1559b669df
commit a128f40358
32 changed files with 32 additions and 32 deletions

View file

@ -0,0 +1,3 @@
{% import "components/attachments.macro.html.twig" as attachments %}
{{ attachments.attachment_edit_list(form.attachments) }}

View file

@ -0,0 +1,29 @@
<form method="post" class="" action="{{ entity_url(entity, 'delete') }}" {{ stimulus_controller('elements/delete_btn') }} {{ stimulus_action('elements/delete_btn', "submit", "submit") }}
data-delete-title="{% trans with {'%name%': entity.name }%}entity.delete.confirm_title{% endtrans %}"
data-delete-message="{% trans %}entity.delete.message{% endtrans %}">
<input type="hidden" name="_method" value="DELETE">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ entity.id) }}">
<div class="form-group">
<div class=""></div>
<div class="col-sm offset-sm-3 ps-2">
{% set delete_disabled = (not is_granted("delete", entity)) or (entity.group is defined and entity.id == 1) %}
<div class="btn-group">
<button class="btn btn-danger" {% if delete_disabled %}disabled{% endif %}>{% trans %}entity.delete{% endtrans %}</button>
<button type="button" class="btn btn-danger dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="visually-hidden">Toggle Dropdown</span>
</button>
<div class="dropdown-menu p-2">
<div class="form-group"><label for="delete_log_comment">{% trans %}edit.log_comment{% endtrans %}</label>
<input type="text" id="delete_log_comment" name="log_comment" class="form-control">
</div>
</div>
</div>
{% if entity.parent is defined %}
<div class="ms-2 custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="form-check-input" id="recursive" name="delete_recursive">
<label class="form-check-label" for="recursive">{% trans %}entity.delete.recursive{% endtrans %}</label>
</div>
{% endif %}
</div>
</div>
</form>

View file

@ -0,0 +1,5 @@
<div class="row mb-2">
<div class="offset-3 col">
<a class="btn btn-info {% if not is_granted('create', entity) %}disabled{% endif %}" href="{{ entity_url(entity, 'clone') }}">{% trans %}entity.duplicate{% endtrans %}</a>
</div>
</div>

View file

@ -0,0 +1,42 @@
<form class="form-horizontal" method="post" action="{{ path }}" data-turbo="false" data-turbo-frame="_top">
<div class="row">
<label class="col-form-label col-md-3">{% trans %}export.format{% endtrans %}</label>
<div class="col-md-9">
<select class="form-select" name="format">
<option value="json">JSON</option>
<option value="xml">XML</option>
<option value="csv">CSV</option>
<option value="yaml">YAML</option>
</select>
</div>
</div>
<div class="row mt-2">
<label class="col-form-label col-md-3">{% trans %}export.level{% endtrans %}</label>
<div class="col-md-9">
<select class="form-select" name="level">
<option value="simple">{% trans %}export.level.simple{% endtrans %}</option>
<option value="extended" selected>{% trans %}export.level.extended{% endtrans %}</option>
<option value="full">{% trans %}export.level.full{% endtrans %}</option>
</select>
</div>
</div>
<div class="row mt-2">
<div class="offset-md-3 col-sm">
<div class="form-check">
<input class="form-check-input form-check-input" name="include_children" id="include_children" type="checkbox" checked>
<label class="form-check-label form-check-label" for="include_children">
{% trans %}export.include_children{% endtrans %}
</label>
</div>
</div>
</div>
<div class="row mt-2">
<div class="offset-sm-3 col-sm">
<button type="submit" class="btn btn-primary">{% trans %}export.btn{% endtrans %}</button>
</div>
</div>
</form>

View file

@ -0,0 +1,64 @@
{% import "helper.twig" as helper %}
<div class="form-group row">
<label class="col-form-label col-md-4">{% trans %}id.label{% endtrans %}</label>
<div class="col-md-8">
<p class="form-control-plaintext">{% if entity.iD %}{{ entity.id }}{% else %}-{% endif %}</p>
</div>
</div>
<div class="form-group row">
<label class="col-form-label col-md-4">{% trans %}createdAt{% endtrans %}</label>
<div class="col-md-8">
<p class="form-control-plaintext">
{% if entity.id is not null and date(entity.addedDate) > date('1900/01/01') %}
{{ helper.date_user_combination(entity, false, "long") }}
{% else %}
-
{% endif %}
</p>
</div>
</div>
<div class="form-group row">
<label class="col-form-label col-md-4">{% trans %}lastModified{% endtrans %}</label>
<div class="col-md-8">
<p class="form-control-plaintext">
{% if entity.id is not null and date(entity.lastModified) > date('1900/01/01') %}
{{ helper.date_user_combination(entity, true, "long") }}
{% else %}
-
{% endif %}
</p>
</div>
</div>
<div class="form-group row">
<label class="col-form-label col-md-4">{% trans %}entity.info.parts_count{% endtrans %}</label>
<div class="col-md-8">
<p class="form-control-plaintext">
{% if entity.id and partsContainingElement %}
{{ repo.partsCount(entity) }}
{% else %}
-
{% endif %}
</p>
</div>
</div>
{# Check if we really have a structural element #}
{% if entity.parent is defined %}
<div class="form-group row">
<label class="col-form-label col-md-4">{% trans %}entity.info.parts_count_recursive{% endtrans %}</label>
<div class="col-md-8">
<p class="form-control-plaintext">
{% if entity.id and partsContainingElement %}
{{ repo.partsCountRecursive(entity) }}
{% else %}
-
{% endif %}
</p>
</div>
</div>
{% endif %}

View file

@ -0,0 +1,31 @@
{% 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></th>
</tr>
</thead>
<tbody>
{% for param in form.parameters %}
{{ form_widget(param) }}
{% endfor %}
</tbody>
</table>
<button type="button" class="btn btn-success mb-2" {{ collection.create_btn() }} {% if not is_granted('edit', entity) %}disabled{% endif %}>
<i class="fas fa-plus-square fa-fw"></i>
{% trans %}specification.create{% endtrans %}
</button>
</div>

View file

@ -0,0 +1,17 @@
{% extends "admin/base_admin.html.twig" %}
{% block card_title %}
<i class="fas fa-file-alt fa-fw"></i> {% trans %}attachment_type.caption{% endtrans %}
{% endblock %}
{% block additional_controls %}
{{ form_row(form.filetype_filter) }}
{% endblock %}
{% block edit_title %}
{% trans %}attachment_type.edit{% endtrans %}: {{ entity.name }}
{% endblock %}
{% block new_title %}
{% trans %}attachment_type.new{% endtrans %}
{% endblock %}

View file

@ -0,0 +1,195 @@
{% import "components/tree_macros.html.twig" as tree %}
{% extends "main_card.html.twig" %}
{% block title %}
{% if entity.id is null %}
{{ block("new_title") }}
{% else %}
{{ block("edit_title")|striptags }}
{% endif %}
{% endblock %}
{% block card_type %}
{% if timeTravel is defined and timeTravel is not null %}
bg-primary-striped text-white
{% else %}
bg-primary text-white
{% endif %}
{% endblock %}
{% form_theme form.log_comment 'bootstrap_4_layout.html.twig' %}
{% block card_content %}
<div class="row">
<div class="col-sm-4">
<turbo-frame id="admin-tree-frame" target="admin-content-frame" data-turbo-action="advance">
{{ tree.treeview(entity) }}
</turbo-frame>
</div>
<div class="col-sm-8">
<turbo-frame id="admin-content-frame" data-turbo-action="advance" target="content">
<fieldset>
<legend>
{% if entity.ID %}
<strong>{% block edit_title %}{% trans with {'%name': entity.name} %}edit.caption{% endtrans %}{% endblock %}</strong>
{% if timeTravel is defined and timeTravel is not null %}
({{ timeTravel|format_datetime('short') }})
{% endif %}
<span class="float-end">{% block quick_links %}{% endblock %}</span>
{% else %}
<strong>{% block new_title %}{% trans %}new.caption{% endtrans %}{% endblock %}</strong>
{% endif %}
</legend>
{% if timeTravel is defined and timeTravel is not null %}
<b>{% trans with {'%timestamp%': timeTravel|format_datetime('short')} %}part.info.timetravel_hint{% endtrans %}</b>
{% endif %}
{{ form_errors(form) }}
<ul class="nav nav-tabs mt-2">
<li class="nav-item"><a class="link-anchor active nav-link" data-bs-toggle="tab" href="#home">{% trans %}standard.label{% endtrans %}</a></li>
<li class="nav-item"><a data-bs-toggle="tab" class="link-anchor nav-link" href="#info">{% trans %}infos.label{% endtrans %}</a></li>
{% if datatable is defined %}
<li class="nav-item {% if datatable is null %}not-allowed{% endif %}"><a data-bs-toggle="tab" class="link-anchor nav-link {% if datatable is null %}disabled{% endif %}" href="#history">{% trans %}history.label{% endtrans %}</a></li>
{% endif %}
{% if entity.id %}
<li class="nav-item"><a data-bs-toggle="tab" class="link-anchor nav-link" href="#export">{% trans %}export.label{% endtrans %}</a> </li>
{% else %}
<li class="nav-item"><a data-bs-toggle="tab" class="link-anchor nav-link" href="#import_export">{% trans %}import_export.label{% endtrans %}</a> </li>
<li class="nav-item"><a data-bs-toggle="tab" class="link-anchor nav-link" href="#mass_creation">{% trans %}mass_creation.label{% endtrans %}</a></li>
{% endif %}
</ul>
<div class="tab-content mb-3 mt-3">
<div id="home" class="tab-pane fade show active">
{{ form_start(form) }}
<ul class="nav nav-pills mb-2">
<li class="nav-item">
<a data-bs-toggle="tab" class="nav-link link-anchor active" href="#common">{% trans %}admin.common{% endtrans %}</a>
</li>
{% block additional_pills %}{% endblock %}
<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 %}
<li class="nav-item">
<a data-bs-toggle="tab" class="nav-link link-anchor" href="#parameters">{% trans %}admin.parameters{% endtrans %}</a>
</li>
{% endif %}
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="common">
{{ form_row(form.name) }}
{% if form.parent%}
{{ form_row(form.parent) }}
{% endif %}
{% if form.not_selectable is defined %}
{{ form_row(form.not_selectable) }}
{% endif %}
{% block additional_controls %}{% endblock %}
{% block comment %}
{{ form_row(form.comment) }}
{% endblock %}
</div>
{% block additional_panes %}{% endblock %}
<div class="tab-pane" id="attachments">
{% include "admin/_attachments.html.twig" %}
{% block master_picture_block %}
{{ form_row(form.master_picture_attachment) }}
{% endblock %}
</div>
{% if entity.parameters is defined %}
<div id="parameters" class="tab-pane fade">
{% include "admin/_parameters.html.twig" %}
</div>
{% endif %}
</div>
<div class="form-group row">
<div class="col-sm-9 offset-sm-3">
<div class="btn-group">
{{ form_widget(form.save) }}
<button type="button" class="btn {% if entity.id is not null %}btn-primary{% else %}btn-success{% endif %} dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="visually-hidden">Toggle Dropdown</span>
</button>
<div class="dropdown-menu p-2">
{{ form_row(form.log_comment)}}
</div>
</div>
</div>
</div>
{{ form_row(form.reset) }}
{{ form_end(form) }}
{# Only include on existing parts #}
{% if entity.id %}
{{ include('admin/_duplicate.html.twig') }}
{{ include('admin/_delete_form.html.twig') }}
{% endif %}
</div>
<div id="info" class="tab-pane fade">
{% include "admin/_info.html.twig" %}
</div>
{% if datatable is defined and datatable is not null %}
<div id="history" class="tab-pane fade">
{% import "components/history_log_macros.html.twig" as log %}
{{ log.element_history_component(datatable) }}
</div>
{% endif %}
{% if entity.id %}
<div id="export" class="tab-pane fade">
{% include 'admin/_export_form.html.twig' with {'path' : path(route_base ~ '_export', {'id': entity.id})} %}
</div>
{% else %} {# For new element we have a combined import/export tab #}
<div id="import_export" class="tab-pane fade">
{{ form_start(import_form) }}
{{ form_end(import_form) }}
<hr>
<fieldset>
<legend>{% trans %}export_all.label{% endtrans %}</legend>
{% include 'admin/_export_form.html.twig' with {'path' : path('attachment_type_export_all')} %}
</fieldset>
</div>
<div id="mass_creation" class="tab-pane fade">
<div class="row">
<p class="text-muted offset-sm-3 col-sm-9">{% trans %}mass_creation.help{% endtrans %}</p>
</div>
{{ form(mass_creation_form) }}
</div>
{% endif %}
</div>
</fieldset>
{# Include turbo control things, so we can still control page title and reloading #}
{% include "_turbo_control.html.twig" %}
</turbo-frame>
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,27 @@
{% extends "admin/base_admin.html.twig" %}
{% block additional_controls %}
{{ form_row(form.address) }}
{{ form_row(form.phone_number) }}
{{ form_row(form.fax_number) }}
{{ form_row(form.email_address) }}
{{ form_row(form.website) }}
{{ form_row(form.auto_product_url) }}
{% endblock %}
{% block comment %}{% endblock %}
{% block additional_pills %}
<li class="nav-item"><a data-bs-toggle="tab" class="nav-link link-anchor" href="#home_advanced">{% trans %}admin.advanced{% endtrans %}</a></li>
{% endblock %}
{% block additional_panes %}
<div class="tab-pane" id="home_advanced">
{{ form_row(form.comment) }}
</div>
{% endblock %}
{% block quick_links %}
{% import "components/quick_links.macro.html.twig" as quick_links %}
{{ quick_links.company(entity) }}
{% endblock %}

View file

@ -0,0 +1,35 @@
{% extends "admin/base_admin.html.twig" %}
{% block card_title %}
<i class="fas fa-tags fa-fw"></i> {% trans %}category.labelp{% endtrans %}
{% endblock %}
{% block additional_pills %}
<li class="nav-item"><a data-bs-toggle="tab" class="nav-link link-anchor" href="#home_options">{% trans %}admin.options{% endtrans %}</a></li>
<li class="nav-item"><a data-bs-toggle="tab" class="nav-link link-anchor" href="#home_advanced">{% trans %}admin.advanced{% endtrans %}</a></li>
{% endblock %}
{% block edit_title %}
{% trans %}category.edit{% endtrans %}: <a href="{{ path('part_list_category', {'id': entity.id}) }}">{{ entity.name }}</a>
{% endblock %}
{% block new_title %}
{% trans %}category.new{% endtrans %}
{% endblock %}
{% block additional_panes %}
<div class="tab-pane" id="home_options">
{{ form_row(form.disable_footprints) }}
{{ form_row(form.disable_manufacturers) }}
{{ form_row(form.disable_autodatasheets) }}
{{ form_row(form.disable_properties) }}
</div>
<div class="tab-pane" id="home_advanced">
{{ form_row(form.partname_regex) }}
{{ form_row(form.partname_hint) }}
<hr>
{{ form_row(form.default_description) }}
{{ form_row(form.default_comment) }}
</div>
{% endblock %}

View file

@ -0,0 +1,42 @@
{% extends "admin/base_admin.html.twig" %}
{% block card_title %}
<i class="fa-solid fa-coins"></i> {% trans %}currency.caption{% endtrans %}
{% endblock %}
{% block additional_controls %}
{{ form_row(form.iso_code) }}
{% if entity.isoCode %}
<div class="mt-0 mb-3">
<span class="form-text text-muted offset-3 col-9">
<b>{% trans %}currency.iso_code.caption{% endtrans %}:</b> {{ entity.isoCode }}
</span>
<span class="form-text text-muted offset-3 col-9">
<b>{% trans %}currency.symbol.caption{% endtrans %}:</b> {{ entity.isoCode | currency_symbol }}
</span>
</div>
{% endif %}
{{ form_row(form.exchange_rate) }}
{% if entity.inverseExchangeRate %}
<p class="form-text text-muted offset-3 col-9">
{{ '1'|format_currency(default_currency) }} = {{ entity.inverseExchangeRate.tofloat | format_currency(entity.isoCode, {fraction_digit: 5}) }}<br>
{{ '1'|format_currency(entity.isoCode) }} = {{ entity.exchangeRate.tofloat | format_currency(default_currency, {fraction_digit: 5}) }}
</p>
{% endif %}
{% if form.update_exchange_rate is defined %}
{{ form_row(form.update_exchange_rate, {attr: {class: 'btn-info'}}) }}
{% endif %}
{% endblock %}
{% block edit_title %}
{% trans %}currency.edit{% endtrans %}: {{ entity.name }}
{% endblock %}
{% block new_title %}
{% trans %}currency.new{% endtrans %}
{% endblock %}

View file

@ -0,0 +1,18 @@
{% extends "admin/base_admin.html.twig" %}
{% block card_title %}
<i class="fas fa-microchip fa-fw"></i> {% trans %}footprint.labelp{% endtrans %}
{% endblock %}
{% block master_picture_block %}
{{ form_row(form.master_picture_attachment) }}
{{ form_row(form.footprint_3d) }}
{% endblock %}
{% block edit_title %}
{% trans %}footprint.edit{% endtrans %}: <a href="{{ path('part_list_footprint', {'id': entity.id}) }}">{{ entity.name }}</a>
{% endblock %}
{% block new_title %}
{% trans %}footprint.new{% endtrans %}
{% endblock %}

View file

@ -0,0 +1,30 @@
{% extends "admin/base_admin.html.twig" %}
{% block card_title %}
<i class="fas fa-users fa-fw"></i> {% trans %}group.edit.caption{% endtrans %}
{% endblock %}
{% block additional_pills %}
<li class="nav-item"><a data-bs-toggle="tab" class="nav-link link-anchor" href="#tab_permissions">{% trans %}user.edit.permissions{% endtrans %}</a></li>
{% endblock %}
{% block additional_panes %}
<div class="tab-pane" id="tab_permissions">
<input type="hidden" name="_token" value="{{ csrf_token('group' ~ entity.id) }}">
{{ form_row(form.permissions) }}
</div>
{% endblock %}
{% block additional_controls %}
{{ form_row(form.enforce2FA) }}
{% endblock %}
{% block edit_title %}
{% trans %}group.edit{% endtrans %}: {{ entity.name }}
{% endblock %}
{% block new_title %}
{% trans %}group.new{% endtrans %}
{% endblock %}

View file

@ -0,0 +1,61 @@
{% extends "admin/base_admin.html.twig" %}
{% block card_title %}
<i class="fas fa-qrcode fa-fw"></i> {% trans %}label_profile.caption{% endtrans %}
{% 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-sm-9">
<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 %}

View file

@ -0,0 +1,13 @@
{% extends "admin/base_company_admin.html.twig" %}
{% block card_title %}
<i class="fas fa-industry fa-fw"></i> {% trans %}manufacturer.caption{% endtrans %}
{% endblock %}
{% block edit_title %}
{% trans %}manufacturer.edit{% endtrans %}: <a href="{{ path('part_list_manufacturer', {'id': entity.id}) }}">{{ entity.name }}</a>
{% endblock %}
{% block new_title %}
{% trans %}manufacturer.new{% endtrans %}
{% endblock %}

View file

@ -0,0 +1,12 @@
{% extends "admin/base_admin.html.twig" %}
{% block card_title %}
<i class="fas fa-balance-scale fa-fw"></i> {% trans %}measurement_unit.caption{% endtrans %}
{% endblock %}
{% block additional_controls %}
{{ form_row(form.unit) }}
{{ form_row(form.is_integer) }}
{{ form_row(form.use_si_prefix)}}
{% endblock %}

View file

@ -0,0 +1,55 @@
{% extends "admin/base_admin.html.twig" %}
{# @var entity App\Entity\ProjectSystem\Project #}
{% block card_title %}
<i class="fas fa-archive fa-fw"></i> {% trans %}project.caption{% endtrans %}
{% endblock %}
{% block edit_title %}
{% trans %}project.edit{% endtrans %}: {{ entity.name }}
{% endblock %}
{% block new_title %}
{% trans %}project.new{% endtrans %}
{% endblock %}
{% block additional_pills %}
<li class="nav-item"><a data-bs-toggle="tab" class="nav-link link-anchor" href="#bom">BOM</a></li>
{% endblock %}
{% block quick_links %}
<div class="btn-toolbar">
<div class="btn-group">
<a class="btn btn-outline-secondary" href="{{ entity_url(entity) }}"><i class="fas fa-eye fa-fw"></i></a>
</div>
</div>
{% endblock %}
{% block additional_controls %}
{{ form_row(form.description) }}
{{ form_row(form.status) }}
{% if entity.id %}
<div class="mb-2 row">
<label class="col-form-label col-sm-3">{% trans %}project.edit.associated_build_part{% endtrans %}</label>
<div class="col-sm-9">
{% if entity.buildPart %}
<span class="form-control-static"><a href="{{ entity_url(entity.buildPart) }}">{{ entity.buildPart.name }}</a></span>
{% else %}
<a href="{{ path('part_new_build_part', {"project_id": entity.id , "_redirect": app.request.requestUri}) }}"
class="btn btn-outline-success">{% trans %}project.edit.associated_build_part.add{% endtrans %}</a>
{% endif %}
<p class="text-muted">{% trans %}project.edit.associated_build.hint{% endtrans %}</p>
</div>
</div>
{% endif %}
{% endblock %}
{% block additional_panes %}
<div class="tab-pane" id="bom">
{% form_theme form.bom_entries with ['form/collection_types_layout.html.twig'] %}
{{ form_errors(form.bom_entries) }}
{{ form_widget(form.bom_entries) }}
</div>
{% endblock %}

View file

@ -0,0 +1,37 @@
{% extends "admin/base_admin.html.twig" %}
{% import "label_system/dropdown_macro.html.twig" as dropdown %}
{% block card_title %}
<i class="fas fa-cube fa-fw"></i> {% trans %}storelocation.labelp{% endtrans %}
{% endblock %}
{% block additional_controls %}
{% if entity.id %}
<div class="row form-group">
<div class="offset-sm-3 col-sm-9">
{{ dropdown.profile_dropdown('storelocation', entity.id) }}
</div>
</div>
{% endif %}
{% endblock %}
{% block additional_pills %}
<li class="nav-item"><a data-bs-toggle="tab" class="nav-link link-anchor" href="#home_options">{% trans %}admin.options{% endtrans %}</a></li>
{% endblock %}
{% block additional_panes %}
<div class="tab-pane" id="home_options">
{{ form_row(form.storage_type) }}
{{ form_row(form.is_full) }}
{{ form_row(form.limit_to_existing_parts) }}
{{ form_row(form.only_single_part) }}
</div>
{% endblock %}
{% block edit_title %}
{% trans %}storelocation.edit{% endtrans %}: <a href="{{ path('part_list_store_location', {'id': entity.id}) }}">{{ entity.name }}</a>
{% endblock %}
{% block new_title %}
{% trans %}storelocation.new{% endtrans %}
{% endblock %}

View file

@ -0,0 +1,21 @@
{% extends "admin/base_company_admin.html.twig" %}
{% block card_title %}
<i class="fas fa-truck fa-fw"></i> {% trans %}supplier.caption{% endtrans %}
{% endblock %}
{% block additional_panes %}
<div class="tab-pane" id="home_advanced">
{{ form_row(form.default_currency) }}
{{ form_row(form.shipping_costs) }}
{{ form_row(form.comment) }}
</div>
{% endblock %}
{% block edit_title %}
{% trans %}supplier.edit{% endtrans %}: <a href="{{ path('part_list_supplier', {'id': entity.id}) }}">{{ entity.name }}</a>
{% endblock %}
{% block new_title %}
{% trans %}supplier.new{% endtrans %}
{% endblock %}

View file

@ -0,0 +1,92 @@
{% extends "admin/base_admin.html.twig" %}
{% import "helper.twig" as helper %}
{# @var entity \App\Entity\UserSystem\User #}
{% block card_title %}
<i class="fas fa-user fa-fw"></i> {% trans %}user.edit.caption{% endtrans %}
{% endblock %}
{% block comment %}{% endblock %}
{% block additional_pills %}
<li class="nav-item"><a data-bs-toggle="tab" class="nav-link link-anchor" href="#configuration">{% trans %}user.edit.configuration{% endtrans %}</a></li>
<li class="nav-item"><a data-bs-toggle="tab" class="nav-link link-anchor" href="#password">{% trans %}user.edit.password{% endtrans %}</a></li>
<li class="nav-item"><a data-bs-toggle="tab" class="nav-link link-anchor" href="#permissions">{% trans %}user.edit.permissions{% endtrans %}</a></li>
{% endblock %}
{% block additional_controls %}
{{ form_row(form.group) }}
{{ form_row(form.first_name) }}
{{ form_row(form.last_name) }}
{{ form_row(form.email) }}
{{ form_row(form.department) }}
{% endblock %}
{% block additional_panes %}
<div class="tab-pane" id="configuration">
{{ form_row(form.language) }}
{{ form_row(form.timezone) }}
{{ form_row(form.theme) }}
{{ form_row(form.currency) }}
</div>
<div class="tab-pane" id="password">
{{ form_row(form.new_password) }}
{{ form_row(form.need_pw_change) }}
{{ form_row(form.disabled) }}
{% if entity.id is not null %}
<div class="offset-3 mb-3">
<hr>
<h6>{% trans %}user.edit.tfa.caption{% endtrans %}</h6>
<p><b>{% trans %}user.edit.tfa.google_active{% endtrans %}:</b> {{ helper.boolean(entity.googleAuthenticatorEnabled) }}</p>
<p class="mb-0"><b>{% trans %}tfa_backup.remaining_tokens{% endtrans %}:</b> {{ entity.backupCodes | length }}</p>
<p><b>{% trans %}tfa_backup.generation_date{% endtrans %}:</b>
{% if entity.backupCodesGenerationDate is not null %}
{{ entity.backupCodesGenerationDate | format_datetime }}
{% else %}
{% trans %}user.edit.tfa.disabled{% endtrans %}
{% endif %}
</p>
<p><b>{% trans %}user.edit.tfa.u2f_keys_count{% endtrans %}:</b>
{% if entity.webAuthnAuthenticatorEnabled %}
{{ (entity.webauthnKeys | length) + (entity.legacyU2FKeys | length) }}
{% else %}
{% trans %}user.edit.tfa.disabled{% endtrans %}
{% endif %}
</p>
{% set tfa_disable_disabled = not is_granted('set_password', entity) %}
{# Disable button when he has no 2FA activated #}
{% if not entity.webAuthnAuthenticatorEnabled and not entity.googleAuthenticatorEnabled and entity.backupCodes is empty %}
{% set tfa_disable_disabled = true %}
{% endif %}
<input type="hidden" name="_token" value="{{ csrf_token('reset_2fa' ~ entity.id) }}">
<button class="btn btn-warning" {% if tfa_disable_disabled %}disabled="disabled"{% endif %} {{ stimulus_controller('elements/delete_btn') }} {{ stimulus_action('elements/delete_btn', 'click') }}
data-delete-btn data-delete-title="{% trans %}user.edit.tfa.disable_tfa_title{% endtrans %}" data-delete-message="{% trans %}user.edit.tfa.disable_tfa_message{% endtrans %}"
type="submit" name="reset_2fa" value="reset_2fa">{% trans %}user.edit.tfa.disable_tfa.btn{% endtrans %}</button>
</div>
{% endif %}
</div>
<div class="tab-pane" id="permissions">
{{ form_row(form.permissions) }}
</div>
{% endblock %}
{% block edit_title %}
{% trans %}user.edit{% endtrans %}: <a href="{{ path('user_info', {'id': entity.id}) }}">{{ entity.name }}</a>
{% endblock %}
{% block new_title %}
{% trans %}user.new{% endtrans %}
{% endblock %}
{% block quick_links %}
<img src="{{ avatar_helper.avatarURL(entity) }}" style="height: 50px; width: 50px; object-fit: cover;">
{% endblock %}