pyfedi/app/templates/community/community_wiki_revisions.html

60 lines
No EOL
3.2 KiB
HTML

{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
{% extends 'themes/' + theme() + '/base.html' %}
{% else %}
{% extends "base.html" %}
{% endif %} %}
{% from 'bootstrap/form.html' import render_field %}
{% block app_content %}
<div class="row">
<div class="col-12 col-md-8 position-relative main_pane">
<nav aria-label="breadcrumb" id="breadcrumb_nav" title="Navigation">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">{{ _('Home') }}</a></li>
<li class="breadcrumb-item"><a href="{{ url_for('activitypub.community_profile', actor=community.ap_id if community.ap_id is not none else community.name) }}">{{ (community.title + '@' + community.ap_domain)|shorten }}</a></li>
<li class="breadcrumb-item"><a href="{{ url_for('community.community_edit', community_id=community.id) }}">{{ _('Settings') }}</a></li>
<li class="breadcrumb-item active">{{ _('Wiki') }}</li>
</ol>
</nav>
{% include "community/_community_moderation_nav.html" %}
<div class="row">
<div class="col-12 col-md-10">
<h1 class="mt-2">{{ _('Revisions of %(title)s', title=page.title) }}</h1>
</div>
</div>
{% if revisions -%}
<table class="table table-responsive">
<thead>
<tr>
<th>{{ _('Author') }}</th>
<th>{{ _('When') }}</th>
<th> </th>
</tr>
</thead>
<tbody>
{% for revision in revisions %}
<tr>
<td>{{ render_username(revision.author) }}</td>
<td>{{ arrow.get(revision.edited_at).humanize(locale=locale) }}</td>
<td class="text-right">{% if page.can_edit(current_user, community) %}
<div class="dropdown">
<button class="btn btn-primary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
{{ _('Actions') }}
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="{{ url_for('community.community_wiki_view_revision', actor=community.link(), slug=page.slug, revision_id=revision.id) }}">{{ _('View') }}</a></li>
{% if revision.id != most_recent_revision %}<li><a class="dropdown-item confirm_first"
href="{{ url_for('community.community_wiki_revert_revision', actor=community.link(), slug=page.slug, revision_id=revision.id, return='list') }}">
{{ _('Revert') }}</a></li>{% endif %}
</ul>
</div>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif -%}
</div>
</div>
{% endblock %}