mirror of
https://github.com/Xevion/v1.xevion.dev.git
synced 2025-12-17 16:13:48 -06:00
added search history table
This commit is contained in:
@@ -7,14 +7,33 @@
|
||||
<div class="column">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{% set result_count = current_user.search_history.all() | length %}
|
||||
<div class="card-header-title">
|
||||
<h1 class="title">Search History</h1>
|
||||
</div>
|
||||
<div>Search History</div>
|
||||
<div style="padding: 0.3rem; font-weight: 100; font-size: 80%">{{ result_count }} result{% if result_count > 1 %}s{% endif %} found</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
{% for post in current_user.search_history %}
|
||||
Post : {{ post }}
|
||||
{% endfor %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><abbr title="Search ID">ID</abbr></th>
|
||||
<th>Exact URL</th>
|
||||
<th>Query Arguments</th>
|
||||
<th><abbr title="in UTC time">Timestamp</abbr></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for post in current_user.search_history | reverse %}
|
||||
<tr>
|
||||
<td>{{ post.id }}</td>
|
||||
<td>{{ post.exact_url }}</td>
|
||||
<td>{{ post.query_args }}</td>
|
||||
<td>{{ post.timestamp }} </td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user