| Line 52... |
Line 52... |
| 52 |
print $h->div ({ class=>"bio" }, $coach->{bio}).$h->div (' ') if $coach->{bio};
|
52 |
print $h->div ({ class=>"bio" }, $coach->{bio}).$h->div (' ') if $coach->{bio};
|
| Line 53... |
Line 53... |
| 53 |
|
53 |
|
| 54 |
|
54 |
|
| 55 |
# First display the list of classes for this year...
|
55 |
# First display the list of classes for this year...
|
| 56 |
my $class_list_sql = <<class_list_sql;
|
56 |
my $class_list_sql = <<class_list_sql;
|
| 57 |
select v_class_new.id, name, v_class_new.dayofweek, v_class_new.date, v_class_new.time, v_class_new.start_time, v_class_new.location, level, available from v_class_new
|
57 |
select v_class_new.id, name, v_class_new.dayofweek, v_class_new.date, v_class_new.time, v_class_new.start_time, v_class_new.location, level, available, count from v_class_new
|
| 58 |
left join v_shift on
|
58 |
left join v_shift on
|
| 59 |
v_class_new.date = v_shift.date and
|
59 |
v_class_new.date = v_shift.date and
|
| 60 |
time(v_class_new.start_time) = time(v_shift.start_time) and
|
60 |
time(v_class_new.start_time) = time(v_shift.start_time) and
|
| 61 |
v_class_new.location = v_shift.location and
|
61 |
v_class_new.location = v_shift.location and
|
| 62 |
v_shift.dept = "COA"
|
62 |
v_shift.dept = "COA"
|
| 63 |
where RCid = ? and year(v_class_new.date) = year(now())
|
63 |
where RCid = ? and year(v_class_new.date) = year(now())
|
| Line 64... |
Line 64... |
| 64 |
order by v_class_new.date, v_class_new.start_time
|
64 |
order by v_class_new.date, v_class_new.start_time
|
| 65 |
class_list_sql
|
65 |
class_list_sql
|
| 66 |
|
66 |
|
| 67 |
my @keys = qw(id class day date time start_time location level available);
|
67 |
my @keys = qw(id class day date time start_time location level available count);
|
| 68 |
my @classes = ($h->div ({ class=>"rTableRow" },[ $h->div ({ class=>"rTableHead", style=>"font-size: smaller;" }, qw(Class Day Date Time Location Level SignUp) ) ]));
|
68 |
my @classes = ($h->div ({ class=>"rTableRow" },[ $h->div ({ class=>"rTableHead", style=>"font-size: smaller;" }, qw(Class Day Date Time Location Level SignUp) ) ]));
|
| 69 |
foreach my $class (@{$dbh->selectall_arrayref ($class_list_sql, undef, $coachRCid)}) {
|
69 |
foreach my $class (@{$dbh->selectall_arrayref ($class_list_sql, undef, $coachRCid)}) {
|
| Line 88... |
Line 88... |
| 88 |
print $h->div ({ class=>"rTable", style=>"min-width: 0%;" }, [@classes], ' ') if scalar @classes > 1;
|
88 |
print $h->div ({ class=>"rTable", style=>"min-width: 0%;" }, [@classes], ' ') if scalar @classes > 1;
|
| Line 89... |
Line 89... |
| 89 |
|
89 |
|
| 90 |
|
90 |
|
| 91 |
# Then the list of Seminars for this year...
|
91 |
# Then the list of Seminars for this year...
|
| 92 |
my $seminar_list_sql = <<seminar_list_sql;
|
92 |
my $seminar_list_sql = <<seminar_list_sql;
|
| 93 |
select v_seminar_new.id, name, v_seminar_new.dayofweek, v_seminar_new.date, v_seminar_new.time, v_seminar_new.start_time, v_seminar_new.location, available from v_seminar_new
|
93 |
select v_seminar_new.id, name, v_seminar_new.dayofweek, v_seminar_new.date, v_seminar_new.time, v_seminar_new.start_time, v_seminar_new.location, available, count from v_seminar_new
|
| 94 |
left join v_shift on
|
94 |
left join v_shift on
|
| 95 |
v_seminar_new.date = v_shift.date and
|
95 |
v_seminar_new.date = v_shift.date and
|
| 96 |
time(v_seminar_new.start_time) = time(v_shift.start_time) and
|
96 |
time(v_seminar_new.start_time) = time(v_shift.start_time) and
|
| 97 |
v_seminar_new.location = v_shift.location and
|
97 |
v_seminar_new.location = v_shift.location and
|
| 98 |
v_shift.dept = "COA"
|
98 |
v_shift.dept = "COA"
|
| 99 |
where RCid = ? and year(v_seminar_new.date) = year(now())
|
99 |
where RCid = ? and year(v_seminar_new.date) = year(now())
|
| Line 100... |
Line 100... |
| 100 |
order by v_seminar_new.date, v_seminar_new.start_time
|
100 |
order by v_seminar_new.date, v_seminar_new.start_time
|
| 101 |
seminar_list_sql
|
101 |
seminar_list_sql
|
| 102 |
|
102 |
|
| 103 |
my @keys = qw(id seminar day date time start_time location available);
|
103 |
my @keys = qw(id seminar day date time start_time location available count);
|
| 104 |
my @seminars = ($h->div ({ class=>"rTableRow" },[ $h->div ({ class=>"rTableHead", style=>"font-size: smaller;" }, qw(Seminar Day Date Time Location SignUp) ) ]));
|
104 |
my @seminars = ($h->div ({ class=>"rTableRow" },[ $h->div ({ class=>"rTableHead", style=>"font-size: smaller;" }, qw(Seminar Day Date Time Location SignUp) ) ]));
|
| 105 |
foreach my $seminar (@{$dbh->selectall_arrayref ($seminar_list_sql, undef, $coachRCid)}) {
|
105 |
foreach my $seminar (@{$dbh->selectall_arrayref ($seminar_list_sql, undef, $coachRCid)}) {
|
| Line 158... |
Line 158... |
| 158 |
minute => 0,
|
158 |
minute => 0,
|
| 159 |
second => 0,
|
159 |
second => 0,
|
| 160 |
time_zone => 'America/Los_Angeles'
|
160 |
time_zone => 'America/Los_Angeles'
|
| 161 |
);
|
161 |
);
|
| Line 162... |
Line 162... |
| 162 |
|
162 |
|
| Line 163... |
Line 163... |
| 163 |
return "CLOSED (".$t->{capacity} - $t->{available}." Registered)" unless $now < $cutoff;
|
163 |
return "CLOSED ($t->{count} Registered)" unless $now < $cutoff;
|
| Line 164... |
Line 164... |
| 164 |
|
164 |
|
| 165 |
my $classkey = join '|', $t->{date}, $t->{start_time}, $t->{location};
|
165 |
my $classkey = join '|', $t->{date}, $t->{start_time}, $t->{location};
|