core&ui: add discussion history (#450)

Co-authored-by: 无限UCW <45730483+wuxianucw@users.noreply.github.com>
Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
authored and GitHub committed 2022-10-27 13:55:17 +08:00
1 parent 3e918346ff
commit f863d80ee0
14 files changed
+227 -45

No files matched your search

@@ -94,6 +94,9 @@
<div class="supplementary dczcomments__supplementary">
{{ user.render_inline(udoc, avatar=false) }}
@ {{ datetimeSpan(doc['_id'])|safe }}
{% if doc.edited %}
<div class="history" data-discussion-history data-raw-url="{{ url('discussion_reply_raw', did=doc.parentId, drid=doc._id) }}"><a>{{ _('Edited') }}</a></div>
{% endif %}
</div>
<div class="dczcomments__operations nojs--hide">
{% if handler.user.hasPerm(reply_post_perm) %}
@@ -132,6 +135,9 @@
<div class="supplementary dczcomments__supplementary">
{{ user.render_inline(udoc, avatar=false) }}
@ {{ datetimeSpan(rdoc._id)|safe }}
{% if doc.edited %}
<div class="history" data-discussion-history data-raw-url="{{ url('discussion_tail_reply_raw', did=doc.parentId, drid=doc._id, drrid=rdoc._id) }}"><a>{{ _('Edited') }}</a></div>
{% endif %}
</div>
<div class="dczcomments__operations nojs--hide">
{% if handler.user.hasPerm(reply_post_perm) %}
@@ -34,6 +34,9 @@
<li><a href="{{ url('discussion_edit', did=ddoc.docId) }}">
<span class="icon icon-edit"></span> {{ _('Edit') }}
</a></li>
{% endif %}
{% if ddoc.edited %}
<li data-discussion-history data-raw-url="{{ url('discussion_raw', did=ddoc.docId) }}">{{ _('Edited') }}</li>
{% endif %}
<li>{{ _('{0} views').format(ddoc.views) }}</li>
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
@@ -84,6 +84,16 @@
</a>
</li>
{% endif %}
{% if ui.getNodes('UserDropdown').length %}
<li class="menu__seperator"></li>
{%- for item in ui.getNodes('UserDropdown') -%}
<li class="menu__item nojs--hide">
<a href="{{ url(item.name) }}" class="menu__link">
<span class="icon icon-{{ item.args.icon }}"></span> {{ _(item.args.displayName or item.name) }}
</a>
</li>
{%- endfor -%}
{% endif %}
<li class="menu__seperator"></li>
{% if handler.user.hasPriv(PRIV.PRIV_EDIT_SYSTEM) %}
<li class="menu__item nojs--hide">