mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
rename template
This commit is contained in:
parent
6f53afd4b9
commit
dd75c88189
3 changed files with 9 additions and 9 deletions
|
@ -1192,20 +1192,20 @@ def admin_users():
|
|||
)
|
||||
|
||||
|
||||
@bp.route('/content/trash', methods=['GET'])
|
||||
@bp.route('/content', methods=['GET'])
|
||||
@login_required
|
||||
@permission_required('administer all users')
|
||||
def admin_content_trash():
|
||||
def admin_content():
|
||||
|
||||
page = request.args.get('page', 1, type=int)
|
||||
|
||||
posts = Post.query.filter(Post.posted_at > utcnow() - timedelta(days=3), Post.deleted == False, Post.down_votes > 0).order_by(Post.score)
|
||||
posts = posts.paginate(page=page, per_page=100, error_out=False)
|
||||
|
||||
next_url = url_for('admin.admin_content_trash', page=posts.next_num) if posts.has_next else None
|
||||
prev_url = url_for('admin.admin_content_trash', page=posts.prev_num) if posts.has_prev and page != 1 else None
|
||||
next_url = url_for('admin.admin_content', page=posts.next_num) if posts.has_next else None
|
||||
prev_url = url_for('admin.admin_content', page=posts.prev_num) if posts.has_prev and page != 1 else None
|
||||
|
||||
return render_template('admin/posts.html', title=_('Bad posts'), next_url=next_url, prev_url=prev_url, posts=posts,
|
||||
return render_template('admin/content.html', title=_('Bad posts'), next_url=next_url, prev_url=prev_url, posts=posts,
|
||||
moderating_communities=moderating_communities(current_user.get_id()),
|
||||
joined_communities=joined_communities(current_user.get_id()),
|
||||
menu_topics=menu_topics(),
|
||||
|
@ -1217,7 +1217,7 @@ def admin_content_trash():
|
|||
@login_required
|
||||
@permission_required('administer all users')
|
||||
def admin_content_spam():
|
||||
# Essentially the same as admin_content_trash() except only shows heavily downvoted posts by new users - who are usually spammers
|
||||
# Essentially the same as admin_content() except only shows heavily downvoted posts by new users - who are usually spammers
|
||||
page = request.args.get('page', 1, type=int)
|
||||
replies_page = request.args.get('replies_page', 1, type=int)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% endif %}
|
||||
{% from 'bootstrap/form.html' import render_form %}
|
||||
{% set active_child = 'admin_content_trash' %}
|
||||
{% set active_child = 'admin_content' %}
|
||||
|
||||
{% block app_content %}
|
||||
<div class="row">
|
||||
|
@ -36,4 +36,4 @@
|
|||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
{% endblock %}
|
||||
{% endblock %}
|
|
@ -229,7 +229,7 @@
|
|||
<li><a class="dropdown-item{{ ' active' if active_child == 'admin_communities' }}" href="{{ url_for('admin.admin_communities') }}">{{ _('Communities') }}</a></li>
|
||||
<li><a class="dropdown-item{{ ' active' if active_child == 'admin_topics' }}" href="{{ url_for('admin.admin_topics') }}">{{ _('Topics') }}</a></li>
|
||||
<li><a class="dropdown-item{{ ' active' if active_child == 'admin_users' }}" href="{{ url_for('admin.admin_users', local_remote='local') }}">{{ _('Users') }}</a></li>
|
||||
<li><a class="dropdown-item{{ ' active' if active_child == 'admin_content_trash' }}" href="{{ url_for('admin.admin_content_trash') }}">{{ _('Monitoring - content') }}</a></li>
|
||||
<li><a class="dropdown-item{{ ' active' if active_child == 'admin_content' }}" href="{{ url_for('admin.admin_content') }}">{{ _('Monitoring - content') }}</a></li>
|
||||
<li><a class="dropdown-item{{ ' active' if active_child == 'admin_content_spam' }}" href="{{ url_for('admin.admin_content_spam') }}">{{ _('Monitoring - spammy content') }}</a></li>
|
||||
<li><a class="dropdown-item{{ ' active' if active_child == 'admin_content_deleted' }}" href="{{ url_for('admin.admin_content_deleted') }}">{{ _('Deleted content') }}</a></li>
|
||||
{% if g.site.registration_mode == 'RequireApplication' %}
|
||||
|
|
Loading…
Reference in a new issue