mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-06 02:09:33 +00:00
Refactored TwigExtensions Part 2
This commit is contained in:
parent
b078389381
commit
a9e527ce2a
22 changed files with 168 additions and 124 deletions
|
|
@ -29,16 +29,16 @@
|
|||
<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|markdown(true) }}</span></h6>
|
||||
<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 | amountFormat(part.partUnit) }}</span>
|
||||
<span title="{% trans %}instock.label{% endtrans %}">{{ part.amountSum | format_amount(part.partUnit) }}</span>
|
||||
/
|
||||
<span title="{% trans %}mininstock.label{% endtrans %}">{{ part.minAmount | amountFormat(part.partUnit) }}</span>
|
||||
<span title="{% trans %}mininstock.label{% endtrans %}">{{ part.minAmount | format_amount(part.partUnit) }}</span>
|
||||
</span>
|
||||
</h6>
|
||||
<h6 class="">
|
||||
|
|
@ -53,10 +53,10 @@
|
|||
<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 | amountFormat(part.partUnit) }}">{{ max_order_price | moneyFormat(app.user.currency ?? null) }}</span>
|
||||
<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 | amountFormat(part.partUnit) }}">{{pricedetail_helper.calculateAvgPrice(part, min_order_amount, app.user.currency ?? null ) | moneyFormat(app.user.currency ?? null) }}</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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue