Show the creating or last editing user in part or structure info.

This commit is contained in:
Jan Böhmer 2020-02-06 19:22:01 +01:00
parent 8a7b90d0ea
commit 73c2aa232d
7 changed files with 152 additions and 8 deletions

View file

@ -7,11 +7,31 @@
<td>{{ part.addedDate | format_datetime("long")}}</td>
</tr>
<tr>
<td>{% trans %}user.creating_user{% endtrans %}</td>
<td>{% if is_granted('show_users', part) %}
{{ getCreatingUser(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_users', part) %}
{{ getLastEditingUser(part).fullName(true) ?? 'Unknown'|trans }}
{% else %}
{% trans %}accessDenied{% endtrans %}
{% endif %}
</td>
</tr>
<tr> {# ID #}
<td>{% trans %}id.label{% endtrans %}</td>
<td>{{ part.iD }} ({{ part.iDString}})</td>

View file

@ -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 | format_datetime("short") }}
<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> {{ part.addedDate | format_datetime("short") }}
<i class="fas fa-calendar-plus fa-fw"></i> {{ helper.date_user_combination(part, false) }}
</span>
</div>