mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-05 02:35:16 +02:00
Renamed parts/ templates folder to recommended snake_case style
This commit is contained in:
parent
e8efe81f79
commit
9097220026
41 changed files with 63 additions and 63 deletions
5
templates/parts/edit/_advanced.html.twig
Normal file
5
templates/parts/edit/_advanced.html.twig
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ form_row(form.needsReview) }}
|
||||
{{ form_row(form.favorite) }}
|
||||
{{ form_row(form.mass) }}
|
||||
{{ form_row(form.ipn) }}
|
||||
{{ form_row(form.partUnit) }}
|
5
templates/parts/edit/_attachments.html.twig
Normal file
5
templates/parts/edit/_attachments.html.twig
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% import "components/attachments.macro.html.twig" as attachments %}
|
||||
|
||||
{{ form_row(form.master_picture_attachment) }}
|
||||
|
||||
{{ attachments.attachment_edit_list(form.attachments) }}
|
18
templates/parts/edit/_lots.html.twig
Normal file
18
templates/parts/edit/_lots.html.twig
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% form_theme form with ['parts/edit/edit_form_styles.html.twig'] %}
|
||||
{% import 'components/collection_type.macro.html.twig' as collection %}
|
||||
|
||||
<div {{ collection.controller(form.partLots, 'part_lot.edit.delete.confirm') }}>
|
||||
<table class="table table-striped table-sm" id="lots_table" {{ collection.target() }}>
|
||||
<tbody>
|
||||
{% for lot in form.partLots %}
|
||||
{{ form_widget(lot) }}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<button type="button" class="btn btn-success" {{ collection.create_btn() }}
|
||||
{% if not is_granted('edit', part) %}disabled{% endif %}>
|
||||
<i class="fas fa-plus-square fa-fw"></i>
|
||||
{% trans %}part_lot.create{% endtrans %}
|
||||
</button>
|
||||
</div>
|
15
templates/parts/edit/_main.html.twig
Normal file
15
templates/parts/edit/_main.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{ form_row(form.name) }}
|
||||
{% if part.category is not null and part.category.partnameHint is not empty %}
|
||||
<div class="row">
|
||||
<div class="col-sm-9 offset-sm-3">
|
||||
<p class="form-text help-text"><b>{% trans %}part.edit.name.category_hint{% endtrans %}:</b> {{ part.category.partnameHint }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ form_row(form.description) }}
|
||||
{{ form_row(form.category) }}
|
||||
{{ form_row(form.tags) }}
|
||||
{{ form_row(form.minAmount) }}
|
||||
|
||||
{{ form_row(form.footprint) }}
|
||||
|
4
templates/parts/edit/_manufacturer.html.twig
Normal file
4
templates/parts/edit/_manufacturer.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ form_row(form.manufacturer) }}
|
||||
{{ form_row(form.manufacturer_product_number) }}
|
||||
{{ form_row(form.manufacturer_product_url)}}
|
||||
{{ form_row(form.manufacturing_status) }}
|
18
templates/parts/edit/_orderdetails.html.twig
Normal file
18
templates/parts/edit/_orderdetails.html.twig
Normal file
|
@ -0,0 +1,18 @@
|
|||
{# Leave this template at bootstrap 4 for now, as it otherwise destroys our layout #}
|
||||
{% form_theme form.orderdetails with ['parts/edit/edit_form_styles.html.twig', "bootstrap_4_layout.html.twig"] %}
|
||||
{% import 'components/collection_type.macro.html.twig' as collection %}
|
||||
|
||||
<div {{ collection.controller(form.orderdetails, 'orderdetails.edit.delete.confirm') }}>
|
||||
<table class="table table-striped table-sm table-responsive-md" id="orderdetails_table" {{ collection.target() }}>
|
||||
<tbody>
|
||||
{% for detail in form.orderdetails %}
|
||||
{{ form_widget(detail) }}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<button type="button" class="btn btn-success" {{ collection.create_btn() }}>
|
||||
<i class="fas fa-plus-square fa-fw"></i>
|
||||
{% trans %}orderdetail.create{% endtrans %}
|
||||
</button>
|
||||
</div>
|
31
templates/parts/edit/_specifications.html.twig
Normal file
31
templates/parts/edit/_specifications.html.twig
Normal 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" {% 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>
|
171
templates/parts/edit/edit_form_styles.html.twig
Normal file
171
templates/parts/edit/edit_form_styles.html.twig
Normal file
|
@ -0,0 +1,171 @@
|
|||
{% block pricedetail_widget %}
|
||||
{% form_theme form.currency 'Form/extendedBootstrap4_layout.html.twig' %}
|
||||
{% import 'components/collection_type.macro.html.twig' as collection %}
|
||||
|
||||
<tr>
|
||||
<td>{{ form_widget(form.min_discount_quantity, {'attr': {'class': 'form-control-sm'}}) }} {{ form_errors(form.min_discount_quantity) }}</td>
|
||||
<td>
|
||||
<div class="input-group input-group-sm">
|
||||
{{ form_widget(form.price) }}
|
||||
{{ form_widget(form.currency, {'attr': {'class': 'form-control-sm'}}) }}
|
||||
</div>
|
||||
{{ form_errors(form.price) }}
|
||||
{{ form_errors(form.currency) }}
|
||||
</td>
|
||||
<td>{{ form_widget(form.price_related_quantity, {'attr': {'class': 'form-control-sm'}}) }} {{ form_errors(form.price_related_quantity) }}</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-danger order_btn_delete btn-sm" title="{% trans %}orderdetail.delete{% endtrans %}"
|
||||
{{ collection.delete_btn() }}>
|
||||
<i class="fas fa-trash-alt fa-fw"></i>
|
||||
</button>
|
||||
{{ form_errors(form) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endblock %}
|
||||
|
||||
{% block orderdetail_widget %}
|
||||
{% import 'components/collection_type.macro.html.twig' as collection %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ form_row(form.supplier, {'attr': {'class': 'form-control-sm form-control'}}) }}
|
||||
{{ form_row(form.supplierpartnr, {'attr': {'class': 'form-control-sm'}}) }}
|
||||
{{ form_row(form.supplier_product_url, {'attr': {'class': 'form-control-sm'}}) }}
|
||||
{{ form_widget(form.obsolete) }}
|
||||
</td>
|
||||
<td>
|
||||
<div {{ collection.controller(form.pricedetails, 'pricedetails.edit.delete.confirm') }}>
|
||||
<table class="table table-sm table-bordered" {{ collection.target() }}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans %}pricedetails.edit.min_qty{% endtrans %}</th>
|
||||
<th>{% trans %}pricedetails.edit.price{% endtrans %}</th>
|
||||
<th>{% trans %}pricedetails.edit.price_qty{% endtrans %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for price in form.pricedetails %}
|
||||
{{ form_widget(price) }}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<button type="button" class="btn btn-success" {{ collection.create_pricedetail_btn() }}>
|
||||
<i class="fas fa-plus-square fa-fw"></i>
|
||||
{% trans %}pricedetail.create{% endtrans %}
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-danger order_btn_delete" {{ collection.delete_btn() }} title="{% trans %}orderdetail.delete{% endtrans %}">
|
||||
<i class="fas fa-trash-alt fa-fw"></i>
|
||||
</button>
|
||||
{{ form_errors(form) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endblock %}
|
||||
|
||||
{% block parameter_widget %}
|
||||
{% import 'components/collection_type.macro.html.twig' as collection %}
|
||||
<tr {{ stimulus_controller('pages/parameters_autocomplete', {"url": path('typeahead_parameters', {"query": "__QUERY__", "type": form.vars["type"]})}) }}>
|
||||
<td>{{ form_widget(form.name, {"attr": {"data-pages--parameters-autocomplete-target": "name"}}) }}{{ form_errors(form.name) }}</td>
|
||||
<td {{ stimulus_controller('pages/latex_preview') }}>{{ form_widget(form.symbol, {"attr": {"data-pages--parameters-autocomplete-target": "symbol", "data-pages--latex-preview-target": "input"}}) }}{{ form_errors(form.symbol) }}<span {{ stimulus_target('pages/latex_preview', 'preview') }}></span></td>
|
||||
<td>{{ form_widget(form.value_min) }}{{ form_errors(form.value_min) }}</td>
|
||||
<td>{{ form_widget(form.value_typical) }}{{ form_errors(form.value_typical) }}</td>
|
||||
<td>{{ form_widget(form.value_max) }}{{ form_errors(form.value_max) }}</td>
|
||||
<td {{ stimulus_controller('pages/latex_preview') }}>{{ form_widget(form.unit, {"attr": {"data-pages--parameters-autocomplete-target": "unit", "data-pages--latex-preview-target": "input"}}) }}{{ form_errors(form.unit) }}<span {{ stimulus_target('pages/latex_preview', 'preview') }}></span></td>
|
||||
<td>{{ form_widget(form.value_text) }}{{ form_errors(form.value_text) }}</td>
|
||||
<td>{{ form_widget(form.group) }}{{ form_errors(form.group) }}</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-danger btn-sm order_btn_delete {% if form.parent.vars.allow_delete is defined and not form.parent.vars.allow_delete %}disabled{% endif %}" {{ collection.delete_btn() }} title="{% trans %}orderdetail.delete{% endtrans %}">
|
||||
<i class="fas fa-trash-alt fa-fw"></i>
|
||||
</button>
|
||||
{{ form_errors(form) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endblock %}
|
||||
|
||||
{% block part_lot_widget %}
|
||||
{% import 'components/collection_type.macro.html.twig' as collection %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ form_widget(form) }}
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-danger lot_btn_delete" {{ collection.delete_btn() }}>
|
||||
<i class="fas fa-trash-alt fa-fw"></i>
|
||||
{% trans %}part_lot.delete{% endtrans %}
|
||||
</button>
|
||||
{{ form_errors(form) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endblock %}
|
||||
|
||||
{% block attachment_widget %}
|
||||
{% import 'components/collection_type.macro.html.twig' as collection %}
|
||||
|
||||
<tr {{ stimulus_controller('elements/attachmenttype_change') }}>
|
||||
<td>
|
||||
{{ form_widget(form) }}
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-danger lot_btn_delete" {{ collection.delete_btn() }}>
|
||||
<i class="fas fa-trash-alt fa-fw"></i>
|
||||
{% trans %}attachment.delete{% endtrans %}
|
||||
</button>
|
||||
|
||||
{% set attach = form.vars.value %}
|
||||
|
||||
{% if attach is not null %}
|
||||
{% if attachment_manager.fileExisting(attach) %}
|
||||
{% if not attach.external %}
|
||||
<br><br>
|
||||
<h6>
|
||||
<span class="badge bg-primary">
|
||||
<i class="fas fa-fw {{ ext_to_fa_icon(attach.extension) }}"></i> {{ attach.filename }}
|
||||
</span>
|
||||
<br>
|
||||
<span class="badge bg-secondary">
|
||||
<i class="fas fa-hdd fa-fw"></i> {{ attachment_manager.humanFileSize(attach) }}
|
||||
</span>
|
||||
</h6>
|
||||
{% else %}
|
||||
<br><br>
|
||||
<h6>
|
||||
<span class="badge bg-primary">
|
||||
<i class="fas fa-fw fa-globe"></i> {% trans %}attachment.external{% endtrans %}
|
||||
</span>
|
||||
</h6>
|
||||
{% endif %}
|
||||
|
||||
{% if attach.secure %}
|
||||
<h6>
|
||||
<span class="badge bg-success">
|
||||
<i class="fas fa-fw fa-shield-alt"></i> {% trans %}attachment.secure{% endtrans %}
|
||||
</span>
|
||||
</h6>
|
||||
{% endif %}
|
||||
|
||||
{% if attach.secure and not is_granted('show_private', attach) %}
|
||||
{# Leave blank #}
|
||||
{% elseif attach.picture %}
|
||||
<a href="{{ entity_url(attach, 'file_view') }}" rel="noopener" target="_blank" data-turbo="false">
|
||||
<img class="img-fluid img-thumbnail thumbnail-sm" src="{{ attachment_thumbnail(attach, 'thumbnail_md') }}" alt="{% trans %}attachment.preview.alt{% endtrans %}" />
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ entity_url(attach, 'file_view') }}" rel="noopener" target="_blank" data-turbo="false" class="link-external">{% trans %}attachment.view{% endtrans %}</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<br><br>
|
||||
<h6>
|
||||
<span class="badge bg-warning">
|
||||
<i class="fas fa-exclamation-circle fa-fw"></i> {% trans %}attachment.file_not_found{% endtrans %}
|
||||
</span>
|
||||
</h6>
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{% endblock %}
|
120
templates/parts/edit/edit_part_info.html.twig
Normal file
120
templates/parts/edit/edit_part_info.html.twig
Normal file
|
@ -0,0 +1,120 @@
|
|||
{% extends "main_card.html.twig" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans with {'%name%': part.name} %}part.edit.title{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block card_title %}
|
||||
<i class="fas fa-edit fa-fw" aria-hidden="true"></i>
|
||||
{% trans with {'%name%': part.name} %}part.edit.card_title{% endtrans %}
|
||||
<b><a href="{{ entity_url(part, 'info') }}" class="text-white">{{ part.name }}</a></b>
|
||||
<div class="float-end">
|
||||
{% trans %}id.label{% endtrans %}: {{ part.id }} {% if part.ipn is not empty %}(<i>{{ part.ipn }}</i>){% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block card_content %}
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-bs-toggle="tab" role="tab" href="#common">
|
||||
<i class="fas fa-id-card fa-fw"></i>
|
||||
{% trans %}part.edit.tab.common{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-bs-toggle="tab" role="tab" href="#manufacturer">
|
||||
<i class="fas fa-industry fa-fw"></i>
|
||||
{% trans %}part.edit.tab.manufacturer{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-bs-toggle="tab" role="tab" href="#advanced">
|
||||
<i class="fas fa-shapes fa-fw"></i>
|
||||
{% trans %}part.edit.tab.advanced{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-bs-toggle="tab" role="tab" href="#part_lots">
|
||||
<i class="fas fa-boxes fa-fw"></i>
|
||||
{% trans %}part.edit.tab.part_lots{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-bs-toggle="tab" role="tab" href="#attachments">
|
||||
<i class="fas fa-paperclip fa-fw"></i>
|
||||
{% trans %}part.edit.tab.attachments{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-bs-toggle="tab" role="tab" href="#orderdetails">
|
||||
<i class="fas fa-shopping-cart fa-fw"></i>
|
||||
{% trans %}part.edit.tab.orderdetails{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-bs-toggle="tab" role="tab" href="#specifications">
|
||||
<i class="fas fa-atlas fa-fw"></i>
|
||||
{% trans %}part.edit.tab.specifications{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-bs-toggle="tab" role="tab" href="#comment">
|
||||
<i class="fas fa-sticky-note fa-fw"></i>
|
||||
{% trans %}part.edit.tab.comment{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_start(form) }}
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane fade show active p-2" id="common" role="tabpanel">
|
||||
{% include "parts/edit/_main.html.twig" %}
|
||||
</div>
|
||||
<div class="tab-pane fade p-2" id="manufacturer" role="tabpanel">
|
||||
{% include "parts/edit/_manufacturer.html.twig" %}
|
||||
</div>
|
||||
<div class="tab-pane fade p-2" id="advanced" role="tabpanel">
|
||||
{% include "parts/edit/_advanced.html.twig" %}
|
||||
</div>
|
||||
<div class="tab-pane fade p-2" id="part_lots" role="tabpanel">
|
||||
{% include "parts/edit/_lots.html.twig" %}
|
||||
</div>
|
||||
<div class="tab-pane fade p-2" id="attachments" role="tabpanel">
|
||||
{% include "parts/edit/_attachments.html.twig" %}
|
||||
</div>
|
||||
<div class="tab-pane fade p-2" id="orderdetails" role="tabpanel">
|
||||
{% include "parts/edit/_orderdetails.html.twig" %}
|
||||
</div>
|
||||
<div class="tab-pane fade p-2" id="specifications" role="tabpanel">
|
||||
{% include "parts/edit/_specifications.html.twig" %}
|
||||
</div>
|
||||
<div class="tab-pane fade p-2" id="comment" role="tabpanel">
|
||||
{{ form_widget(form.comment)}}
|
||||
</div>
|
||||
</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 btn-primary 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">
|
||||
{{ form_widget(form.save_and_clone, {'attr': {'class': 'dropdown-item'}}) }}
|
||||
<div class="dropdown-divider"></div>
|
||||
<div class="p-2">
|
||||
{{ form_row(form.log_comment)}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ form_row(form.reset) }}
|
||||
{{ form_errors(form) }}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
9
templates/parts/edit/new_part.html.twig
Normal file
9
templates/parts/edit/new_part.html.twig
Normal file
|
@ -0,0 +1,9 @@
|
|||
{% extends "parts/edit/edit_part_info.html.twig" %}
|
||||
|
||||
{% block card_border %}border-success{% endblock %}
|
||||
{% block card_type %}bg-success text-white{% endblock %}
|
||||
|
||||
{% block card_title %}
|
||||
<i class="fas fa-edit fa-plus-square" aria-hidden="true"></i>
|
||||
{% trans %}part.new.card_title{% endtrans %}
|
||||
{% endblock %}
|
85
templates/parts/info/_attachments_info.html.twig
Normal file
85
templates/parts/info/_attachments_info.html.twig
Normal file
|
@ -0,0 +1,85 @@
|
|||
<table class="table table-striped table-sm table-hover table-responsive-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{% trans %}attachment.name{% endtrans %}</th>
|
||||
<th>{% trans %}attachment.attachment_type{% endtrans %}</th>
|
||||
<th>{% trans %}attachment.file_name{% endtrans %}</th>
|
||||
<th>{% trans %}attachment.file_size{% endtrans %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
{% for attachment in part.attachments %}
|
||||
<tr>
|
||||
<td>
|
||||
{% import "components/attachments.macro.html.twig" as attachments %}
|
||||
{{ attachments.attachment_icon(attachment, attachment_manager) }}
|
||||
</td>
|
||||
<td class="align-middle">{{ attachment.name }}</td>
|
||||
<td class="align-middle">{{ attachment.attachmentType.fullPath }}</td>
|
||||
<td class="align-middle">
|
||||
{% if attachment.external %}
|
||||
<a href="{{ attachment.uRL }}" rel="noopener" target="_blank" class="link-external">{{ attachment.host }}</a>
|
||||
{% else %}
|
||||
{{ attachment.filename }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="align-middle h6">
|
||||
{% if attachment.external %}
|
||||
<span class="badge bg-primary">
|
||||
<i class="fas fa-fw fa-globe"></i> {% trans %}attachment.external{% endtrans %}
|
||||
</span>
|
||||
{% elseif attachment_manager.fileExisting(attachment) %}
|
||||
<span class="badge bg-secondary">
|
||||
<i class="fas fa-hdd fa-fw"></i> {{ attachment_manager.humanFileSize(attachment) }}
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="badge bg-warning">
|
||||
<i class="fas fa-exclamation-circle fa-fw"></i> {% trans %}attachment.file_not_found{% endtrans %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if attachment.secure %}
|
||||
<br><span class="badge bg-success">
|
||||
<i class="fas fa-fw fa-shield-alt"></i> {% trans %}attachment.secure{% endtrans %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if attachment == part.masterPictureAttachment %}
|
||||
<br>
|
||||
<span class="badge bg-primary">
|
||||
<i class="fas fa-id-card"></i> {% trans %}attachment.preview{% endtrans %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td><div class="btn-group" role="group" aria-label="">
|
||||
<a {% if attachment_manager.fileExisting(attachment) %}href="{{ entity_url(attachment, 'file_view') }}"{% endif %} target="_blank"
|
||||
class="btn btn-secondary {% if not attachment_manager.fileExisting(attachment) or (attachment.secure and not is_granted("show_secure", attachment)) %}disabled{% endif %}"
|
||||
data-turbo="false" title="{% trans %}attachment.view{% endtrans %}" rel="noopener">
|
||||
<i class="fas fa-eye fa-fw"></i>
|
||||
</a>
|
||||
<a {% if attachment_manager.fileExisting(attachment) %}href="{{ entity_url(attachment, 'file_download') }}"{% endif %} data-turbo="false"
|
||||
class="btn btn-secondary {% if not attachment_manager.fileExisting(attachment) or (attachment.secure and not is_granted("show_secure", attachment)) %}disabled{% endif %}"
|
||||
title="{% trans %}attachment.download{% endtrans %}">
|
||||
<i class="fas fa-download fa-fw"></i>
|
||||
</a>
|
||||
|
||||
<div class="btn-group" role="group">
|
||||
<button id="btnGroupDrop1" type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-boundary="window">
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="btnGroupDrop1">
|
||||
<span class="text-muted dropdown-item-text" ><i class="fas fa-lightbulb fa-fw"></i> <b>ID:</b> {{ attachment.iD }}</span>
|
||||
<span class="text-muted dropdown-item-text" ><i class="fas fa-calendar fa-fw"></i> <b>{% trans %}createdAt{% endtrans %}:</b> {{ attachment.addedDate | format_datetime("short")}}</span>
|
||||
<span class="text-muted dropdown-item-text" ><i class="fas fa-history fa-fw"></i> <b>{% trans %}createdAt{% endtrans %}:</b> {{ attachment.addedDate | format_datetime("short")}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
66
templates/parts/info/_extended_infos.html.twig
Normal file
66
templates/parts/info/_extended_infos.html.twig
Normal file
|
@ -0,0 +1,66 @@
|
|||
{% import "helper.twig" as helper %}
|
||||
|
||||
<table class="table table-striped table-hover table-sm w-100 table-responsive-sm">
|
||||
<tbody>
|
||||
<tr> {# Creation date #}
|
||||
<td>{% trans %}createdAt{% endtrans %}</td>
|
||||
<td>{{ part.addedDate | format_datetime("long")}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{% trans %}user.creating_user{% endtrans %}</td>
|
||||
<td>{% if is_granted('show_history', part) %}
|
||||
{{ creating_user(part).fullName(true) ?? 'Unknown'|trans }}
|
||||
{% else %}
|
||||
{% trans %}accessDenied{% endtrans %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr> {# Last modified date #}
|
||||
<td>{% trans %}lastModified{% endtrans %}</td>
|
||||
<td>{{ part.lastModified | format_datetime("long")}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{% trans %}user.last_editing_user{% endtrans %}</td>
|
||||
<td>{% if is_granted('show_history', part) %}
|
||||
{{ last_editing_user(part).fullName(true) ?? 'Unknown'|trans }}
|
||||
{% else %}
|
||||
{% trans %}accessDenied{% endtrans %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr> {# ID #}
|
||||
<td>{% trans %}id.label{% endtrans %}</td>
|
||||
<td>{{ part.iD }}</td>
|
||||
</tr>
|
||||
|
||||
<tr> {# IPN #}
|
||||
<td>{% trans %}part.edit.ipn{% endtrans %}</td>
|
||||
<td>{{ part.ipn ?? 'part.ipn.not_defined'|trans }}</td>
|
||||
</tr>
|
||||
|
||||
<tr> {# Favorite status #}
|
||||
<td>{% trans %}part.isFavorite{% endtrans %}</td>
|
||||
<td>{{ helper.boolean_badge(part.favorite) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr> {# Build status #}
|
||||
<td>{% trans %}part.is_build_part{% endtrans %}</td>
|
||||
<td>{{ helper.boolean_badge(part.projectBuildPart) }}
|
||||
{% if part.projectBuildPart %}(<a href="{{ entity_url(part.builtProject, "edit") }}">{{ part.builtProject.name }}</a>){% endif %}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{% trans %}part.minOrderAmount{% endtrans %}</td>
|
||||
<td>{% if pricedetail_helper.minOrderAmount(part) %}
|
||||
{{ pricedetail_helper.minOrderAmount(part) | format_amount(part.partUnit) }}
|
||||
{% else %}
|
||||
{% trans %}Unknown{% endtrans %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
6
templates/parts/info/_history.html.twig
Normal file
6
templates/parts/info/_history.html.twig
Normal file
|
@ -0,0 +1,6 @@
|
|||
<div class="mt-2">
|
||||
{% if datatable is not null %}
|
||||
{% import "components/history_log_macros.html.twig" as log %}
|
||||
{{ log.element_history_component(datatable) }}
|
||||
{% endif %}
|
||||
</div>
|
74
templates/parts/info/_main_infos.html.twig
Normal file
74
templates/parts/info/_main_infos.html.twig
Normal file
|
@ -0,0 +1,74 @@
|
|||
{% import "helper.twig" as helper %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-lg-4 col-3 mt-auto mb-auto">
|
||||
{% include "parts/info/_picture.html.twig" %}
|
||||
</div>
|
||||
<div class="col-md-9 col-lg-8 col-7">
|
||||
<h5 class="text-muted pt-2" title="{% trans %}manufacturer.label{% endtrans %}">
|
||||
{% if part.manufacturer %}
|
||||
{% if part.manufacturer.id is not null %}
|
||||
<a href="{{ entity_url(part.manufacturer, 'list_parts') }}">{{ part.manufacturer.name}}</a>
|
||||
{% else %}
|
||||
{{ part.manufacturer.name }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if part.manufacturerProductUrl %}
|
||||
<small>
|
||||
<a class="link-external" href="{{ part.manufacturerProductUrl }}" rel="noopener" target="_blank">{{ part.manufacturerProductNumber }}</a>
|
||||
</small>
|
||||
{% else %}
|
||||
<small>{{ part.manufacturerProductNumber }}</small>
|
||||
{% endif %}
|
||||
</h5>
|
||||
<h3 class="w-fit" title="{% trans %}name.label{% endtrans %}">{{ part.name }}
|
||||
{# You need edit permission to use the edit button #}
|
||||
{% if timeTravel is not null %}
|
||||
<a href="{{ entity_url(part, 'info') }}"><i title="{% trans %}part.back_to_info{% endtrans %}" class="fas fa-fw fa-arrow-circle-left"></i></a>
|
||||
{% elseif is_granted('edit', part) %}
|
||||
<a href="{{ entity_url(part, 'edit') }}"><i class="fas fa-fw fa-sm fa-edit"></i></a>
|
||||
{% endif %}
|
||||
</h3>
|
||||
<h6 class="text-muted w-fit" title="{% trans %}description.label{% endtrans %}"><span>{{ part.description|format_markdown(true) }}</span></h6>
|
||||
<h6 class="">
|
||||
<i class="fas fa-tag fa-fw" title="{% trans %}category.label{% endtrans %}"></i>
|
||||
<span class="text-muted">{{ helper.structural_entity_link(part.category) }}</span>
|
||||
</h6>
|
||||
<h6><i class="fas fa-shapes fa-fw"></i>
|
||||
<span class="text-muted">
|
||||
<span title="{% trans %}instock.label{% endtrans %}">{{ part.amountSum | format_amount(part.partUnit) }}</span>
|
||||
/
|
||||
<span title="{% trans %}mininstock.label{% endtrans %}">{{ part.minAmount | format_amount(part.partUnit) }}</span>
|
||||
</span>
|
||||
</h6>
|
||||
<h6 class="">
|
||||
<i class="fas fa-microchip fa-fw" title="{% trans %}footprint.label{% endtrans %}"></i>
|
||||
<span class="text-muted">{{ helper.structural_entity_link(part.footprint) }}</span>
|
||||
</h6>
|
||||
|
||||
{% set min_order_amount = pricedetail_helper.minOrderAmount(part) %}
|
||||
{% set max_order_amount = pricedetail_helper.maxDiscountAmount(part) %}
|
||||
{% set max_order_price = pricedetail_helper.calculateAvgPrice(part, max_order_amount, app.user.currency ?? null) %}
|
||||
{% if max_order_price is not null %}
|
||||
<h6>
|
||||
<i class="fas fa-money-bill-alt fa-fw"></i>
|
||||
<span class="text-muted">
|
||||
<span title="{% trans %}part.avg_price.label{% endtrans %} {{ max_order_amount | format_amount(part.partUnit) }}">{{ max_order_price | format_money(app.user.currency ?? null) }}</span>
|
||||
{% if min_order_amount < max_order_amount %}
|
||||
<span> - </span>
|
||||
<span title="{% trans %}part.avg_price.label{% endtrans %} {{ min_order_amount | format_amount(part.partUnit) }}">{{pricedetail_helper.calculateAvgPrice(part, min_order_amount, app.user.currency ?? null ) | format_money(app.user.currency ?? null) }}</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
</h6>
|
||||
{% endif %}
|
||||
{#
|
||||
{% if part.comment != "" %}
|
||||
<h6 title="{% trans %}comment.label{% endtrans %}">
|
||||
<i class="fas fa-comment-alt fa-fw"></i>
|
||||
<div class="d-inline-flex">
|
||||
<span class="text-muted">{{ part.comment|nl2br }}</span>
|
||||
</div>
|
||||
</h6>
|
||||
{% endif %} #}
|
||||
</div>
|
||||
</div>
|
83
templates/parts/info/_order_infos.html.twig
Normal file
83
templates/parts/info/_order_infos.html.twig
Normal file
|
@ -0,0 +1,83 @@
|
|||
<div class="table-responsive">
|
||||
<table class="table table-striped table-header table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans %}part.supplier.name{% endtrans %}</th>
|
||||
<th>{% trans %}part.supplier.partnr{% endtrans %}</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for order in part.orderdetails %}
|
||||
<tr class="{% if order.obsolete %}table-danger{% endif %}">
|
||||
<td>
|
||||
<a href="{{ entity_url(order.supplier, 'list_parts') }}">{{ order.supplier.name }}</a>
|
||||
</td>
|
||||
<td>{% if order.supplierProductUrl is not empty %}
|
||||
<a href="{{ order.supplierProductUrl }}" rel="noopener" target="_blank" class="link-external">{{ order.supplierPartNr }}</a>
|
||||
{% else %}
|
||||
{{ order.supplierPartNr }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if order.pricedetails is not empty %}
|
||||
<table class="table table-bordered table-sm table-striped table-hover">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>{% trans %}part.order.minamount{% endtrans %}</th>
|
||||
<th>{% trans %}part.order.price{% endtrans %}</th>
|
||||
<th>
|
||||
{% trans %}part.order.single_price{% endtrans %}
|
||||
{% if part.partUnit %}
|
||||
/ 1 {{ part.partUnit.unit }}
|
||||
{% endif %}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for detail in order.pricedetails %}
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
{{ detail.MinDiscountQuantity | format_amount(part.partUnit) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ detail.price | format_money(detail.currency) }} / {{ detail.PriceRelatedQuantity | format_amount(part.partUnit) }}
|
||||
{% set tmp = pricedetail_helper.convertMoneyToCurrency(detail.price, detail.currency) %}
|
||||
{% if detail.currency != (app.user.currency ?? null) and tmp is not null and tmp.GreaterThan(0) %}
|
||||
<span class="text-muted">({{ pricedetail_helper.convertMoneyToCurrency(detail.price, detail.currency, app.user.currency ?? null) | format_money(app.user.currency ?? null) }})</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ detail.PricePerUnit | format_money(detail.currency) }}
|
||||
{% set tmp = pricedetail_helper.convertMoneyToCurrency(detail.PricePerUnit, detail.currency) %}
|
||||
{% if detail.currency != (app.user.currency ?? null) and tmp is not null and tmp.GreaterThan(0) %}
|
||||
<span class="text-muted">({{ pricedetail_helper.convertMoneyToCurrency(detail.PricePerUnit, detail.currency, app.user.currency ?? null) | format_money(app.user.currency ?? null) }})</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td> {# Action for order information #}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-info btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Action
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<span class="text-muted dropdown-item-text" ><i class="fas fa-lightbulb fa-fw"></i> <b>ID:</b> {{ order.iD }}</span>
|
||||
<span class="text-muted dropdown-item-text" ><i class="fas fa-history fa-fw"></i> <b>{% trans %}createdAt{% endtrans %}:</b> {{ order.addedDate | format_datetime("short")}}</span>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#"><i class="fas fa-edit fa-fw"></i> {% trans %}edit.caption_short{% endtrans %}</a>
|
||||
<a class="dropdown-item" href="#"><i class="fas fa-trash fa-fw"></i> {% trans %}delete.caption{% endtrans %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
97
templates/parts/info/_part_lots.html.twig
Normal file
97
templates/parts/info/_part_lots.html.twig
Normal file
|
@ -0,0 +1,97 @@
|
|||
{% import "helper.twig" as helper %}
|
||||
{% import "LabelSystem/dropdown_macro.html.twig" as dropdown %}
|
||||
|
||||
{% include "parts/info/_withdraw_modal.html.twig" %}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans %}part_lots.description{% endtrans %}</th>
|
||||
<th>{% trans %}part_lots.storage_location{% endtrans %}</th>
|
||||
<th>{% trans %}part_lots.amount{% endtrans %}</th>
|
||||
<th></th> {# Tags row #}
|
||||
<th></th>
|
||||
<th></th> {# Button row #}
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for lot in part.partLots %}
|
||||
<tr>
|
||||
<td>{{ lot.description }}</td>
|
||||
<td>
|
||||
{% if lot.storageLocation %}
|
||||
{{ helper.structural_entity_link(lot.storageLocation) }}
|
||||
{% else %}
|
||||
<span class="badge rounded-pill bg-warning">
|
||||
<i class="fas fa-question-circle fa-fw"></i> {% trans %}part_lots.location_unknown{% endtrans %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if lot.instockUnknown %}
|
||||
<span class="badge rounded-pill bg-warning">
|
||||
<i class="fas fa-question-circle fa-fw"></i> {% trans %}part_lots.instock_unknown{% endtrans %}
|
||||
</span>
|
||||
{% else %}
|
||||
{{ lot.amount | format_amount(part.partUnit, {'decimals': 5}) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<h6>
|
||||
{% if lot.expirationDate %}
|
||||
<span class="badge bg-info" title="{% trans %}part_lots.expiration_date{% endtrans %}">
|
||||
<i class="fas fa-calendar-alt fa-fw"></i> {{ lot.expirationDate | format_date() }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if lot.expired %}
|
||||
<br>
|
||||
<span class="badge bg-warning">
|
||||
<i class="fas fa-exclamation-circle fa-fw"></i>
|
||||
{% trans %}part_lots.is_expired{% endtrans %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if lot.needsRefill %}
|
||||
<br>
|
||||
<span class="badge bg-warning">
|
||||
<i class="fas fa-dolly fa-fw"></i>
|
||||
{% trans %}part_lots.need_refill{% endtrans %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</h6>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-outline-primary" data-bs-toggle="modal" data-bs-target="#withdraw-modal"
|
||||
data-action="withdraw" data-lot-id="{{ lot.id }}" data-lot-amount="{{ lot.amount }}"
|
||||
title="{% trans %}part.info.withdraw_modal.title.withdraw{% endtrans %}"
|
||||
{% if not is_granted('withdraw', lot) or not withdraw_add_helper.canWithdraw(lot) %}disabled{% endif %}
|
||||
>
|
||||
<i class="fa-solid fa-minus fa-fw"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-primary" data-bs-toggle="modal" data-bs-target="#withdraw-modal"
|
||||
data-action="add" data-lot-id="{{ lot.id }}" data-lot-amount="{{ lot.amount }}"
|
||||
title="{% trans %}part.info.withdraw_modal.title.add{% endtrans %}"
|
||||
{% if not is_granted('add', lot) or not withdraw_add_helper.canAdd(lot) %}disabled{% endif %}
|
||||
>
|
||||
<i class="fa-solid fa-plus fa-fw"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-primary" data-bs-toggle="modal" data-bs-target="#withdraw-modal"
|
||||
data-action="move" data-lot-id="{{ lot.id }}" data-lot-amount="{{ lot.amount }}"
|
||||
title="{% trans %}part.info.withdraw_modal.title.move{% endtrans %}"
|
||||
{% if not is_granted('move', lot) or not withdraw_add_helper.canWithdraw(lot) or part.partLots.count == 1 %}disabled{% endif %}
|
||||
>
|
||||
<i class="fa-solid fa-right-left fa-fw"></i>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{{ dropdown.profile_dropdown('part_lot', lot.id, false) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
42
templates/parts/info/_picture.html.twig
Normal file
42
templates/parts/info/_picture.html.twig
Normal file
|
@ -0,0 +1,42 @@
|
|||
{% if not pictures is empty %}
|
||||
{# <img src="{{ part.masterPictureAttachment | entityURL('file_view') }}" class="img-fluid img-thumbnail bg-light" alt="Part main image" height="300" width="300"> #}
|
||||
|
||||
<div id="pictureCarousel" class="carousel slide mb-2" data-bs-interval="false" data-bs-ride="false">
|
||||
<div class="carousel-indicators">
|
||||
{% for pic in pictures %}
|
||||
<button type="button" data-bs-target="#pictureCarousel" data-bs-slide-to="{{ loop.index0 }}" {% if loop.first %}class="active" aria-current="true"{% endif %} aria-label="{{ pic.name }}"></button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="carousel-inner">
|
||||
{% for pic in pictures %}
|
||||
{# @var pic App\Entity\Attachments\Attachment #}
|
||||
<div class="carousel-item {% if loop.first %}active{% endif %}">
|
||||
<a href="{{ entity_url(pic, 'file_view') }}" data-turbo="false" target="_blank" rel="noopener">
|
||||
<img class="d-block w-100 img-fluid img-thumbnail bg-light" src="{{ entity_url(pic, 'file_view') }}" alt="">
|
||||
<div class="mask"></div>
|
||||
<div class="carousel-caption-hover">
|
||||
<div class="carousel-caption">
|
||||
<div><b>{{ pic.name }}</b></div>
|
||||
<div>{% if pic.filename %}({{ pic.filename }}) {% endif %}</div>
|
||||
<div>{{ entity_type_label(pic.element) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if pictures | length > 1 %}
|
||||
<button type="button" class="carousel-control-prev" data-bs-target="#pictureCarousel" role="button" data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">{% trans %}part.info.prev_picture{% endtrans %}</span>
|
||||
</button>
|
||||
<button type="button" class="carousel-control-next" data-bs-target="#pictureCarousel" role="button" data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">{% trans %}part.info.next_picture{% endtrans %}</span>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<img src="{{ asset('img/part_placeholder.svg') }}" class="img-fluid img-thumbnail bg-light mb-2" alt="Part main image" height="300" width="300">
|
||||
{% endif %}
|
35
templates/parts/info/_projects.html.twig
Normal file
35
templates/parts/info/_projects.html.twig
Normal file
|
@ -0,0 +1,35 @@
|
|||
{% import "components/attachments.macro.html.twig" as attachments %}
|
||||
{% import "helper.twig" as helper %}
|
||||
|
||||
<table class="table table-striped table-sm table-hover table-responsive-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{% trans %}entity.info.name{% endtrans %}</th>
|
||||
<th>{% trans %}description.label{% endtrans %}</th>
|
||||
<th>{% trans %}project.bom.quantity{% endtrans %}</th>
|
||||
<th>{% trans %}project.bom.mountnames{% endtrans %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for bom_entry in part.projectBomEntries %}
|
||||
{# @var bom_entry App\Entity\Project\ProjectBOMEntry #}
|
||||
<tr>
|
||||
<td>{% if bom_entry.project.masterPictureAttachment is not null %}{{ attachments.attachment_icon(bom_entry.project.masterPictureAttachment, attachment_manager) }}{% endif %}</td>
|
||||
<td><a href="{{ path('project_info', {'id': bom_entry.project.iD}) }}">{{ bom_entry.project.name }}</a></td> {# Name #}
|
||||
<td>{{ bom_entry.project.description|format_markdown }}</td> {# Description #}
|
||||
<td>{{ bom_entry.quantity | format_amount(part.partUnit) }}</td>
|
||||
<td>{% for tag in bom_entry.mountnames|split(',') %}
|
||||
<span class="badge bg-secondary badge-secondary" >{{ tag | trim }}</span>
|
||||
{% endfor %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a class="btn btn-success" {% if not is_granted('@projects.edit') %}disabled{% endif %}
|
||||
href="{{ path('project_add_parts_no_id', {"parts": part.id, "_redirect": app.request.requestUri}) }}">
|
||||
<i class="fa-solid fa-magnifying-glass-plus fa-fw"></i>
|
||||
{% trans %}part.info.add_part_to_project{% endtrans %}
|
||||
</a>
|
70
templates/parts/info/_sidebar.html.twig
Normal file
70
templates/parts/info/_sidebar.html.twig
Normal file
|
@ -0,0 +1,70 @@
|
|||
{% import "helper.twig" as helper %}
|
||||
|
||||
{% if timeTravel is not null %}
|
||||
<b class="mb-2">{% trans with {'%timestamp%': timeTravel|format_datetime('short')} %}part.info.timetravel_hint{% endtrans %}</b>
|
||||
{% endif %}
|
||||
|
||||
{% if part.projectBuildPart %}
|
||||
<b class="mb-2">{% trans %}part.info.projectBuildPart.hint{% endtrans %}: <a href="{{ entity_url(part.builtProject) }}">{{ part.builtProject.name }}</a></b>
|
||||
{% endif %}
|
||||
|
||||
<div class="mb-3">
|
||||
<span class="text-muted" title="{% trans %}lastModified{% endtrans %}">
|
||||
<i class="fas fa-history fa-fw"></i> {{ helper.date_user_combination(part, true) }}
|
||||
</span>
|
||||
<br>
|
||||
<span class="text-muted mt-1" title="{% trans %}createdAt{% endtrans %}">
|
||||
<i class="fas fa-calendar-plus fa-fw"></i> {{ helper.date_user_combination(part, false) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{# Part mass #}
|
||||
{% if part.mass %}
|
||||
<div>
|
||||
<h6>
|
||||
<span class="badge bg-secondary" title="{% trans %}part.mass.tooltip{% endtrans %}"><i class="fas fa-weight-hanging fa-fw"></i> {{ part.mass | format_si("g") }}</span>
|
||||
</h6>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Needs Review tag #}
|
||||
{% if part.needsReview %}
|
||||
<div class="mt-1">
|
||||
<h6>
|
||||
<span class="badge bg-warning"><i class="fas fa-ambulance fa-fw"></i> {% trans %}part.needs_review.badge{% endtrans %}</span>
|
||||
</h6>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Favorite Status tag #}
|
||||
{% if part.favorite %}
|
||||
<div class="mt-1">
|
||||
<h6>
|
||||
<span class="badge bg-success"><i class="fas fa-award fa-fw"></i> {% trans %}part.favorite.badge{% endtrans %}</span>
|
||||
</h6>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if part.obsolete %}
|
||||
<div class="mt-1">
|
||||
<h6>
|
||||
<span class="badge bg-danger"><i class="fas fa-ghost fa-fw"></i> {% trans %}part.obsolete.badge{% endtrans %}</span>
|
||||
</h6>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Manufacturing status tag #}
|
||||
<div class="mt-1">
|
||||
<h6>
|
||||
{{ helper.m_status_to_badge(part.manufacturingStatus) }}
|
||||
</h6>
|
||||
</div>
|
||||
|
||||
{# Show tags #}
|
||||
{% if part.tags is not empty %}
|
||||
<div class="mt-1">
|
||||
<h6 style="line-height: 1.5;">
|
||||
{{ helper.string_to_tags(part.tags) }}
|
||||
</h6>
|
||||
</div>
|
||||
{% endif %}
|
17
templates/parts/info/_specifications.html.twig
Normal file
17
templates/parts/info/_specifications.html.twig
Normal file
|
@ -0,0 +1,17 @@
|
|||
{# var \App\Entity\Parts\Part part #}
|
||||
{% import "helper.twig" as helper %}
|
||||
|
||||
{% for name, parameters in part.groupedParameters %}
|
||||
{% if name is not empty %}<h5 class="mt-1">{{ name }}</h5>{% endif %}
|
||||
{{ helper.parameters_table(parameters) }}
|
||||
{% endfor %}
|
||||
|
||||
{% if description_params is not empty %}
|
||||
<h5 class="mt-1">{% trans %}parameters.extracted_from_description{% endtrans %}</h5>
|
||||
{{ helper.parameters_table(description_params) }}
|
||||
{% endif %}
|
||||
|
||||
{% if comment_params is not empty %}
|
||||
<h5 class="mt-1">{% trans %}parameters.auto_extracted_from_comment{% endtrans %}</h5>
|
||||
{{ helper.parameters_table(comment_params) }}
|
||||
{% endif %}
|
60
templates/parts/info/_tools.html.twig
Normal file
60
templates/parts/info/_tools.html.twig
Normal file
|
@ -0,0 +1,60 @@
|
|||
{% import "LabelSystem/dropdown_macro.html.twig" as dropdown %}
|
||||
|
||||
{% if is_granted('edit', part) %}
|
||||
<a href="{{ entity_url(part, 'edit') }}" class="btn btn-primary mt-3">
|
||||
<i class="fas fa-fw fa-edit"></i>
|
||||
{% trans %}part.edit.btn{% endtrans %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if is_granted('create', part) %}
|
||||
<br>
|
||||
<div class="btn-group mt-2">
|
||||
<a class="btn btn-primary" href="{{ entity_url(part, 'clone') }}">
|
||||
<i class="fas fa-clone"></i>
|
||||
{% trans %}part.clone.btn{% endtrans %}
|
||||
</a>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu" role="menu">
|
||||
<a class="dropdown-item" href="{{ entity_url(part, 'create') }}">
|
||||
<i class="fas fa-plus-square"></i>
|
||||
{% trans %}part.create.btn{% endtrans %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" class="mt-2" action="{{ entity_url(part, 'delete') }}"
|
||||
{{ stimulus_controller('elements/delete_btn') }} {{ stimulus_action('elements/delete_btn', "submit", "submit") }}
|
||||
data-delete-title="{% trans with {'%name%': part.name }%}part.delete.confirm_title{% endtrans %}"
|
||||
data-delete-message="{% trans %}part.delete.message{% endtrans %}">
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ part.id) }}">
|
||||
<div class="form-group">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-danger" {% if not is_granted("delete", part) %}disabled{% endif %}>
|
||||
<i class="fa fa-trash fa-fw"></i>
|
||||
{% trans %}part.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>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{{ dropdown.profile_dropdown('part', part.id) }}
|
||||
|
||||
<a class="btn btn-success mt-2" {% if not is_granted('@projects.edit') %}disabled{% endif %}
|
||||
href="{{ path('project_add_parts_no_id', {"parts": part.id, "_redirect": app.request.requestUri}) }}">
|
||||
<i class="fa-solid fa-magnifying-glass-plus fa-fw"></i>
|
||||
{% trans %}part.info.add_part_to_project{% endtrans %}
|
||||
</a>
|
61
templates/parts/info/_withdraw_modal.html.twig
Normal file
61
templates/parts/info/_withdraw_modal.html.twig
Normal file
|
@ -0,0 +1,61 @@
|
|||
<div class="modal fade" id="withdraw-modal" tabindex="-1" aria-labelledby="withdraw-modal-title" aria-hidden="true" {{ stimulus_controller('pages/part_withdraw_modal') }}>
|
||||
<form method="post" action="{{ path('part_add_withdraw', {"id": part.id}) }}">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="withdraw-modal-title"
|
||||
data-withdraw="{% trans %}part.info.withdraw_modal.title.withdraw{% endtrans %}"
|
||||
data-add="{% trans %}part.info.withdraw_modal.title.add{% endtrans %}"
|
||||
data-move="{% trans %}part.info.withdraw_modal.title.move{% endtrans %}"
|
||||
>Filled by JS Controller</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{# non visible form elements #}
|
||||
<input type="hidden" name="lot_id" value="">
|
||||
<input type="hidden" name="action" value="">
|
||||
<input type="hidden" name="_csfr" value="{{ csrf_token('part_withraw' ~ part.iD) }}">
|
||||
<input type="hidden" name="_redirect" value="{{ app.request.requestUri }}">
|
||||
|
||||
<div class="row mb-2">
|
||||
<label class="col-form-label col-sm-3">
|
||||
{% trans %}part.info.withdraw_modal.amount{% endtrans %}
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" required class="form-control" min="0" step="{{ (part.partUnit and not part.partUnit.integer) ? 'any' : '1' }}" name="amount" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-2 d-none" id="withdraw-modal-move-to">
|
||||
<label class="col-form-label col-sm-3">{% trans %}part.info.withdraw_modal.move_to{% endtrans %}</label>
|
||||
<div class="col-sm-9">
|
||||
{% for lots in part.partLots|filter(l => l.instockUnknown == false) %}
|
||||
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="target_id" value="{{ lots.iD }}" id="modal_target_radio_{{ lots.iD }}" {% if not withdraw_add_helper.canAdd(lots) %}disabled{% endif %} required {% if loop.first %}checked{% endif %}>
|
||||
<label class="form-check-label" for="modal_target_radio_{{ lots.iD }}">
|
||||
{{ (lots.storageLocation) ? lots.storageLocation.fullPath : ("Lot " ~ loop.index) }}{% if lots.name is not empty %} ({{ lots.name }}){% endif %}: <b>{{ lots.amount | format_amount(part.partUnit) }}</b>
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-2">
|
||||
<label class="col-form-label col-sm-3">
|
||||
{% trans %}part.info.withdraw_modal.comment{% endtrans %}
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="comment" value="">
|
||||
<div id="emailHelp" class="form-text">{% trans %}part.info.withdraw_modal.comment.hint{% endtrans %}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans %}modal.close{% endtrans %}</button>
|
||||
<button type="submit" class="btn btn-primary">{% trans %}modal.submit{% endtrans %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
171
templates/parts/info/show_part_info.html.twig
Normal file
171
templates/parts/info/show_part_info.html.twig
Normal file
|
@ -0,0 +1,171 @@
|
|||
{% extends "main_card.html.twig" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}part.info.title{% endtrans %} {{ part.name }}
|
||||
{% endblock %}
|
||||
|
||||
{% block card_type %}
|
||||
|
||||
{% if timeTravel == null %}
|
||||
bg-primary text-white
|
||||
{% else %}
|
||||
bg-primary-striped text-white
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block card_title %}
|
||||
<i class="fa {{ part.favorite ? 'fa-star' : 'fa-info-circle'}} fa-fw" aria-hidden="true"></i>
|
||||
{% trans %}part.info.title{% endtrans %} <b>"{{ part.name }}"</b>
|
||||
{% if timeTravel != null %}
|
||||
<i>({{ timeTravel | format_datetime('short') }})</i>
|
||||
{% endif %}
|
||||
{% if part.projectBuildPart %}
|
||||
(<i>{{ entity_type_label(part.builtProject) }}</i>: <a class="text-white" href="{{ entity_url(part.builtProject) }}">{{ part.builtProject.name }}</a>)
|
||||
{% endif %}
|
||||
<div class="float-end">
|
||||
{% trans %}id.label{% endtrans %}: {{ part.id }} {% if part.ipn is not empty %}(<i>{{ part.ipn }}</i>){% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block card_content %}
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
{% include "parts/info/_main_infos.html.twig" %}
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 offset-md-0 col-9 offset-3">
|
||||
{% include "parts/info/_sidebar.html.twig" %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<div class="">
|
||||
<ul class="nav nav-tabs" id="partTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if part.partLots %}active{% endif %}" id="part_lots-tab" data-bs-toggle="tab"
|
||||
href="#part_lots" role="tab">
|
||||
<i class="fas fa-box fa-fw"></i>
|
||||
{% trans %}part.part_lots.label{% endtrans %}
|
||||
<span class="badge bg-secondary">{{ part.partLots | length }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% if part.comment is not empty %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="comment-tab" data-bs-toggle="tab"
|
||||
href="#comment" role="tab">
|
||||
<i class="fas fa-comment-alt fa-fw"></i>
|
||||
{% trans %}comment.label{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if part.parameters is not empty or description_params is not empty or comment_params is not empty %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-bs-toggle="tab" role="tab" href="#specifications">
|
||||
<i class="fas fa-atlas fa-fw"></i>
|
||||
{% trans %}part.info.specifications{% endtrans %}
|
||||
<span class="badge bg-secondary">{{ part.parameters | length }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if part.attachments is not empty %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="attachment-tab" data-bs-toggle="tab"
|
||||
href="#attachments" role="tab">
|
||||
<i class="fas fa-paperclip fa-fw"></i>
|
||||
{% trans %}attachment.labelp{% endtrans %}
|
||||
<span class="badge bg-secondary">{{ part.attachments | length }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if part.orderdetails is not empty %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="supplier-tab" data-bs-toggle="tab" href="#suppliers" role="tab">
|
||||
<i class="fas fa-shopping-cart fa-fw"></i>
|
||||
{% trans %}vendor.partinfo.shopping_infos{% endtrans %}
|
||||
<span class="badge bg-secondary">{{ part.orderdetails | length }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="nav-item {% if datatable is null %}not-allowed{% endif %}">
|
||||
<a class="nav-link {% if datatable is null %}disabled{% endif %}" id="history-tab" data-bs-toggle="tab" href="#history" role="tab">
|
||||
<i class="fas fa-history"></i>
|
||||
{% trans %}vendor.partinfo.history{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
{% if part.projectBomEntries is not empty %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="projects-tab" data-bs-toggle="tab" href="#projects" role="tab">
|
||||
<i class="fas fa-archive fa-fw"></i>
|
||||
{% trans %}project.labelp{% endtrans %}
|
||||
<span class="badge bg-secondary">{{ part.projectBomEntries | length }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="tools-tab" data-bs-toggle="tab" href="#tools" role="tab">
|
||||
<i class="fas fa-tools"></i>
|
||||
{% trans %}tools.label{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="extended_info-tab" data-bs-toggle="tab" href="#extended_info" role="tab">
|
||||
<i class="fas fa-clipboard-list"></i>
|
||||
{% trans %}extended_info.label{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="tab-content" id="myTabContent">
|
||||
{% if part.comment is not empty %}
|
||||
<div class="tab-pane fade show" id="comment" role="tabpanel" aria-labelledby="home-tab">
|
||||
<div class="container-fluid mt-2 latex" data-controller="common--latex">
|
||||
{{ part.comment|format_markdown }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="tab-pane fade show active" id="part_lots" role="tabpanel" aria-labelledby="part_lots-tab">
|
||||
{% include "parts/info/_part_lots.html.twig" %}
|
||||
</div>
|
||||
|
||||
{% if part.attachments is not empty %}
|
||||
<div class="tab-pane fade" id="attachments" role="tabpanel" aria-labelledby="attachment-tab">
|
||||
{% include "parts/info/_attachments_info.html.twig" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if part.orderdetails is not empty %}
|
||||
<div class="tab-pane fade" id="suppliers" role="tabpanel" aria-labelledby="supplier-tab">
|
||||
{% include "parts/info/_order_infos.html.twig" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="tab-pane fade" id="projects" role="tabpanel" aria-labelledby="projects-tab">
|
||||
{% include "parts/info/_projects.html.twig" %}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="history" role="tabpanel" aria-labelledby="history-tab">
|
||||
{% include "parts/info/_history.html.twig" %}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="tools" role="tabpanel" aria-labelledby="tools-tab">
|
||||
{% include "parts/info/_tools.html.twig" %}
|
||||
</div>
|
||||
|
||||
{% if part.parameters is not empty or description_params is not empty or comment_params is not empty %}
|
||||
<div class="tab-pane fade" id="specifications" role="tabpanel" aria-labelledby="tools-tab">
|
||||
{% include "parts/info/_specifications.html.twig" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="tab-pane fade" id="extended_info" role="tabpanel" aria-labelledby="extended_info-tab">
|
||||
|
||||
{% include "parts/info/_extended_infos.html.twig" %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
6
templates/parts/lists/_action_bar.html.twig
Normal file
6
templates/parts/lists/_action_bar.html.twig
Normal file
|
@ -0,0 +1,6 @@
|
|||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
<a href="{{ path('part_new', url_options) }}" class="btn btn-success float-start {% if not is_granted("@parts.create") or (entity is defined and entity.notSelectable) %}disabled{% endif %}"><i class="fas fa-plus-square fa-fw"></i>
|
||||
{% trans%}part.create.btn{% endtrans %}</a>
|
||||
</div>
|
||||
</div>
|
138
templates/parts/lists/_filter.html.twig
Normal file
138
templates/parts/lists/_filter.html.twig
Normal file
|
@ -0,0 +1,138 @@
|
|||
<div class="accordion-item">
|
||||
<div class="accordion-header">
|
||||
<button class="accordion-button collapsed py-2" type="button" data-bs-toggle="collapse" data-bs-target="#filterFormCollapse" aria-expanded="false" aria-controls="filterFormCollapse"><i class="fa-solid fa-filter fa-fw"></i> {% trans %}filter.title{% endtrans %}</button>
|
||||
</div>
|
||||
<div id="filterFormCollapse" class="accordion-collapse collapse" data-bs-parent="#listAccordion">
|
||||
<div class="accordion-body">
|
||||
<ul class="nav nav-tabs" id="filterTabs" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="filter-common-tab" data-bs-toggle="tab" data-bs-target="#filter-common"><i class="fas fa-id-card fa-fw"></i> {% trans %}part.edit.tab.common{% endtrans %}</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="filter-manufacturer-tab" data-bs-toggle="tab" data-bs-target="#filter-manufacturer"><i class="fas fa-industry fa-fw"></i> {% trans %}part.edit.tab.manufacturer{% endtrans %}</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="filter-advanced-tab" data-bs-toggle="tab" data-bs-target="#filter-advanced"><i class="fas fa-shapes fa-fw"></i> {% trans %}part.edit.tab.advanced{% endtrans %}</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="filter-stocks-tab" data-bs-toggle="tab" data-bs-target="#filter-stocks"><i class="fas fa-boxes fa-fw"></i> {% trans %}part.edit.tab.part_lots{% endtrans %}</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="filter-attachments-tab" data-bs-toggle="tab" data-bs-target="#filter-attachments"><i class="fas fa-paperclip fa-fw"></i> {% trans %}part.edit.tab.attachments{% endtrans %}</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="filter-orderdetails-tab" data-bs-toggle="tab" data-bs-target="#filter-orderdetails"><i class="fas fa-shopping-cart fa-fw"></i> {% trans %}part.edit.tab.orderdetails{% endtrans %}</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="filter-parameters-tab" data-bs-toggle="tab" data-bs-target="#filter-parameters"><i class="fas fa-atlas fa-fw"></i> {% trans %}part.edit.tab.specifications{% endtrans %}</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_start(filterForm, {"attr": {"data-controller": "helpers--form-cleanup", "data-action": "helpers--form-cleanup#submit"}}) }}
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active pt-3" id="filter-common" role="tabpanel" aria-labelledby="filter-common-tab" tabindex="0">
|
||||
{{ form_row(filterForm.name) }}
|
||||
{{ form_row(filterForm.description) }}
|
||||
{{ form_row(filterForm.category) }}
|
||||
{{ form_row(filterForm.footprint) }}
|
||||
{{ form_row(filterForm.tags) }}
|
||||
{{ form_row(filterForm.comment) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane pt-3" id="filter-manufacturer" role="tabpanel" aria-labelledby="filter-manufacturer-tab" tabindex="0">
|
||||
{{ form_row(filterForm.manufacturer) }}
|
||||
{{ form_row(filterForm.manufacturing_status) }}
|
||||
{{ form_row(filterForm.manufacturer_product_number) }}
|
||||
{{ form_row(filterForm.manufacturer_product_url) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane pt-3" id="filter-advanced" role="tabpanel" aria-labelledby="filter-advanced-tab" tabindex="0">
|
||||
{{ form_row(filterForm.favorite) }}
|
||||
{{ form_row(filterForm.needsReview) }}
|
||||
{{ form_row(filterForm.measurementUnit) }}
|
||||
{{ form_row(filterForm.mass) }}
|
||||
{{ form_row(filterForm.dbId) }}
|
||||
{{ form_row(filterForm.ipn) }}
|
||||
{{ form_row(filterForm.lastModified) }}
|
||||
{{ form_row(filterForm.addedDate) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane pt-3" id="filter-stocks" role="tabpanel" aria-labelledby="filter-stocks-tab" tabindex="0">
|
||||
{{ form_row(filterForm.storelocation) }}
|
||||
{{ form_row(filterForm.minAmount) }}
|
||||
{{ form_row(filterForm.amountSum) }}
|
||||
{{ form_row(filterForm.lotCount) }}
|
||||
{{ form_row(filterForm.lotExpirationDate) }}
|
||||
{{ form_row(filterForm.lotDescription) }}
|
||||
{{ form_row(filterForm.lotNeedsRefill) }}
|
||||
{{ form_row(filterForm.lotUnknownAmount) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane pt-3" id="filter-attachments" role="tabpanel" aria-labelledby="filter-attachments-tab" tabindex="0">
|
||||
{{ form_row(filterForm.attachmentsCount) }}
|
||||
{{ form_row(filterForm.attachmentType) }}
|
||||
{{ form_row(filterForm.attachmentName) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane pt-3" id="filter-orderdetails" role="tabpanel" aria-labelledby="filter-orderdetails-tab" tabindex="0">
|
||||
{{ form_row(filterForm.supplier) }}
|
||||
{{ form_row(filterForm.orderdetailsCount) }}
|
||||
{{ form_row(filterForm.obsolete) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane pt-3" id="filter-parameters" role="tabpanel" aria-labelledby="filter-parameters-tab" tabindex="0">
|
||||
{% import 'components/collection_type.macro.html.twig' as collection %}
|
||||
{{ form_row(filterForm.parametersCount) }}
|
||||
|
||||
<div {{ collection.controller(filterForm.parameters) }}>
|
||||
<table class="table table-striped table-sm" id="lots_table" {{ collection.target() }}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans %}specifications.property{% endtrans %}</th>
|
||||
<th>{% trans %}specifications.symbol{% endtrans %}</th>
|
||||
<th>{% trans %}specifications.value{% endtrans %}</th>
|
||||
<th>{% trans %}specifications.unit{% endtrans %}</th>
|
||||
<th>{% trans %}specifications.text{% endtrans %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for param in filterForm.parameters %}
|
||||
{{ form_widget(param) }}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<button type="button" class="btn btn-success" {{ collection.create_btn() }}>
|
||||
<i class="fas fa-plus-square fa-fw"></i>
|
||||
{% trans %}filter.constraint.add{% endtrans %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{{ form_row(filterForm.submit) }}
|
||||
{{ form_row(filterForm.discard) }}
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-9 offset-sm-3">
|
||||
<button type="button" class="btn btn-danger" {{ stimulus_action('helpers/form_cleanup', 'clearAll') }}>{% trans %}filter.clear_filters{% endtrans %}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Retain the query parameters of the search form if it is existing #}
|
||||
{% if searchFilter is defined %}
|
||||
{% for property, value in searchFilter|to_array %}
|
||||
<input type="hidden" name="{{ property }}" data-no-clear="true" value="{{ value }}">
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{{ form_end(filterForm) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
139
templates/parts/lists/_info_card.html.twig
Normal file
139
templates/parts/lists/_info_card.html.twig
Normal file
|
@ -0,0 +1,139 @@
|
|||
{% import "helper.twig" as helper %}
|
||||
{% import "LabelSystem/dropdown_macro.html.twig" as dropdown %}
|
||||
|
||||
{{ helper.breadcrumb_entity_link(entity) }}
|
||||
|
||||
<div class="accordion mb-4" id="listAccordion">
|
||||
<div class="accordion-item">
|
||||
<div class="accordion-header">
|
||||
<button class="accordion-button collapsed py-2" data-bs-toggle="collapse" data-bs-target="#entityInfo">
|
||||
{% if entity.masterPictureAttachment is not null and attachment_manager.isFileExisting(entity.masterPictureAttachment) %}
|
||||
<img class="hoverpic ms-0 me-1 d-inline" {{ stimulus_controller('elements/hoverpic') }} data-thumbnail="{{ entity_url(entity.masterPictureAttachment, 'file_view') }}" src="{{ attachment_thumbnail(entity.masterPictureAttachment, 'thumbnail_sm') }}">
|
||||
{% else %}
|
||||
{{ helper.entity_icon(entity, "me-1") }}
|
||||
{% endif %}
|
||||
{{ header_label | trans }}: <b>{{ entity.name }}</b>
|
||||
</button>
|
||||
</div>
|
||||
<div id="entityInfo" class="accordion-collapse collapse" data-bs-parent="#listAccordion">
|
||||
<div class="accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
|
||||
<a class="nav-link active" id="v-pills-home-tab" data-bs-toggle="pill" href="#v-pills-home" role="tab" aria-controls="v-pills-home" aria-selected="true">
|
||||
<i class="fas fa-info-circle fa-fw"></i>
|
||||
{% trans %}entity.info.common.tab{% endtrans %}
|
||||
</a>
|
||||
<a class="nav-link" id="v-pills-statistics-tab" data-bs-toggle="pill" href="#v-pills-statistics" role="tab" aria-controls="v-pills-profile" aria-selected="false">
|
||||
<i class="fas fa-chart-pie fa-fw"></i>
|
||||
{% trans %}entity.info.statistics.tab{% endtrans %}
|
||||
</a>
|
||||
{% if entity.attachments is not empty %}
|
||||
<a class="nav-link" id="v-pills-attachments-tab" data-bs-toggle="pill" href="#v-pills-attachments" role="tab" aria-controls="v-pills-attachments" aria-selected="false">
|
||||
<i class="fas fa-paperclip fa-fw"></i>
|
||||
{% trans %}entity.info.attachments.tab{% endtrans %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if entity.parameters is not empty %}
|
||||
<a class="nav-link" id="v-pills-parameters-tab" data-bs-toggle="pill" href="#v-pills-parameters" role="tab" aria-controls="v-pills-parameters" aria-selected="false">
|
||||
<i class="fas fa-atlas fa-fw"></i>
|
||||
{% trans %}entity.info.parameters.tab{% endtrans %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if entity.comment is not empty %}
|
||||
<a class="nav-link" id="v-pills-comment-tab" data-bs-toggle="pill" href="#v-pills-comment" role="tab">
|
||||
<i class="fas fa-comment-alt fa-fw"></i>
|
||||
{% trans %}comment.label{% endtrans %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<div class="tab-content" id="v-pills-tabContent">
|
||||
<div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">
|
||||
<div class="row">
|
||||
<div class="col-sm-9 form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4">{% trans %}entity.info.name{% endtrans %}:</label>
|
||||
<span class="col-sm form-control-static">{{ entity.name }}</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4">{% trans %}entity.info.parent{% endtrans %}:</label>
|
||||
<span class="col-sm form-control-static">
|
||||
{% if entity.parent %}
|
||||
{{ entity.parent.fullPath }}
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
{% block quick_links %}{% endblock %}
|
||||
|
||||
<a class="btn btn-secondary w-100 mb-2" href="{{ entity_url(entity, 'edit') }}">
|
||||
<i class="fas fa-edit"></i> {% trans %}entity.edit.btn{% endtrans %}
|
||||
</a>
|
||||
<div class="">
|
||||
<span class="text-muted" title="{% trans %}lastModified{% endtrans %}">
|
||||
<i class="fas fa-history fa-fw"></i> {{ entity.lastModified | format_datetime("short") }}
|
||||
</span>
|
||||
<br>
|
||||
<span class="text-muted mt-1" title="{% trans %}createdAt{% endtrans %}">
|
||||
<i class="fas fa-calendar-plus fa-fw"></i> {{ entity.addedDate | format_datetime("short") }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{% if entity is instanceof("App\\Entity\\Parts\\Storelocation") %}
|
||||
{{ dropdown.profile_dropdown('storelocation', entity.id, true, 'btn-secondary w-100 mt-2') }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="v-pills-statistics" role="tabpanel" aria-labelledby="v-pills-statistics-tab">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4">{% trans %}entity.info.children_count{% endtrans %}:</label>
|
||||
<span class="col-sm form-control-static">{{ entity.children | length }}</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4">{% trans %}entity.info.parts_count{% endtrans %}:</label>
|
||||
<span class="col-sm form-control-static">{{ repo.partsCount(entity) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if entity.attachments is not empty %}
|
||||
<div class="tab-pane fade" id="v-pills-attachments" role="tabpanel" aria-labelledby="v-pills-attachments-tab">
|
||||
{% include "parts/info/_attachments_info.html.twig" with {"part": entity} %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if entity.parameters is not empty %}
|
||||
<div class="tab-pane fade" id="v-pills-parameters" role="tabpanel" aria-labelledby="v-pills-parameters-tab">
|
||||
{% for name, parameters in entity.groupedParameters %}
|
||||
{% if name is not empty %}<h5 class="mt-1">{{ name }}</h5>{% endif %}
|
||||
{{ helper.parameters_table(parameters) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if entity.comment is not empty %}
|
||||
<div class="tab-pane fade" id="v-pills-comment" role="tabpanel" aria-labelledby="home-tab">
|
||||
<div class="container-fluid mt-2 latex" data-controller="common--latex">
|
||||
{{ entity.comment|format_markdown }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if filterForm is defined %}
|
||||
{% include "parts/lists/_filter.html.twig" %}
|
||||
{% endif %}
|
||||
</div>
|
3
templates/parts/lists/_parts_list.html.twig
Normal file
3
templates/parts/lists/_parts_list.html.twig
Normal file
|
@ -0,0 +1,3 @@
|
|||
{% import "components/datatables.macro.html.twig" as datatables %}
|
||||
|
||||
{{ datatables.partsDatatableWithForm(datatable) }}
|
30
templates/parts/lists/all_list.html.twig
Normal file
30
templates/parts/lists/all_list.html.twig
Normal file
|
@ -0,0 +1,30 @@
|
|||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}parts_list.all.title{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="accordion mb-3" id="listAccordion">
|
||||
<div class="accordion-item">
|
||||
<div class="accordion-header">
|
||||
<button class="accordion-button collapsed py-2" data-bs-toggle="collapse" data-bs-target="#searchInfo" disabled>
|
||||
<i class="fa-solid fa-globe fa-fw"></i>
|
||||
{% trans %}parts_list.all.title{% endtrans %}
|
||||
</button>
|
||||
</div>
|
||||
<div id="searchInfo" class="accordion-collapse collapse" data-bs-parent="#listAccordion">
|
||||
<div class="accordion-body">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include "parts/lists/_filter.html.twig" %}
|
||||
</div>
|
||||
|
||||
{% include "parts/lists/_action_bar.html.twig" with {'url_options': {}} %}
|
||||
{% include "parts/lists/_parts_list.html.twig" %}
|
||||
|
||||
{% endblock %}
|
15
templates/parts/lists/category_list.html.twig
Normal file
15
templates/parts/lists/category_list.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}parts_list.category.title{% endtrans %} {{ entity.name }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include "parts/lists/_info_card.html.twig" with {'header_label': 'category.label'} %}
|
||||
|
||||
{% include "parts/lists/_action_bar.html.twig" with {'url_options': {'category': entity.iD}} %}
|
||||
|
||||
{% include "parts/lists/_parts_list.html.twig" %}
|
||||
|
||||
{% endblock %}
|
15
templates/parts/lists/footprint_list.html.twig
Normal file
15
templates/parts/lists/footprint_list.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}parts_list.footprint.title{% endtrans %} {{ entity.name }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include "parts/lists/_info_card.html.twig" with {'header_label': 'footprint.label'} %}
|
||||
|
||||
{% include "parts/lists/_action_bar.html.twig" with {'url_options': {'footprint': entity.iD}} %}
|
||||
|
||||
{% include "parts/lists/_parts_list.html.twig" %}
|
||||
|
||||
{% endblock %}
|
22
templates/parts/lists/manufacturer_list.html.twig
Normal file
22
templates/parts/lists/manufacturer_list.html.twig
Normal file
|
@ -0,0 +1,22 @@
|
|||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}parts_list.manufacturer.title{% endtrans %} {{ entity.name }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% embed "parts/lists/_info_card.html.twig" with {'header_label': 'manufacturer.label'} %}
|
||||
{% block quick_links %}
|
||||
<div class="mb-2">
|
||||
{% import "components/quick_links.macro.html.twig" as quick_links %}
|
||||
{{ quick_links.company(entity) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
|
||||
{% include "parts/lists/_action_bar.html.twig" with {'url_options': {'manufacturer': entity.iD}} %}
|
||||
|
||||
{% include "parts/lists/_parts_list.html.twig" %}
|
||||
|
||||
{% endblock %}
|
82
templates/parts/lists/search_list.html.twig
Normal file
82
templates/parts/lists/search_list.html.twig
Normal file
|
@ -0,0 +1,82 @@
|
|||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}parts_list.search.title{% endtrans %}: {{ keyword }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="accordion mb-3" id="listAccordion">
|
||||
<div class="accordion-item">
|
||||
<div class="accordion-header">
|
||||
<button class="accordion-button collapsed py-2" data-bs-toggle="collapse" data-bs-target="#searchInfo">
|
||||
<i class="fa-solid fa-magnifying-glass fa-fw"></i>
|
||||
{% trans %}parts_list.search.title{% endtrans %}: <b>{{ keyword }}</b>
|
||||
</button>
|
||||
</div>
|
||||
<div id="searchInfo" class="accordion-collapse collapse" data-bs-parent="#listAccordion">
|
||||
<div class="accordion-body">
|
||||
<h4>{% trans with {"%keyword%": keyword} %}parts_list.search.searching_for{% endtrans %}</h4>
|
||||
{% trans %}parts_list.search_options.caption{% endtrans %}:
|
||||
|
||||
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" disabled {% if searchFilter.name %}checked{% endif %}>
|
||||
<label class="form-check-label justify-content-start">{% trans %}name.label{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" disabled {% if searchFilter.category %}checked{% endif %}>
|
||||
<label class="form-check-label justify-content-start">{% trans %}category.label{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" disabled {% if searchFilter.description %}checked{% endif %}>
|
||||
<label class="form-check-label justify-content-start">{% trans %}description.label{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" disabled {% if searchFilter.mpn %}checked{% endif %}>
|
||||
<label class="form-check-label justify-content-start">{% trans %}part.edit.mpn{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" disabled {% if searchFilter.tags %}checked{% endif %}>
|
||||
<label class="form-check-label justify-content-start">{% trans %}tags.label{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" disabled {% if searchFilter.storelocation %}checked{% endif %}>
|
||||
<label class="form-check-label justify-content-start">{% trans %}storelocation.label{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" disabled {% if searchFilter.comment %}checked{% endif %}>
|
||||
<label class="form-check-label justify-content-start">{% trans %}comment.label{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" disabled {% if searchFilter.ordernr %}checked{% endif %}>
|
||||
<label for="search_supplierpartnr" class="form-check-label justify-content-start">{% trans %}ordernumber.label.short{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" disabled {% if searchFilter.supplier %}checked{% endif %}>
|
||||
<label for="search_supplier" class="form-check-label justify-content-start">{% trans %}supplier.label{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" disabled {% if searchFilter.manufacturer %}checked{% endif %}>
|
||||
<label for="search_manufacturer" class="form-check-label justify-content-start">{% trans %}manufacturer.label{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" disabled {% if searchFilter.footprint %}checked{% endif %}>
|
||||
<label for="search_footprint" class="form-check-label justify-content-start">{% trans %}footprint.label{% endtrans %}</label>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" disabled {% if searchFilter.regex %}checked{% endif %}>
|
||||
<label for="regex" class="form-check-label justify-content-start">{% trans %}search.regexmatching{% endtrans %}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% include "parts/lists/_filter.html.twig" %}
|
||||
</div>
|
||||
|
||||
{% include "parts/lists/_parts_list.html.twig" %}
|
||||
|
||||
{% endblock %}
|
15
templates/parts/lists/store_location_list.html.twig
Normal file
15
templates/parts/lists/store_location_list.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}parts_list.storelocation.title{% endtrans %} {{ entity.name }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include "parts/lists/_info_card.html.twig" with {'header_label': 'storelocation.label'} %}
|
||||
|
||||
{% include "parts/lists/_action_bar.html.twig" with {'url_options': {'storelocation': entity.iD}} %}
|
||||
|
||||
{% include "parts/lists/_parts_list.html.twig" %}
|
||||
|
||||
{% endblock %}
|
22
templates/parts/lists/supplier_list.html.twig
Normal file
22
templates/parts/lists/supplier_list.html.twig
Normal file
|
@ -0,0 +1,22 @@
|
|||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}parts_list.supplier.title{% endtrans %} {{ entity.name }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% embed "parts/lists/_info_card.html.twig" with {'header_label': 'supplier.label'} %}
|
||||
{% block quick_links %}
|
||||
<div class="mb-2">
|
||||
{% import "components/quick_links.macro.html.twig" as quick_links %}
|
||||
{{ quick_links.company(entity) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
|
||||
{% include "parts/lists/_action_bar.html.twig" with {'url_options': {'supplier': entity.iD}} %}
|
||||
|
||||
{% include "parts/lists/_parts_list.html.twig" %}
|
||||
|
||||
{% endblock %}
|
31
templates/parts/lists/tags_list.html.twig
Normal file
31
templates/parts/lists/tags_list.html.twig
Normal file
|
@ -0,0 +1,31 @@
|
|||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}parts_list.tags.title{% endtrans %} {{ tag }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="accordion mb-3" id="listAccordion">
|
||||
<div class="accordion-item">
|
||||
<div class="accordion-header">
|
||||
<button class="accordion-button collapsed py-2" data-bs-toggle="collapse" data-bs-target="#searchInfo" disabled>
|
||||
<i class="fa-solid fa-tags fa-fw"></i>
|
||||
{% trans %}parts_list.tags.title{% endtrans %} <span class="badge bg-primary">{{ tag }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="searchInfo" class="accordion-collapse collapse" data-bs-parent="#listAccordion">
|
||||
<div class="accordion-body">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include "parts/lists/_filter.html.twig" %}
|
||||
</div>
|
||||
|
||||
{% include "parts/lists/_action_bar.html.twig" with {'url_options': {}} %}
|
||||
|
||||
{% include "parts/lists/_parts_list.html.twig" %}
|
||||
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue