add an indicator about the amount of replies in the aur-requests thread

related to https://gitlab.archlinux.org/archlinux/aurweb/-/issues/356

Signed-off-by: Christian Heusel <christian@heusel.eu>
This commit is contained in:
Christian Heusel 2023-05-09 11:13:18 +02:00
parent 3253a6ad29
commit ba06c450b8
No known key found for this signature in database
GPG key ID: C047D4F328B52585
3 changed files with 29 additions and 1 deletions

View file

@ -80,6 +80,7 @@
<th>{{ "Type" | tr }}</th>
<th>{{ "Comments" | tr }}</th>
<th>{{ "Filed by" | tr }}</th>
<th>{{ "Thread" | tr }}</th>
<th>{{ "Date" | tr }}</th>
<th>{{ "Status" | tr }}</th>
</tr>
@ -108,6 +109,7 @@
</td>
{# Comments #}
<td class="wrap">{{ result.Comments }}</td>
<td>
{# Filed by #}
{# If the record has an associated User, display a link to that user. #}
@ -117,10 +119,18 @@
{{ result.User.Username }}
</a>&nbsp;
{% endif %}
</td>
{% set reply_count = result.ml_message_reply_count() %}
<td>
<a target="_blank" rel="noopener noreferrer" href="{{ result.ml_message_url() }}">
(PRQ#{{ result.ID }})
[PRQ#{{ result.ID }}]
{% if reply_count > 0 %}
- {{ reply_count }} 📧
{% endif %}
</a>
</td>
{% set idle_time = config_getint("options", "request_idle_time") %}
{% set time_delta = (utcnow - result.RequestTS) | int %}