mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
community edit and moderation are now visually a single screen; community delete button moved to settings
This commit is contained in:
parent
4eef40e09d
commit
18f8da4d0a
7 changed files with 33 additions and 18 deletions
|
@ -1,14 +1,22 @@
|
|||
<div class="btn-group mt-1 mb-2">
|
||||
{% if community.is_owner() or current_user.is_admin() %}
|
||||
<a href="{{ url_for('community.community_edit', community_id=community.id) }}" class="btn {{ 'btn-primary' if current == '' or current == 'edit_settings' else 'btn-outline-secondary' }}" rel="nofollow noindex">
|
||||
{{ _('Settings') }}
|
||||
</a>
|
||||
<a href="{{ url_for('community.community_mod_list', community_id=community.id) }}" class="btn {{ 'btn-primary' if current == 'moderators' else 'btn-outline-secondary' }}" rel="nofollow noindex">
|
||||
{{ _('Moderators') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="/community/{{ community.link() }}/moderate" aria-label="{{ _('Sort by hot') }}" class="btn {{ 'btn-primary' if current == '' or current == 'reports' else 'btn-outline-secondary' }}" rel="nofollow noindex">
|
||||
{{ _('Reports') }}
|
||||
</a>
|
||||
<a href="/community/{{ community.link() }}/moderate/banned" class="btn {{ 'btn-primary' if current == 'banned' else 'btn-outline-secondary' }}" rel="nofollow noindex">
|
||||
{{ _('Banned people') }}
|
||||
</a>
|
||||
<a href="/community/{{ community.link() }}/moderate/appeals" class="btn {{ 'btn-primary' if current == 'appeals' else 'btn-outline-secondary' }}" rel="nofollow noindex">
|
||||
<a href="/community/{{ community.link() }}/moderate/appeals" class="btn {{ 'btn-primary' if current == 'appeals' else 'btn-outline-secondary' }} disabled" rel="nofollow noindex" >
|
||||
{{ _('Appeals') }}
|
||||
</a>
|
||||
<a href="/community/{{ community.link() }}/moderate/modlog" class="btn {{ 'btn-primary' if current == 'modlog' else 'btn-outline-secondary' }}" rel="nofollow noindex">
|
||||
<a href="/community/{{ community.link() }}/moderate/modlog" class="btn {{ 'btn-primary' if current == 'modlog' else 'btn-outline-secondary' }} disabled" rel="nofollow noindex" >
|
||||
{{ _('Mod log') }}
|
||||
</a>
|
||||
</div>
|
|
@ -175,14 +175,10 @@
|
|||
<h2>{{ _('Community Settings') }}</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if is_moderator or is_owner or is_admin %}
|
||||
<p><a href="/community/{{ community.link() }}/moderate" class="btn btn-primary">{{ _('Moderate') }}</a></p>
|
||||
{% endif %}
|
||||
{% if is_owner or is_admin %}
|
||||
<p><a href="{{ url_for('community.community_edit', community_id=community.id) }}" class="btn btn-primary">{{ _('Settings') }}</a></p>
|
||||
{% endif %}
|
||||
{% if community.is_local() and (community.is_owner() or current_user.is_admin()) %}
|
||||
<p><a class="btn btn-primary btn-warning" href="{{ url_for('community.community_delete', community_id=community.id) }}" rel="nofollow">Delete community</a></p>
|
||||
<p><a href="{{ url_for('community.community_edit', community_id=community.id) }}" class="btn btn-primary">{{ _('Settings & Moderation') }}</a></p>
|
||||
{% elif is_moderator %}
|
||||
<p><a href="/community/{{ community.link() }}/moderate" class="btn btn-primary">{{ _('Moderation') }}</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
<div class="card-body p-6">
|
||||
<div class="card-title">{{ _('Delete "%(community_title)s"', community_title=community.title) }}</div>
|
||||
<div class="card-body">
|
||||
<p class="card-text"> Are you sure you want to delete this community? This is irreversible and will delete all posts and comments associated with it.</p>
|
||||
{{ render_form(form) }}
|
||||
<a class="btn btn-primary mt-2" href="/c/{{ community.link() }}">Go back</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -15,13 +15,17 @@
|
|||
<li class="breadcrumb-item active">{{ _('Settings') }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{% if community %}
|
||||
{% include "community/_community_moderation_nav.html" %}
|
||||
{% endif %}
|
||||
<h1 class="mt-2">
|
||||
{% if community %}
|
||||
{{ _('Edit community') }}
|
||||
{{ _('Edit %(community)s', community=community.display_name()) }}
|
||||
{% else %}
|
||||
{{ _('Create community') }}
|
||||
{% endif %}
|
||||
</h1>
|
||||
<p>{{ _('Edit and configure this community') }}</p>
|
||||
<form method="post" enctype="multipart/form-data" id="add_local_community_form" role="form">
|
||||
{{ form.csrf_token() }}
|
||||
{{ render_field(form.title) }}
|
||||
|
@ -48,10 +52,12 @@
|
|||
{{ render_field(form.submit) }}
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<a class="btn btn-outline-secondary" href="{{ url_for('community.community_mod_list', community_id=community.id) }}">{{ _('Moderators') }}</a>
|
||||
</div>
|
||||
{% if community.is_local() and (community.is_owner() or current_user.is_admin()) %}
|
||||
<p><a class="btn btn-primary btn-warning" href="{{ url_for('community.community_delete', community_id=community.id) }}" rel="nofollow">Delete community</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -16,10 +16,12 @@
|
|||
<li class="breadcrumb-item active">{{ _('Moderators') }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{% include "community/_community_moderation_nav.html" %}
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-10">
|
||||
<h1 class="mt-2">{{ _('Moderators for %(community)s', community=community.display_name()) }}</h1>
|
||||
</div>
|
||||
<p>{{ _('See and change who moderates this community') }}</p>
|
||||
<div class="col-12 col-md-2 text-right">
|
||||
<a class="btn btn-primary" href="{{ url_for('community.community_add_moderator', community_id=community.id) }}">{{ _('Add moderator') }}</a>
|
||||
</div>
|
||||
|
|
|
@ -15,16 +15,16 @@
|
|||
<li class="breadcrumb-item active">{{ _('Moderation') }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{% include "community/_community_moderation_nav.html" %}
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-10">
|
||||
<h1 class="mt-2">{{ _('Moderation of %(community)s', community=community.display_name()) }}</h1>
|
||||
<h1 class="mt-2">{{ _('Reports') }}</h1>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 text-right">
|
||||
<!-- <a class="btn btn-primary" href="{{ url_for('community.community_add_moderator', community_id=community.id) }}">{{ _('Add moderator') }}</a> -->
|
||||
</div>
|
||||
</div>
|
||||
{% include "community/_community_moderation_nav.html" %}
|
||||
<h2>{{ _('Reports') }}</h2>
|
||||
<p>{{ _('See and handle all reports made about %(community)s', community=community.display_name()) }}</p>
|
||||
{% if reports.items %}
|
||||
<form method="get">
|
||||
<input type="search" name="search" value="{{ search }}">
|
||||
|
|
|
@ -15,16 +15,17 @@
|
|||
<li class="breadcrumb-item active">{{ _('Moderation') }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{% include "community/_community_moderation_nav.html" %}
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-10">
|
||||
<h1 class="mt-2">{{ _('Moderation of %(community)s', community=community.display_name()) }}</h1>
|
||||
<h1 class="mt-2">{{ _('Banned people') }}</h1>
|
||||
</div>
|
||||
<div class="col-12 col-md-2 text-right">
|
||||
<!-- <a class="btn btn-primary" href="{{ url_for('community.community_add_moderator', community_id=community.id) }}">{{ _('Add moderator') }}</a> -->
|
||||
</div>
|
||||
</div>
|
||||
{% include "community/_community_moderation_nav.html" %}
|
||||
<h2>{{ _('Banned people') }}</h2>
|
||||
<p>{{ _('See and manage who is banned from %(community)s', community=community.display_name()) }}</p>
|
||||
<h2></h2>
|
||||
{% if banned_people %}
|
||||
<form method="get">
|
||||
<input type="search" name="search" value="{{ search }}">
|
||||
|
|
Loading…
Add table
Reference in a new issue