mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
adding dev tools links to admin navigation
This commit is contained in:
parent
00daa365a4
commit
924ca0b6a7
4 changed files with 9 additions and 1 deletions
|
@ -33,10 +33,11 @@ from app.admin import bp
|
|||
@login_required
|
||||
@permission_required('change instance settings')
|
||||
def admin_home():
|
||||
current_mode = current_app.config['MODE']
|
||||
return render_template('admin/home.html', title=_('Admin'), moderating_communities=moderating_communities(current_user.get_id()),
|
||||
joined_communities=joined_communities(current_user.get_id()),
|
||||
menu_topics=menu_topics(),
|
||||
site=g.site)
|
||||
site=g.site, current_mode=current_mode)
|
||||
|
||||
|
||||
@bp.route('/site', methods=['GET', 'POST'])
|
||||
|
|
|
@ -15,4 +15,7 @@
|
|||
<a href="{{ url_for('admin.newsletter') }}">{{ _('Newsletter') }}</a> |
|
||||
<a href="{{ url_for('admin.admin_permissions') }}">{{ _('Permissions') }}</a> |
|
||||
<a href="{{ url_for('admin.admin_activities') }}">{{ _('Activities') }}</a>
|
||||
{% if current_mode == 'development' %}
|
||||
| <a href="{{ url_for('dev.tools') }}">{{ _('Dev Tools') }}</a>
|
||||
{% endif%}
|
||||
</nav>
|
||||
|
|
|
@ -213,6 +213,9 @@
|
|||
<li><a class="dropdown-item{{ ' active' if active_child == 'admin_newsletter' }}" href="{{ url_for('admin.newsletter') }}">{{ _('Newsletter') }}</a></li>
|
||||
<li><a class="dropdown-item{{ ' active' if active_child == 'admin_activities' }}" href="{{ url_for('admin.admin_activities') }}">{{ _('Activities') }}</a></li>
|
||||
<li><a class="dropdown-item{{ ' active' if active_child == 'admin_permissions' }}" href="{{ url_for('admin.admin_permissions') }}">{{ _('Permissions') }}</a></li>
|
||||
{% if current_mode == 'development' %}
|
||||
<li><a class="dropdown-item{{ ' active' if active_child == 'dev_tools' }}" href="{{ url_for('dev.tools') }}">{{ _('Dev Tools') }}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% endif %} %}
|
||||
{% from 'bootstrap/form.html' import render_form %}
|
||||
{% set active_child = 'dev_tools' %}
|
||||
|
||||
{% block app_content %}
|
||||
<div class="row">
|
||||
|
|
Loading…
Reference in a new issue