feat(audit): every row keeps its date; dividers for Today, Yesterday, Last 7 days, Older (#5214)
The operator found "Today 08:03" in place of a date odd on the audit log,
and asked for the recency groups as dividers instead. |when now always
writes the date ("Thu 8 Oct 08:03"); mark_day_groups gives each entry its
group in the reader's zone, and a divider row opens each group. A scrolled
page carries the group the last one ended in, so it is not opened twice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
{# audit/_rows.html — one page of the audit log's rows, then the sentinel that
|
||||
loads the next page as the reader nears it (core.paging, pref 172). #}
|
||||
loads the next page as the reader nears it (core.paging, pref 172). A
|
||||
divider row opens each recency group: Today, Yesterday, Last 7 days, Older. #}
|
||||
{% from "_macros.html" import scroll_more, scroll_end %}
|
||||
{% for item in events %}
|
||||
{% set e = item.event %}
|
||||
{% if item.opens_group %}<tr class="table-divider"><th colspan="5" scope="rowgroup">{{ item.group }}</th></tr>{% endif %}
|
||||
<tr>
|
||||
<td class="nowrap">{{ e.timestamp|when }}</td>
|
||||
<td class="nowrap">{{ e.username }}</td>
|
||||
@@ -22,7 +24,8 @@
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% if after %}
|
||||
{{ scroll_more("/audit/?before=" ~ (after|urlencode) ~ (("&action=" ~ (action_filter|urlencode)) if action_filter else ""), cols=5) }}
|
||||
{{ scroll_more("/audit/?before=" ~ (after|urlencode) ~ (("&action=" ~ (action_filter|urlencode)) if action_filter else "")
|
||||
~ "&group=" ~ (last_group|urlencode), cols=5) }}
|
||||
{% else %}
|
||||
{{ scroll_end(cols=5) }}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user