-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewgolfersbyteam.html
162 lines (149 loc) · 7.56 KB
/
viewgolfersbyteam.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
{% extends "wide.html" %}
{% block title %}Golfers By {% if bywhat == "byteam" %}Team{% else %}Starting Hole{% endif %}{% endblock %}
{% block head %}
<style type="text/css">
#body table { width: 40em; border: none; border-collapse: collapse; border-bottom: 2px solid #c4e5c4; margin: 0 auto 2em; }
#body thead tr { border-bottom: 2px solid #c4e5c4; }
#body tbody tr.team { border-top: 2px solid #c4e5c4; }
#body tbody tr:hover { background-color: #e7fbe7; }
#body th { color: #6061ab; padding: 0.5em; font-size: 80%; }
#body td { position: relative; padding: 0.25em; }
#body tr.team td { padding-top: 0.5em; }
#body tr.team td.teamname { font-weight: bold; }
#body td.firstcol { padding-left: 2em; }
#body td p { margin: 0; }
#body td p.details { margin-left: 1em; font-size: 80%; color: #555; }
#body tr.pairing p { font-size: 80%; font-style: italic; color: #555; }
.note { font-style: italic; text-align: center; }
.buttons { text-align: center; }
.indented { padding-left: 20pt; }
</style>
{% endblock %}
{% block subnav %}
<ul class="viewnav">
<li><a href="/admin/view/registrations">All Registrations</a></li>
<li><a href="/admin/view/golfers">Golfers by Sponsor</a></li>
<li><a href="/admin/view/golfers/byname">Golfers by Name</a></li>
<li {% if bywhat == "byteam" %}class="selected"{% endif %}><a href="/admin/view/golfers/byteam">Golfers by Team</a></li>
<li {% if bywhat == "bystart" %}class="selected"{% endif %}><a href="/admin/view/golfers/bystart">Golfers by Start</a></li>
<li><a href="/admin/view/golfers/handicap">Handicap</a></li>
<li><a href="/admin/view/golfers/pairing">Pairing</a></li>
<li><a href="/admin/view/dinners">Dinners</a></li>
<li><a href="/admin/view/seating">Assign Seating</a></li>
<li><a href="/admin/view/unpaid">Unpaid</a></li>
<li><a href="/admin/view/incomplete">Incomplete</a></li>
<li><a href="/admin/view/unconfirmed">Unconfirmed</a></li>
</ul>
{% endblock %}
{% block content %}
<h2>Golfers by {% if bywhat == "byteam" %}Team{% else %}Starting Hole{% endif %}</h2>
{% if teams %}
{% if not readonly %}
<form action="/admin/view/golfers/{{bywhat}}" method="post" accept-charset="utf-8">
<input type="hidden" name="num_teams" value="{{num_teams}}">
{% endif %}
<table>
<thead>
<tr valign="bottom">
<th align="left">Team<br><span class="indented">Golfer</span></th>
<th align="center">Starting Hole<br>Cart</th>
<th align="center">Tees</th>
<th align="right">Course<br>Handicap</th>
<th align="right">Team<br>Handicap</th>
</tr>
</thead>
<tbody>
{% for t in teams %}
<tr class="team" valign="baseline">
<td class="teamname">{{ t.name }}</td>
<td align="center">
{% if readonly %}
{{ t.starting_hole }}
{% else %}
<input type="hidden" name="team_{{forloop.counter}}_key" value="{{t.key}}">
<select name="team_{{forloop.counter}}_start">
<option value="-" {% ifequal t.starting_hole '' %} selected {% endifequal %}>--</option>
<option value="1A" {% ifequal t.starting_hole '1A' %} selected {% endifequal %}>1 A</option>
<option value="1B" {% ifequal t.starting_hole '1B' %} selected {% endifequal %}>1 B</option>
<option value="2A" {% ifequal t.starting_hole '2A' %} selected {% endifequal %}>2 A</option>
<option value="2B" {% ifequal t.starting_hole '2B' %} selected {% endifequal %}>2 B</option>
<option value="3A" {% ifequal t.starting_hole '3A' %} selected {% endifequal %}>3 A</option>
<option value="3B" {% ifequal t.starting_hole '3B' %} selected {% endifequal %}>3 B</option>
<option value="4A" {% ifequal t.starting_hole '4A' %} selected {% endifequal %}>4 A</option>
<option value="4B" {% ifequal t.starting_hole '4B' %} selected {% endifequal %}>4 B</option>
<option value="5A" {% ifequal t.starting_hole '5A' %} selected {% endifequal %}>5 A</option>
<option value="5B" {% ifequal t.starting_hole '5B' %} selected {% endifequal %}>5 B</option>
<option value="6A" {% ifequal t.starting_hole '6A' %} selected {% endifequal %}>6 A</option>
<option value="6B" {% ifequal t.starting_hole '6B' %} selected {% endifequal %}>6 B</option>
<option value="7A" {% ifequal t.starting_hole '7A' %} selected {% endifequal %}>7 A</option>
<option value="7B" {% ifequal t.starting_hole '7B' %} selected {% endifequal %}>7 B</option>
<option value="8A" {% ifequal t.starting_hole '8A' %} selected {% endifequal %}>8 A</option>
<option value="8B" {% ifequal t.starting_hole '8B' %} selected {% endifequal %}>8 B</option>
<option value="9A" {% ifequal t.starting_hole '9A' %} selected {% endifequal %}>9 A</option>
<option value="9B" {% ifequal t.starting_hole '9B' %} selected {% endifequal %}>9 B</option>
<option value="10A" {% ifequal t.starting_hole '10A' %} selected {% endifequal %}>10 A</option>
<option value="10B" {% ifequal t.starting_hole '10B' %} selected {% endifequal %}>10 B</option>
<option value="11A" {% ifequal t.starting_hole '11A' %} selected {% endifequal %}>11 A</option>
<option value="11B" {% ifequal t.starting_hole '11B' %} selected {% endifequal %}>11 B</option>
<option value="12A" {% ifequal t.starting_hole '12A' %} selected {% endifequal %}>12 A</option>
<option value="12B" {% ifequal t.starting_hole '12B' %} selected {% endifequal %}>12 B</option>
<option value="13A" {% ifequal t.starting_hole '13A' %} selected {% endifequal %}>13 A</option>
<option value="13B" {% ifequal t.starting_hole '13B' %} selected {% endifequal %}>13 B</option>
<option value="14A" {% ifequal t.starting_hole '14A' %} selected {% endifequal %}>14 A</option>
<option value="14B" {% ifequal t.starting_hole '14B' %} selected {% endifequal %}>14 B</option>
<option value="15A" {% ifequal t.starting_hole '15A' %} selected {% endifequal %}>15 A</option>
<option value="15B" {% ifequal t.starting_hole '15B' %} selected {% endifequal %}>15 B</option>
<option value="16A" {% ifequal t.starting_hole '16A' %} selected {% endifequal %}>16 A</option>
<option value="16B" {% ifequal t.starting_hole '16B' %} selected {% endifequal %}>16 B</option>
<option value="17A" {% ifequal t.starting_hole '17A' %} selected {% endifequal %}>17 A</option>
<option value="17B" {% ifequal t.starting_hole '17B' %} selected {% endifequal %}>17 B</option>
<option value="18A" {% ifequal t.starting_hole '18A' %} selected {% endifequal %}>18 A</option>
<option value="18B" {% ifequal t.starting_hole '18B' %} selected {% endifequal %}>18 B</option>
</select>
{% endif %}
</td>
<td></td>
<td></td>
<td align="right">{{ t.team_handicap }}</td>
</tr>
{% for g in t.golfers %}
<tr class="golfer" valign="baseline">
<td><span class="indented">{{ g.golfer_name }}</span></td>
<td align="center">{{ g.cart }}</td>
<td align="center">{% if g.tees == 1 %}Red{% elif g.tees == 2 %}White{% elif g.tees == 3 %}Blue{% endif %}</td>
<td align="right">{{ g.course_handicap }}</td>
<td></td>
</tr>
{% endfor %}
{% endfor %}
{% if unassigned_golfers %}
<tr class="team" valign="baseline">
<td class="teamname">Unassigned Golfers</td>
<td align="center"></td>
<td></td>
<td></td>
<td align="right">{{ t.team_handicap }}</td>
</tr>
{% for g in unassigned_golfers %}
<tr class="golfer" valign="baseline">
<td><span class="indented">{{ g.first_name }} {{ g.last_name }}</span></td>
<td align="center"></td>
<td align="center"></td>
<td align="right">n/a</td>
<td></td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
{% if not readonly %}
<div class="buttons">
<input type="submit" name="save" value="Save">
</div>
</form>
{% endif %}
<p><a href="/admin/csv/golfersbyteam"><button name="download" type="button">Download CSV</button></a></p>
{% else %}
<p>No teams.</p>
{% endif %}
{% endblock %}