add missing file

This commit is contained in:
Your Name 2023-06-19 13:20:01 -04:00 committed by Henri Dickson
parent 6972e4af66
commit 44164de246
2 changed files with 70 additions and 1 deletions

View file

@ -617,5 +617,4 @@ def item_categories():
_CATEGORY_LIST[c] = [cls]
else:
_CATEGORY_LIST[c].append(cls)
print(_CATEGORY_LIST)
return _CATEGORY_LIST

View file

@ -0,0 +1,70 @@
{% load static %}
{% load i18n %}
{% load admin_url %}
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
<!DOCTYPE html>
<html lang="zh" class="content-page">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ site_name }} - 编辑历史 {{ item.title }}</title>
{% include "common_libs.html" with jquery=0 v2=1 %}
<style>
aside details {
margin-bottom: 1rem;
padding: 1rem;
border: var(--pico-muted-color) solid 1px;
}
aside summary {
cursor: pointer;
font-weight: bold;
}
main>div {
margin-bottom: 4rem;
}
</style>
</head>
<body>
{% include "_header.html" %}
<main>
<div class="grid__main">
<h4>{{ item.title }} 编辑历史</h4>
<table class="table table-striped table-bordered">
<thead>
<tr style="background:#eee;">
<th>Field</th>
<th style="width:40%;">From</th>
<th style="width:40%;">To</th>
</tr>
</thead>
<tbody>
{% for log in item.history.all %}
<tr>
<td colspan="3">
<b title="#{{ log.id }}">{{ log.actor }} {{ log.get_action_display }} on {{ log.timestamp }}</b>
</td>
</tr>
{% for key, value in log.changes_dict.items %}
<tr {% cycle 'style="background:#eee;"' '' %}>
<td>{{ key }}</td>
<td>{{ value.0|default:"-" }}</td>
<td>{{ value.1|default:"-" }}</td>
</tr>
{% empty %}
<p>No data.</p>
{% endfor %}
{% empty %}
<p>No history for this item has been logged yet.</p>
{% endfor %}
</tbody>
</table>
</div>
<aside class="grid__aside">
{% include "_sidebar_edit.html" %}
</aside>
</main>
{% include "_footer.html" %}
</body>
</html>