-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
141 lines (122 loc) · 6.86 KB
/
Copy pathindex.html
File metadata and controls
141 lines (122 loc) · 6.86 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Turbo Reg</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.3.1/css/foundation.min.css">
<!-- For "trash" icon -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
</head>
<body>
<div class="container" id="app">
<h1 class="text-center">Turbo Reg {{ version }}<sup>Beta</sup></h1>
<h2>Step 1: Tell app what you're interested in.</h2>
<button class="button" type="button" data-open="facilities-dropdown">Facilities ({{selectedFacilities.length}})</button>
<!-- TODO: Make this into re-usable component -->
<div class="reveal" id="facilities-dropdown" data-reveal>
<div v-for="fac in facilities">
<input type="checkbox" v-bind:id="'fac_' + fac" v-bind:value="fac" v-model="selectedFacilities">
<label v-bind:for="'fac_' + fac">{{fac}}</label>
</div>
<button class="close-button" data-close aria-label="Close reveal" type="button">
<span aria-hidden="true">×</span>
</button>
<button type="button" class="success button" data-close>OK</button>
</div>
<button class="button" type="button" data-toggle="startdate-dropdown">Start Date ({{ selectedStartDate }})</button>
<div class="reveal" id="startdate-dropdown" data-reveal>
<div>
<input type="checkbox" id="includeActivitiesInFuture" v-model="includeFutureActivities">
<label for="includeActivitiesInFuture">Also include activities beginning after Start Date</label>
</div>
<date-picker date-format="yy-M-dd" placeholder-value="2018-Dec-25" v-bind:initial-value="selectedStartDate" @update-date="updateStartDate"></date-picker>
<button class="close-button" data-close aria-label="Close reveal" type="button">
<span aria-hidden="true">×</span>
</button>
<button type="button" class="success button" data-close>OK</button>
</div>
<button class="button" type="button" data-toggle="ages-dropdown">Age Ranges ({{selectedAgeRanges.length}})</button>
<div class="reveal" id="ages-dropdown" data-reveal>
<div v-for="age in ageRanges">
<input type="checkbox" v-bind:id="'age_' + age" v-bind:value="age" v-model="selectedAgeRanges">
<label v-bind:for="'age_' + age">{{age}}</label>
</div>
<button class="close-button" data-close aria-label="Close reveal" type="button">
<span aria-hidden="true">×</span>
</button>
<button type="button" class="success button" data-close>OK</button>
</div>
<button class="button" type="button" data-toggle="activityTypes-dropdown">Activity Types ({{selectedActivityTypes.length}})</button>
<div class="reveal" id="activityTypes-dropdown" data-reveal>
<div v-for="type in activityTypes">
<input type="checkbox" v-bind:id="'type_' + type" v-bind:value="type" v-model="selectedActivityTypes">
<label v-bind:for="'type_' + type">{{type}}</label>
</div>
<button class="close-button" data-close aria-label="Close reveal" type="button">
<span aria-hidden="true">×</span>
</button>
<button type="button" class="success button" data-close>OK</button>
</div>
<!-- For debugging
<div>Selected Facilities: {{ selectedFacilities }}</div>
<div>Selected Date: {{ selectedStartDate }}, {{ includeFutureActivities }}</div>
<div>Selected Age Ranges: {{ selectedAgeRanges }}</div>
<div>Selected Activity Types: {{ selectedActivityTypes }}</div>
-->
<h2>Step 2: Click 'Search' and review which Activities match.</h2>
<div>
<button class="success button" v-on:click="initiatedSearch = true">Search</button>
</div>
<h2 v-if="initiatedSearch">Step 3: Click 'Register' or refine search criteria (automatically refreshes matches).</h2>
<div v-for="activity in results">
<template v-if="initiatedSearch && includeResult(activity)">
<div class="card">
<div class="card-divider">
{{ activity.course_title }}
</div>
<div class="card-section">
{{ activity.course_description }}
</div>
<div class="card-section">
<span>@ {{ activity.facility }}</span>
from <span>{{ activity.start_date }}</span> to <span>{{ activity.end_date }}</span>
during <span>{{ activity.start_time }}</span> to <span>{{ activity.end_time }}</span>
on {{ activity.day_of_week }}
</div>
<div class="card-section">
Age: {{ activity.age }}
</div>
<div class="card-section">
Fees: {{ activity.fee }}
</div>
<div class="card-section">
Course Code: {{ activity.course_id }}
</div>
<div class="card-section">
<form action="https://ereg.edmonton.ca/Activities/ActivitiesCourseDetails.asp" method="get" target="_blank">
<input name="aid" type="hidden" v-bind:value="activity.activity_id">
<input name="cid" type="hidden" v-bind:value="activity.course_id">
<input type="submit" class="alert button" value="Register">
</form>
</div>
</div>
</template>
</div>
</div>
</div>
<!-- TODO: development version, includes helpful console warnings -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<!-- For data retrieval -->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<!-- For UI behavior (Reveal) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.3/js/foundation.js"></script>
<!-- For date picker UI control -->
<script
src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"
integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU="
crossorigin="anonymous"></script>
<script src="app.js"></script>
</body>
</html>