Files
cheesy-arena-lite/templates/setup_field.html
2016-08-25 23:39:44 -07:00

107 lines
4.3 KiB
HTML

{{/*
Copyright 2014 Team 254. All Rights Reserved.
Author: pat@patfairbank.com (Patrick Fairbank)
UI for controlling ephemeral aspects of the playing field.
*/}}
{{define "title"}}Field Configuration{{end}}
{{define "body"}}
<div class="row">
<div class="col-lg-4 col-lg-offset-2">
<div class="well">
<legend>Alliance Station Displays</legend>
{{range $displayId, $station := .AllianceStationDisplays}}
<form class="form-horizontal" action="/setup/field" method="POST">
<div class="form-group">
<label class="col-lg-5 control-label">Display {{$displayId}}</label>
<div class="col-lg-7">
<input type="hidden" name="displayId" value="{{$displayId}}" />
<select class="form-control" name="allianceStation" onchange="this.form.submit();">
<option value=""></option>
<option value="R1"{{if eq $station "R1"}} selected{{end}}>Red 1</option>
<option value="R2"{{if eq $station "R2"}} selected{{end}}>Red 2</option>
<option value="R3"{{if eq $station "R3"}} selected{{end}}>Red 3</option>
<option value="B1"{{if eq $station "B1"}} selected{{end}}>Blue 1</option>
<option value="B2"{{if eq $station "B2"}} selected{{end}}>Blue 2</option>
<option value="B3"{{if eq $station "B3"}} selected{{end}}>Blue 3</option>
<option value="RT"{{if eq $station "RT"}} selected{{end}}>Red Tower</option>
<option value="BT"{{if eq $station "BT"}} selected{{end}}>Blue Tower</option>
</select>
</div>
</div>
</form>
{{end}}
<legend>Reload All Displays</legend>
<div class="form-group">
<a href="/setup/field/reload_displays" class="btn btn-primary">Force Reload of All Displays</a>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="well">
<form class="" action="/setup/field/lights" method="POST">
Light Control
<div class="form-group">
<div class="radio">
<label>
<input type="radio" name="mode" value="off" onclick="this.form.submit()"
{{if eq .LightsMode "off"}}checked{{end}}>Off
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="mode" value="all_white" onclick="this.form.submit()"
{{if eq .LightsMode "all_white"}}checked{{end}}>All White
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="mode" value="all_red" onclick="this.form.submit()"
{{if eq .LightsMode "all_red"}}checked{{end}}>All Red
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="mode" value="all_blue" onclick="this.form.submit()"
{{if eq .LightsMode "all_blue"}}checked{{end}}>All Blue
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="mode" value="all_green" onclick="this.form.submit()"
{{if eq .LightsMode "all_green"}}checked{{end}}>All Green
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="mode" value="strobe" onclick="this.form.submit()"
{{if eq .LightsMode "strobe"}}checked{{end}}>Strobe
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="mode" value="fade_red" onclick="this.form.submit()"
{{if eq .LightsMode "fade_red"}}checked{{end}}>Fade Red
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="mode" value="fade_blue" onclick="this.form.submit()"
{{if eq .LightsMode "fade_blue"}}checked{{end}}>Fade Blue
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="mode" value="fade_red_blue" onclick="this.form.submit()"
{{if eq .LightsMode "fade_red_blue"}}checked{{end}}>Fade Red/Blue
</label>
</div>
</div>
</form>
</div>
</div>
</div>
{{end}}
{{define "script"}}
{{end}}