From 5249744b01849b7158ff9cf796c550924f452320 Mon Sep 17 00:00:00 2001 From: Anson Bridges Date: Fri, 3 Apr 2026 16:02:56 -0700 Subject: start er up --- templates/game.html | 185 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 templates/game.html (limited to 'templates/game.html') diff --git a/templates/game.html b/templates/game.html new file mode 100644 index 0000000..690e16d --- /dev/null +++ b/templates/game.html @@ -0,0 +1,185 @@ +{% extends "base.html" %} + +{% block content %} +
+ + ← Back to Schedule + +

Game Details

+
+ + {% if game %} +
+
+

Away

+ {% set is_away_team = current_user.is_authenticated and current_user.id|string == game.away_team_id|string %} + {% if game.away_icon %} + + {% else %} +
+ {% endif %} +

{{ game.away_team if game.away_team else 'TBD' }}

+
{{ game.away_score if game.status == 'Final' else '-' }}
+
+ +
+
VS
+
Date: {{ game.scheduled_date }}
+
+ {{ game.status }} + {% if game.is_conditional %}*{% endif %} +
+ + {% if current_user.is_admin %} +
+ ✎ Edit Game +
+ {% endif %} +
+ +
+

Home

+ {% set is_home_team = current_user.is_authenticated and current_user.id|string == game.home_team_id|string %} + {% if game.home_icon %} + + {% else %} +
+ {% endif %} +

{{ game.home_team if game.home_team else 'TBD' }}

+
{{ game.home_score if game.status == 'Final' else '-' }}
+
+
+ + {% if game.status == 'Final' and game.box_score and (game.box_score.away|sum + game.box_score.home|sum) > 0 %} +
+

Box Score

+ + + + + + + + + {% for val in game.box_score.away %} + + {% endfor %} + + + + {% for val in game.box_score.home %} + + {% endfor %} + +
Team123456789ExtraRHE
{{ game.away_team }}{{ val }}
{{ game.home_team }}{{ val }}
+
+ {% endif %} + + {% if game.status != 'Final' and submissions %} +
+

Active Proposals

+ {% for s in submissions %} + {% set show_score = s.away_score is not none and (s.away_score != game.away_score or s.home_score != game.home_score) %} + {% set show_date = s.proposed_date and s.proposed_date != game.scheduled_date %} + + {% if show_score or show_date %} +
+
+

From: {{ s.team_name }} ({{ s.username }})

+ {% if show_score %} +

Score: {{ game.away_team }} {{ s.away_score }} - {{ game.home_team }} {{ s.home_score }}

+ {% if s.box_score %} +
+ View Proposed Box Score + + + + + {% for v in s.box_score.away %}{% endfor %} + {% for v in s.box_score.home %}{% endfor %} +
Team123456789ExRHE
Away{{ v }}
Home{{ v }}
+
+ {% endif %} + {% endif %} + {% if show_date %} +

Date Proposal: {{ s.proposed_date }}

+ {% endif %} +
+
+ {% if current_user.id|string == s.submitted_by_id|string %} +
+ +
+ {% elif current_user.is_authenticated and (current_user.id|string == game.away_team_id|string or current_user.id|string == game.home_team_id|string) %} +
+ +
+ {% endif %} +
+
+ {% endif %} + {% endfor %} +
+ {% endif %} + + {% if game.status != 'Final' and current_user.is_authenticated and (current_user.id|string == game.away_team_id|string or current_user.id|string == game.home_team_id|string) %} +
+ +
+

Submit Game Results

+
+
+
+ + +
+
+ + +
+
+ +
+ + + + + + + + + {% for col in ["1", "2", "3", "4", "5", "6", "7", "8", "9", "extra", "runs", "hits", "errors"] %} + + {% endfor %} + + + + {% for col in ["1", "2", "3", "4", "5", "6", "7", "8", "9", "extra", "runs", "hits", "errors"] %} + + {% endfor %} + +
Team123456789ExtraRHE
{{ game.away_team if game.away_team else 'Away' }}
{{ game.home_team if game.home_team else 'Home' }}
+
+ + +
+
+ + +
+

Propose Date Change

+
+
+ + +
+ +
+
+
+ {% endif %} + {% else %} +

Game not found.

+ {% endif %} +{% endblock %} \ No newline at end of file -- cgit v1.2.3