-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnews_event.php
More file actions
133 lines (106 loc) · 4.06 KB
/
news_event.php
File metadata and controls
133 lines (106 loc) · 4.06 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
<?php
$showchildren = "n";
$showsiblings = "n";
$titleoverride = "";
include("./inc/head.php");
$image = $page->image;
if ($image) {
$img_sized = $image->size(600);
$img = "<div class='pull-right col-sm-6'>
<img src='{$img_sized->url}' class='img-responsive thumbnail' alt='{$page->image->description}'>
</div>";
}
$date_start = date("M j Y", $page->date_start); // Formating the date correctly
$date_end = date("M j Y", $page->date_end); // Formating the date correctly
if ($date_end == $date_start) { unset($date_end); }
$event_time_start = date("g:i A", $page->date_start); // Formating the date correctly
$event_time_end = date("g:i A", $page->date_end); // Formating the date correctly
?>
<div class="row">
<div class="col-sm-9">
<div class="content-space content-border"><h2 class='page-title'><?=$page->title; ?></h2>
<h4 class="margin-xs">
<?
$tempkey = "0"; // This tempkey to zero
$tempcount = $page->relate_event_type->count(); // This checks how many events types are in the array
foreach($page->relate_event_type as $child) {
$tempkey++; // This increments the tempkey above
echo $child->title;
if($tempcount > $tempkey) { echo " | "; } // This checks to see if the event key is less then acount
}
?>
~ <?=$date_start; ?> (<?=$event_time_start; ?>) <span class="text-muted">to</span> <?=$date_end; ?> (<?=$event_time_end; ?>)</h4>
<?
if(count($page->children)) {
echo "<div class='row padding-bottom-sm padding-top-sm'>";
//$tempcss = ($i % 2 == 1 ? 'active' : '');
echo "<div class='col-sm-12'><ul class='nav nav-tabs' role='tablist'>
<li class='active'><a href='{$page->url}' title='{$page->title}'>Overview</a></li>";
foreach($page->children as $match) {
if($match->template == "rsvp_form") { $tempcss = "btn-info text-white";}
$tempval .= "<li><a href='{$match->url}' class='$tempcss' style='' title='{$match->title}'>{$match->title}</a></li>";
unset($tempcss);
}
echo $tempval;
echo "</ul></div>";
echo "</div>";
}
?>
<div class="row">
<div class="col-sm-12">
<?php
$key = 0;
if(count($page->repeat_callout)) {
echo "<div class='row padding-top-md'>";
foreach($page->repeat_callout as $match) {
$templink = ($match->relate_page->url ? $match->relate_page->url : $match->url_website);
if($templink) {
$temphrefopen = "<a class='' href='{$templink}'>";
$temphrefclose = "</a>";
$temphrefmore = "<a class='btn btn-xs btn-default' title='{$match->label}' href='{$templink}'>more »</a>";
}
if($match->image){
$img_sized = $match->image->size(300,200);
$img_src = "<div class='col-xs-4'>{$temphrefopen}<img src='{$img_sized->url}' class='img-responsive thumbnail' alt='{$img_sized->title}' />{$temphrefclose}</div>";
}
echo "<div class='col-sm-12 col-xs-12 padding-bottom-md'>
<div class='col-sm-8'>
{$temphrefopen}<h4 class='headingtight'>{$match->label}</h4> {$temphrefclose}
<p class=' hidden-xs text-sm text-muted'>{$match->summary}</p> {$temphrefmore}
</div>{$img_src}
</div>
";
unset($templink);
unset($temphrefopen);
unset($temphrefclose);
unset($temphrefmore);
}
echo "</div>";
}
?>
</div>
<div class="col-sm-12 padding-bottom-sm">
<span class='bodytext'><?=$page->body; ?> </span>
</div>
<? if($page->event_location || $page->mapmarker) { ?>
<div class="col-sm-12">
<hr />
<h4><?=$page->event_location; ?></h4>
<div class='row'>
<div class="col-sm-12">
<?=$page->mapmarker->address; ?>
</div>
</div>
<?
$mapmarker = $modules->get('MarkupGoogleMap');
echo $mapmarker->render($page, 'mapmarker');
?>
</div>
<? } ?>
</div>
<hr />
<?=$img; ?>
</div></div>
<? include("./inc/nav_well_root.php"); ?>
</div>
<? include("./inc/foot.php");