-
Notifications
You must be signed in to change notification settings - Fork 0
/
pairing.html
127 lines (106 loc) · 4.93 KB
/
pairing.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
{% extends "wide.html" %}
{% block title %}Build Teams{% endblock %}
{% block head %}
<style type="text/css">
h2 { text-align: center; background-image: none; border-bottom: none; }
p.message { font-weight: bold; color: red; margin: 0 0 0.5em 0; }
.column { float: left; margin: 0 5%; padding: 1em 0; width: 35%; }
.gutter { float: left; padding: 3em 0 0 0; width: 10%; }
.gutter div { margin: 1em 0; text-align: center; }
.help { margin: 2em 0; font-size: 60%; text-align: left; color: #888; }
.group, .team { margin: 1em 0; border: 1px solid #c4e5c4; padding: 0.5em; background-color: #e7fbe7; }
.group p.contact, .team p.contact { margin: 0; font-weight: bold; }
.group p.pairing, .team p.pairing { margin: 0; font-style: italic; }
.group span.id, .team span.id { font-weight: normal; }
.group ul, .team ul { list-style: none; margin: 0; padding: 0; }
.group ul li, .team ul li { margin: 0 0 0 2em; padding: 0; white-space: nowrap; }
.group span.golfername, .team span.golfername { display: inline-block; width: 10em; }
.team span.placeholder { display: inline-block; width: 10em; border-bottom: 1px solid #A8CBA6; }
.group span.handicap, .team span.handicap { display: inline-block; width: 3em; text-align: right; }
.team span.cart { padding-left: 1em; }
.team span.cart label { font-size: 80%; }
.editbutton { padding: 0 0.5em; cursor: pointer; color: #157d15; }
.editbuttonhidden { padding: 0 0.5em; visibility: hidden; }
div.editpopup { position: absolute; font-size: 80%; left: 0; top: 0; z-index: 99; padding: 5px; border: 1px solid black; background-color: #fff; }
div.editpopup p { margin: 1em; }
div.editpopup .closebox { position: absolute; left: 10px; top: 5px; width: 1em; height: 1em; cursor: pointer; }
</style>
<script src="/js/formteams.js" type="text/javascript" language="javascript"></script>
<script type="text/javascript" language="javascript">
var groups = {{ groups_json|safe }};
var teams = {{ teams_json|safe }};
var golfers = {{ golfers_json|safe }};
var substitutes = {{ substitutes_json|safe }};
var groups_selected = [];
var teams_selected = [];
var unassigned_golfers_selected = [];
var assigned_golfers_selected = [];
var group_divs;
var team_div;
var current_popup;
window.addEventListener('load', function() {
initialize();
});
</script>
{% 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><a href="/admin/view/golfers/byteam">Golfers by Team</a></li>
<li><a href="/admin/view/golfers/bystart">Golfers by Start</a></li>
<li><a href="/admin/view/golfers/handicap">Handicap</a></li>
<li class="selected"><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 %}
{% for m in messages %}
<p class="message">{{ m|escape }}</p>
{% endfor %}
<div class="column" id="unassigned">
<h2>Unassigned Foursomes</h2>
<div id="foursomes">
</div>
<h2>Unassigned Threesomes</h2>
<div id="threesomes">
</div>
<h2>Unassigned Twosomes</h2>
<div id="twosomes">
</div>
<h2>Unassigned Singles</h2>
<div id="singles">
</div>
</div> <!-- unassigned -->
<div class="gutter">
<form id="form" action="/admin/view/golfers/pairing" method="post" accept-charset="utf-8">
<input type="hidden" id="golfers_json" name="golfers_json" value="">
<input type="hidden" id="substitutes_json" name="substitutes_json" value="">
<input type="hidden" id="groups_json" name="groups_json" value="">
<input type="hidden" id="teams_json" name="teams_json" value="">
<div><input type="button" name="newteam" value="New Team →" onclick="return do_newteam();"></div>
<div><input type="button" name="move" value="Move →" onclick="return do_move();"></div>
<div><input type="button" name="remove" value="← Remove" onclick="return do_remove();"></div>
<div><input type="button" id="save_button" name="save" value="Save Teams" onclick="return do_save();"></div>
</form>
<p class="help">To form a new team, select up to four unassigned golfers from the left column,
then click “New Team.”</p>
<p class="help">To add golfers to an existing team, select the golfers from the left column,
select a team from the right column, then click “Move.”
Do not select more than four golfers total.</p>
<p class="help">To remove golfers from a team, select the golfers from the right column,
then click “Remove.” The golfers will be returned to the
unassigned column.</p>
<p class="help">To save the team assignments permanently, click “Save Teams.”</p>
</div>
<div class="column" id="teams">
<h2>Teams</h2>
<div id="teams">
</div>
</div> <!-- teams -->
{% endblock %}