mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 19:34:31 +02:00
Use format_datetime filters from twig core instead of deprecated twig/extensions
This commit is contained in:
parent
26fe946de3
commit
cd5f099965
12 changed files with 19 additions and 100 deletions
|
@ -11,7 +11,7 @@
|
|||
<p class="form-control-plaintext">
|
||||
|
||||
{% if date(entity.addedDate) > date('1900/01/01') %}
|
||||
{{ entity.addedDate | localizeddate("long") }}
|
||||
{{ entity.addedDate | format_datetime("long") }}
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
|
@ -24,7 +24,7 @@
|
|||
<div class="col-md-9">
|
||||
<p class="form-control-plaintext">
|
||||
{% if date(entity.lastModified) > date('1900/01/01') %}
|
||||
{{ entity.lastModified | localizeddate("long") }}
|
||||
{{ entity.lastModified | format_datetime("long") }}
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
|
|
|
@ -56,8 +56,8 @@
|
|||
</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 | localizeddate("short")}}</span>
|
||||
<span class="text-muted dropdown-item-text" ><i class="fas fa-history fa-fw"></i> <b>{% trans %}createdAt{% endtrans %}:</b> {{ attachment.addedDate | localizeddate("short")}}</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 class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#">{% trans %}attachment.edit{% endtrans %}</a>
|
||||
<a class="dropdown-item" href="#">{% trans %}attachment.delete{% endtrans %}</a>
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
<tbody>
|
||||
<tr> {# Creation date #}
|
||||
<td>{% trans %}createdAt{% endtrans %}</td>
|
||||
<td>{{ part.addedDate | localizeddate("long")}}</td>
|
||||
<td>{{ part.addedDate | format_datetime("long")}}</td>
|
||||
</tr>
|
||||
|
||||
<tr> {# Last modified date #}
|
||||
<td>{% trans %}lastModified{% endtrans %}</td>
|
||||
<td>{{ part.lastModified | localizeddate("long")}}</td>
|
||||
<td>{{ part.lastModified | format_datetime("long")}}</td>
|
||||
</tr>
|
||||
|
||||
<tr> {# ID #}
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
</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 | localizeddate("short")}}</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>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<h6>
|
||||
{% if lot.expirationDate %}
|
||||
<span class="badge badge-info" title="{% trans %}part_lots.expiration_date{% endtrans %}">
|
||||
<i class="fas fa-calendar-alt fa-fw"></i> {{ lot.expirationDate | localizeddate }}
|
||||
<i class="fas fa-calendar-alt fa-fw"></i> {{ lot.expirationDate | format_datetime }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if lot.expired %}
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
<div class="mb-3">
|
||||
<span class="text-muted" title="{% trans %}lastModified{% endtrans %}">
|
||||
<i class="fas fa-history fa-fw"></i> {{ part.lastModified | localizeddate("short") }}
|
||||
<i class="fas fa-history fa-fw"></i> {{ part.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> {{ part.addedDate | localizeddate("short") }}
|
||||
<i class="fas fa-calendar-plus fa-fw"></i> {{ part.addedDate | format_datetime("short") }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -47,11 +47,11 @@
|
|||
</a>
|
||||
<div class="">
|
||||
<span class="text-muted" title="{% trans %}lastModified{% endtrans %}">
|
||||
<i class="fas fa-history fa-fw"></i> {{ entity.lastModified | localizeddate("short") }}
|
||||
<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 | localizeddate("short") }}
|
||||
<i class="fas fa-calendar-plus fa-fw"></i> {{ entity.addedDate | format_datetime("short") }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue