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 a40a3b6..9dec58c 100644 Binary files a/instance/dashboard.db and b/instance/dashboard.db differ 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 +
+