Files
cheesy-arena-lite/templates/setup_teams.html

133 lines
4.8 KiB
HTML
Raw Normal View History

2014-09-06 17:38:21 -07:00
{{/*
Copyright 2014 Team 254. All Rights Reserved.
Author: pat@patfairbank.com (Patrick Fairbank)
UI for configuring the team list for an event.
*/}}
2014-06-06 21:26:55 -07:00
{{define "title"}}Team List{{end}}
2014-06-05 23:09:03 -07:00
{{define "body"}}
{{if .ShowErrorMessage}}
2014-06-07 02:02:12 -07:00
<div class="alert alert-dismissable alert-danger">
<button type="button" class="close" data-dismiss="alert">×</button>
You can't modify the team list once the qualification schedule has been generated. If you need to change
the team list, clear all other data first on the Settings page.
</div>
2014-06-05 23:09:03 -07:00
{{end}}
<div class="row">
<div class="col-lg-2">
<form class="form-horizontal" action="/setup/teams" method="POST">
<fieldset>
<legend>Import Teams</legend>
<div class="form-group">
<textarea class="form-control" rows="10" name="teamNumbers"
placeholder="One team number per line"></textarea>
</div>
<div class="form-group">
<button type="submit" class="btn btn-info">Add Teams</button>
</div>
<div class="form-group">
2014-07-07 21:20:05 -07:00
<button type="button" class="btn btn-primary" onclick="$('#confirmClearTeams').modal('show');">
2014-06-05 23:09:03 -07:00
Clear Team List
</button>
</div>
2014-07-30 22:55:14 -07:00
{{if .EventSettings.TbaPublishingEnabled}}
<div class="form-group">
<button type="button" class="btn btn-info" onclick="$('#confirmPublishTeams').modal('show');">
Publish Team List to TBA
</button>
</div>
{{end}}
{{if .EventSettings.NetworkSecurityEnabled}}
<div class="form-group">
<a href="/setup/teams/generate_wpa_keys?all=true" class="btn btn-primary">Generate All WPA Keys</a>
</div>
<div class="form-group">
<a href="/setup/teams/generate_wpa_keys?all=false" class="btn btn-primary">Generate Missing WPA Keys</a>
</div>
{{end}}
2014-06-05 23:09:03 -07:00
</fieldset>
</form>
</div>
<div class="col-lg-10">
<table class="table table-striped table-hover ">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Nickname</th>
<th>Location</th>
<th>Rookie Year</th>
<th>Robot Name</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{{range $team := .Teams}}
<tr>
<td>{{$team.Id}}</td>
<td>{{$team.Name}}</td>
<td>{{$team.Nickname}}</td>
<td>{{$team.City}}, {{$team.StateProv}}, {{$team.Country}}</td>
<td>{{$team.RookieYear}}</td>
<td>{{$team.RobotName}}</td>
2014-07-27 16:41:09 -07:00
<td class="text-center nowrap">
2014-06-05 23:09:03 -07:00
<form action="/setup/teams/{{$team.Id}}/delete" method="POST">
<a href="/setup/teams/{{$team.Id}}/edit">
<button type="button" class="btn btn-info btn-xs">
<i class="glyphicon glyphicon-edit"></i>
</button>
</a>
<button type="submit" class="btn btn-primary btn-xs">
<i class="glyphicon glyphicon-trash"></i>
</button>
</form>
</td>
</tr>
{{end}}
</tbody>
</table>
<b>{{len .Teams}} teams</b>
</div>
2014-06-07 02:02:12 -07:00
</div>
<div id="confirmClearTeams" class="modal" style="top: 20%;">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Confirm</h4>
</div>
<div class="modal-body">
<p>Are you sure you want to clear the team list?</p>
</div>
<div class="modal-footer">
<form class="form-horizontal" action="/setup/teams/clear" method="POST">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary">Clear Team List</button>
</form>
2014-06-05 23:09:03 -07:00
</div>
</div>
</div>
2014-06-07 02:02:12 -07:00
</div>
2014-07-30 22:55:14 -07:00
<div id="confirmPublishTeams" class="modal" style="top: 20%;">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Confirm</h4>
</div>
<div class="modal-body">
<p>Are you sure you want to publish the team list to The Blue Alliance? This will overwrite any
existing team list data.</p>
</div>
<div class="modal-footer">
<form class="form-horizontal" action="/setup/teams/publish" method="POST">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary">Publish Team List</button>
</form>
</div>
</div>
</div>
</div>
2014-06-05 23:09:03 -07:00
{{end}}
2014-06-06 21:26:55 -07:00
{{define "script"}}{{end}}