Feat/auto generate edited files #2
No files matched your search
@@ -315,6 +315,12 @@ def admin_results():
|
|||||||
}
|
}
|
||||||
return render_template("admin_results.html", rows=rows, stats=stats, songs=songs)
|
return render_template("admin_results.html", rows=rows, stats=stats, songs=songs)
|
||||||
|
|
||||||
|
@bp.route("/admin/list")
|
||||||
|
@admin_required
|
||||||
|
def admin_list():
|
||||||
|
songs = load_songs_list()
|
||||||
|
return render_template("admin_tasksList.html", songs=songs)
|
||||||
|
|
||||||
@bp.route("/api/admin/add", methods=["POST"])
|
@bp.route("/api/admin/add", methods=["POST"])
|
||||||
@admin_required
|
@admin_required
|
||||||
def api_admin_add():
|
def api_admin_add():
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<div class="admin-head">
|
<div class="admin-head">
|
||||||
<h2>{% block admin_title %}Admin{% endblock %}</h2>
|
<h2>{% block admin_title %}Admin{% endblock %}</h2>
|
||||||
<div class="admin-actions">
|
<div class="admin-actions">
|
||||||
|
{% block admin_header %}{% endblock %}
|
||||||
<form method="post" action="{{ url_for('main.admin_logout') }}">
|
<form method="post" action="{{ url_for('main.admin_logout') }}">
|
||||||
<button type="submit" class="secondary">Abmelden</button>
|
<button type="submit" class="secondary">Abmelden</button>
|
||||||
</form>
|
</form>
|
||||||
@@ -13,7 +14,7 @@
|
|||||||
|
|
||||||
{% block admin_content %}
|
{% block admin_content %}
|
||||||
|
|
||||||
<a class="button" href="{{ url_for('main.admin_add') }}">Unteraufgabe hinzufügen</a>
|
<a class="button" href="{{ url_for('main.admin_list') }}">Unteraufgaben</a>
|
||||||
<a class="button" href="{{ url_for('main.admin_results') }}">Auswertung</a>
|
<a class="button" href="{{ url_for('main.admin_results') }}">Auswertung</a>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{% extends "admin.html" %}
|
||||||
|
|
||||||
|
{% block admin_title %}Unteraufgaben{% endblock %}
|
||||||
|
|
||||||
|
{% block admin_header %}
|
||||||
|
<a class="button" href="{{ url_for('main.admin_add') }}">Unteraufgabe hinzufügen</a>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block admin_content %}
|
||||||
|
|
||||||
|
{{ songs }}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
Reference in new issue
Block a user