Files
cheesy-arena-lite/templates/teams.html
Patrick Fairbank eb4900f981 Added aboot dialog.
2014-07-07 21:20:14 -07:00

92 lines
3.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{define "title"}}Team List{{end}}
{{define "body"}}
{{if .ShowErrorMessage}}
<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>
{{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">
<button type="button" class="btn btn-primary" onclick="$('#confirmClearTeams').modal('show');">
Clear Team List
</button>
</div>
</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>
<td class="text-center" style="white-space: nowrap;">
<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>
</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>
</div>
</div>
</div>
</div>
{{end}}
{{define "script"}}{{end}}