forked from dingproject/ting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ting_object.tpl.php
84 lines (72 loc) · 2.57 KB
/
ting_object.tpl.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
<?php
/**
* @file ting_object.tpl.php
*
* Template to render objects from the Ting database.
*/
?>
<div id="ting-item-<?php print $ting_local_id; ?>" class="ting-item ting-item-full">
<div class="ting-overview clearfix">
<div class="left-column left">
<div class="picture">
<?php if ($image) { ?>
<?php print $image; ?>
<?php } ?>
</div>
</div>
<div class="right-column left">
<h2><?php print $ting_title; ?></h2>
<div class='creator'>
<?php if (sizeof($ting_creators_links) == 1) { ?>
<span class='byline'><?php echo ucfirst(t('by')); ?></span>
<?php print $ting_creators_links[0]; ?>
<?php } ?>
<?php if ($ting_publication_date) { ?>
<span class='date'>(<?php print $ting_publication_date; ?>)</span>
<?php } ?>
</div>
<?php if (isset($ting_title_full)) { ?>
<p class="title-info">
<span class="label"><?php print t('Additional title information:')?></span>
<?php print $ting_title_full; ?>
</p>
<?php }?>
<p class="abstract"><?php print $ting_abstract; ?></p>
<?php if (isset($ting_series_links)) { ?>
<p class="series">
<span class="label"><?php print t('Series:')?></span>
<?php print theme('item_list', $ting_series_links, NULL, 'span'); ?>
</p>
<?php } ?>
<?php if (isset($additional_main_content)) { print drupal_render($additional_main_content); } ?>
</div>
<?php if ($buttons) :?>
<div class="ting-object-buttons">
<?php print theme('item_list', $buttons, NULL, 'ul', array('class' => 'buttons')) ?>
</div>
<?php endif; ?>
</div>
<div class="object-information ting-details clearfix">
<?php print $ting_details; ?>
</div>
<?php
$collection = ting_get_collection_by_id($object->id);
if ($collection instanceof TingClientObjectCollection && is_array($collection->types)) {
// Do we have more than only this one type?
if (count($collection->types) > 1) {
print '<div class="ding-box-wide object-otherversions">';
print '<h3>'. t('Also available as: ') . '</h3>';
print "<ul>";
foreach ($collection->types as $type) {
if ($type != $object->type) {
$material_links[] = '<li class="category">' . l($type, $collection->url, array('fragment' => $type)). '</li>';
}
}
print implode(' ', $material_links);
print "</ul>";
print "</div>";
}
}
?>
<?php if (isset($additional_content)) { print drupal_render($additional_content); } ?>
</div>