diff options
author | 2018-05-19 14:57:17 +0100 | |
---|---|---|
committer | 2018-05-19 14:57:17 +0100 | |
commit | 3a31898c3bfc45203aafe14004d2506f565dcc4b (patch) | |
tree | 33d307f026eb926e13d0402a831e0c4587dbdca5 /templates | |
parent | Messed up my lint earlier (diff) |
Add "preparing" state
Diffstat (limited to 'templates')
-rw-r--r-- | templates/staff/jams/index.html | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/templates/staff/jams/index.html b/templates/staff/jams/index.html index 39300064..1c8e3746 100644 --- a/templates/staff/jams/index.html +++ b/templates/staff/jams/index.html @@ -36,6 +36,12 @@ <i class="uk-icon uk-text-primary fa-fw far fa-bullhorn state-{{ jam.number }}" hidden="hidden" title="State: {{ jam.state }}" id="state-{{ jam.number }}-announced"></i> {% endif %} + {% if jam.state == "preparing" %} + <i class="uk-icon uk-text-muted fa-fw far fa-pause state-{{ jam.number }}" title="State: {{ jam.state }}" id="state-{{ jam.number }}-preparing"></i> + {% else %} + <i class="uk-icon uk-text-muted fa-fw far fa-pause state-{{ jam.number }}" hidden="hidden" title="State: {{ jam.state }}" id="state-{{ jam.number }}-preparing"></i> + {% endif %} + {% if jam.state == "running" %} <i class="uk-icon uk-text-success fa-fw far fa-play state-{{ jam.number }}" title="State: {{ jam.state }}" id="state-{{ jam.number }}-running"></i> {% else %} @@ -82,7 +88,7 @@ </a> {% endif %} - {% if jam.state in ["planning", "announced"] %} + {% if jam.state in ["planning", "preparing", "announced"] %} <a class="uk-button uk-button-default uk-width-expand" data-jam="{{ jam.number }}" id="jam-{{ jam.number }}-button-info" href="{{ url_for("staff.jams.edit.info", jam=jam.number) }}"> <i class="uk-icon fa-fw far fa-pencil"></i> Info </a> @@ -190,7 +196,6 @@ }); for (let icon of document.getElementsByClassName("state-" + jam)) { - console.log(icon); icon.setAttribute("hidden", "hidden"); } @@ -202,6 +207,13 @@ document.getElementById("jam-" + jam + "-button-info").removeAttribute("hidden"); document.getElementById("jam-" + jam + "-button-ending").setAttribute("hidden", "hidden"); break; + case "preparing": + document.getElementById("state-" + jam + "-preparing").removeAttribute("hidden"); + + document.getElementById("jam-" + jam + "-button-basics").setAttribute("hidden", "hidden"); + document.getElementById("jam-" + jam + "-button-info").removeAttribute("hidden"); + document.getElementById("jam-" + jam + "-button-ending").setAttribute("hidden", "hidden"); + break; case "announced": document.getElementById("state-" + jam + "-announced").removeAttribute("hidden"); |