Add awards management and automatic lower third creation.

This commit is contained in:
Patrick Fairbank
2019-08-09 23:13:45 -07:00
parent 940650c887
commit 6a7dd76445
18 changed files with 725 additions and 13 deletions

View File

@@ -0,0 +1,62 @@
{{/*
Copyright 2019 Team 254. All Rights Reserved.
Author: pat@patfairbank.com (Patrick Fairbank)
UI for configuring the awards.
*/}}
{{define "title"}}Awards Configuration{{end}}
{{define "body"}}
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<div class="well">
<legend>Awards Configuration</legend>
{{range $award := .Awards}}
<form class="form-horizontal existing" method="POST">
<div class="form-group">
<div class="col-lg-8">
<input type="hidden" name="id" value="{{$award.Id}}" />
<div class="form-group">
<label class="col-sm-5 control-label">Award Name</label>
<div class="col-sm-7">
<input type="text" class="form-control" name="awardName" value="{{$award.AwardName}}"
placeholder="Safety Award">
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">Team Awarded</label>
<div class="col-sm-7">
<select class="form-control" name="teamId">
<option value="0">No Team</option>
{{range $team := $.Teams}}
<option value="{{$team.Id}}"{{if eq $award.TeamId $team.Id}}}} selected{{end}}>
{{$team.Id}} - {{$team.Nickname}}
</option>
{{end}}
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">Person Awarded</label>
<div class="col-sm-7">
<input type="text" class="form-control" name="personName" value="{{$award.PersonName}}">
</div>
</div>
</div>
<div class="col-lg-4">
<button type="submit" class="btn btn-info btn-lower-third" name="action" value="save">Save</button>
{{if gt $award.Id 0}}
<button type="submit" class="btn btn-primary btn-lower-third" name="action" value="delete">
Delete
</button>
{{end}}
</div>
</div>
</form>
{{end}}
Winner and Finalist awards will be automatically generated once the playoff tournament is complete.
</div>
</div>
</div>
{{end}}
{{define "script"}}
{{end}}