forked from dingproject/dynamo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode-event.tpl.php
More file actions
88 lines (70 loc) · 1.98 KB
/
node-event.tpl.php
File metadata and controls
88 lines (70 loc) · 1.98 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
<?php
// $Id$
/**
* @file
* Template to render event nodes.
*/
?>
<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix">
<?php if ($page == 0): ?>
<div class="picture"><?php print $field_list_image[0]['view']; ?></div>
<div class="content">
<?php if ($node->title): ?>
<h3><?php print l($node->title, 'node/' . $node->nid); ?></h3>
<?php endif; ?>
<div class="meta">
<?php print $field_datetime_rendered ?>
<?php print $field_library_ref_rendered ?>
<?php print $field_entry_price_rendered ?>
</div>
<?php
//field_teaser
if ($node->field_teaser[0]['value']) {
print $node->field_teaser[0]['value'];
}
else {
print strip_tags($node->content['body']['#value']);
}
?>
<?php // adding warning for event that has already occurred
if ($past_event): ?>
<div class="alert"><?php print t('NB! This event occurred in the past.'); ?></div>
<?php endif; ?>
</div>
<?php else:
//Content
?>
<?php if($node->title){ ?>
<h2><?php print $title;?></h2>
<?php } ?>
<?php
// adding warning for event that has already occurred
if ($past_event): ?>
<div class="alert"><?php print t('NB! This event occurred in the past.'); ?></div>
<?php endif; ?>
<div class="content">
<div class="meta">
<?php print $field_datetime_rendered ?>
<?php print $field_entry_price_rendered ?>
</div>
<?php print $content ?>
</div>
<div class="meta">
<span class="time">
<?php print t('This event was created'); ?>
<?php print format_date($node->created, 'custom', "j. F Y") ?>
</span>
<span class="author">
<?php print t('by'); ?> <?php print theme('username', $node); ?>
</span>
<?php if (count($taxonomy)){ ?>
<div class="taxonomy">
<?php print t("Tags:") . " " . $terms ?>
</div>
<?php } ?>
</div>
<?php if ($links){ ?>
<?php print $links; ?>
<?php } ?>
<?php endif; ?>
</div>