From 0f17a680359fa1ac7d6c1b58c832e3d24489e94a Mon Sep 17 00:00:00 2001 From: Ske087 Date: Wed, 22 Jan 2025 10:11:47 +0200 Subject: [PATCH] updated the upload page --- app.py | 11 +++++- instance/dashboard.db | Bin 49152 -> 49152 bytes templates/dashboard.html | 1 + templates/group_fullscreen.html | 49 +++++++++++++++++++++++ templates/manage_group.html | 1 + templates/upload_content.html | 68 ++++++++++++++++++-------------- 6 files changed, 100 insertions(+), 30 deletions(-) create mode 100644 templates/group_fullscreen.html diff --git a/app.py b/app.py index 3198da4..742b348 100644 --- a/app.py +++ b/app.py @@ -114,6 +114,8 @@ def logout(): @app.route('/upload_content', methods=['GET', 'POST']) @login_required def upload_content(): + players = Player.query.all() + groups = Group.query.all() if request.method == 'POST': target_type = request.form['target_type'] target_id = request.form['target_id'] @@ -129,7 +131,7 @@ def upload_content(): db.session.commit() return redirect(url_for('dashboard')) - return render_template('upload_content.html') + return render_template('upload_content.html', players=players, groups=groups) @app.route('/admin') @login_required @@ -292,6 +294,13 @@ def player_fullscreen(player_id): content = Content.query.filter_by(player_id=player_id).all() return render_template('player_fullscreen.html', player=player, content=content) +@app.route('/group//fullscreen') +@login_required +def group_fullscreen(group_id): + group = Group.query.get_or_404(group_id) + content = Content.query.filter_by(group_id=group.id).all() + return render_template('group_fullscreen.html', group=group, content=content) + @app.route('/player//delete', methods=['POST']) @login_required @admin_required diff --git a/instance/dashboard.db b/instance/dashboard.db index a40a3b6f55d0b762dcf386181be5858ea7cdf153..9dec58c252e5d6d5ed890417f08785281ffd6a7f 100644 GIT binary patch delta 114 zcmZo@U~Xt&o*>PrI#I@%QFUX&YJ0|Cn-%$A@NfR&|AU`}{}%)MOAKT*b+QGR2>YJ0{nn-%$A@NfR&|AT*G0Q=<6@q!{8{Dlns@A>cX vpW)xdznp&xe-nQpP*o(qAU_8igDfKhXKsE;zFt;Ay5!`h{8~n?MFjx>iXk0w diff --git a/templates/dashboard.html b/templates/dashboard.html index 33b5bb5..30c5f4d 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -80,6 +80,7 @@
Manage Group + Full Screen
{% endfor %} diff --git a/templates/group_fullscreen.html b/templates/group_fullscreen.html new file mode 100644 index 0000000..9b82c27 --- /dev/null +++ b/templates/group_fullscreen.html @@ -0,0 +1,49 @@ + + + + Group Fullscreen Schedule + + + +
+ {% for item in content %} + Content Image + {% endfor %} +
+ + + \ No newline at end of file diff --git a/templates/manage_group.html b/templates/manage_group.html index f1eb96e..eefcd82 100644 --- a/templates/manage_group.html +++ b/templates/manage_group.html @@ -91,6 +91,7 @@ {% endfor %} + Full Screen diff --git a/templates/upload_content.html b/templates/upload_content.html index 004ebfc..87f85c6 100644 --- a/templates/upload_content.html +++ b/templates/upload_content.html @@ -2,36 +2,46 @@ Upload Content + -

Upload Content

-
- -
- - -
- - -
- -
- -
- Back to Dashboard +
+

Upload Content

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ Back to Dashboard +
+