-
Notifications
You must be signed in to change notification settings - Fork 1
/
leadership_list.php
136 lines (123 loc) · 5.41 KB
/
leadership_list.php
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
<?php
$showchildren = "n";
$showsiblings = "n";
$titleoverride = "";
include("./inc/head.php");
?>
<div id="page_body" class="row">
<div class='col-sm-9'>
<h2><?php echo $page->title; ?></h2>
<span class='bodytext'><?=$page->body; ?> </span>
<ul class="nav nav-tabs">
<?
$matches = $pages->find("template=working_group, leadership>=1, sort=sort");
foreach($matches as $match) {
$i++; // Increments the key
$tempclass = ($i == 1 ? 'active' : '');
echo "<li class='{$tempclass}'><a href='#id_{$match->id}' data-toggle='tab'>{$match->title}</a></li>";
}
unset($tempclass);
?>
</ul>
<div class="tab-content">
<?
$matches = $pages->find("template=working_group, leadership>=1, sort=sort");
foreach($matches as $match) {
$ii++; // Increments the key
$tempclass = ($ii == 1 ? 'active' : '');
echo "<div class='{$tempclass} tab-pane' id='id_{$match->id}'>";
// Finds all of the working groups that this staff ID is tied with as a CHAIR.
$submatches = $match->relate_staff_chair;
unset($tempclass);
if(count($submatches)) {
echo "<h3>Chairs</h3><div class='row'>";
foreach($submatches as $submatch) {
$i++; // Increments the key
$temprow = ($i % 3 == 1 ? 'clear-left' : ''); // adds this class to the 3rd
if($submatch->image) {
$img_sized = $submatch->image->size(200,200)->url;
$tempimg = "<img src='{$img_sized}' class='thumbnail img img-responsive img-rounded' alt='{$submatch->title}'>";
} else {
$tempimg = "<img src='{$config->urls->templates}assets/brand/icons/user.jpg' class='img img-responsive img-rounded' alt='{$submatch->title}'>";
}
echo "<div class='col-sm-4 {$temprow} padding-bottom-lg margin-bottom-lg text-tight'>
<a class='text-black clearfix' href='{$submatch->url}' title='{$submatch->title} - {$submatch->staff_title}'>
<div class='col-sm-10 col-sm-offset-1'>
{$tempimg}
{$submatch->title}
<div class='text-xs text-muted hidden-sm'>{$submatch->staff_title}</div>
</div>
</a>
</div>
";
}
echo "</div>";
unset($submatches);
unset($i);
unset($tempclass);
}
// Finds all of the working groups that this staff ID is tied with as a MEMBER.
$submatches = $match->relate_staff;
if(count($submatches)) {
echo "<h3 class='clearfix'>Members</h3><div class='row'>";
foreach($submatches as $submatch) {
$i++; // Increments the key
$temprow = ($i % 3 == 1 ? 'clear-left' : ''); // adds this class to the 3rd
if($submatch->image) {
$img_sized = $submatch->image->size(200,200)->url;
$tempimg = "<img src='{$img_sized}' class='thumbnail img img-responsive img-rounded' alt='{$submatch->title}'>";
} else {
$tempimg = "<img src='{$config->urls->templates}assets/brand/icons/user.jpg' class='img img-responsive img-rounded' alt='{$submatch->title}'>";
}
echo "<div class='col-sm-4 {$temprow} padding-bottom-lg margin-bottom-lg text-tight'>
<a class='text-black clearfix' href='{$submatch->url}' title='{$submatch->title} - {$submatch->staff_title}'>
<div class='col-sm-10 col-sm-offset-1'>
{$tempimg}
{$submatch->title}
<div class='text-xs text-muted hidden-sm'>{$submatch->staff_title}</div>
</div>
</a>
</div>
";
}
echo "</div>";
unset($submatches);
unset($i);
unset($tempclass);
}
// Finds all of the working groups that this staff ID is tied with as a Coordinator.
$submatches = $match->relate_staff_coordinator;
if(count($submatches)) {
echo "<h3 class='clearfix'>Coordinators</h3><div class='row'>";
foreach($submatches as $submatch) {
$i++; // Increments the key
$temprow = ($i % 3 == 1 ? 'clear-left' : ''); // adds this class to the 3rd
if($submatch->image) {
$img_sized = $submatch->image->size(200,200)->url;
$tempimg = "<img src='{$img_sized}' class='thumbnail img img-responsive img-rounded' alt='{$submatch->title}'>";
} else {
$tempimg = "<img src='{$config->urls->templates}assets/brand/icons/user.jpg' class='img img-responsive img-rounded' alt='{$submatch->title}'>";
}
echo "<div class='col-sm-4 {$temprow} padding-bottom-lg margin-bottom-lg text-tight'>
<a class='text-black clearfix' href='{$submatch->url}' title='{$submatch->title} - {$submatch->staff_title}'>
<div class='col-sm-10 col-sm-offset-1'>
{$tempimg}
{$submatch->title}
<div class='text-xs text-muted hidden-sm'>{$submatch->staff_title}</div>
</div>
</a>
</div>
";
}
echo "</div>";
unset($submatches);
unset($i);
unset($tempclass);
}
echo "</div>";
}
?>
</div></div>
<? include("./inc/nav_well.php"); ?>
</div>
<? include("./inc/foot.php");