66 lines
1.9 KiB
PHTML
66 lines
1.9 KiB
PHTML
|
<?php
|
||
|
$translate = $this->plugin('translate');
|
||
|
$escape = $this->plugin('escapeHtml');
|
||
|
$this->htmlElement('body')->appendAttribute('class', 'item resource show');
|
||
|
$embedMedia = $this->siteSetting('item_media_embed', false);
|
||
|
$itemMedia = $item->media();
|
||
|
$showLayout = $this->themeSetting('show_layout');
|
||
|
?>
|
||
|
|
||
|
<div class="resource-title">
|
||
|
<?php echo $this->pageTitle($item->displayTitle(), 2); ?>
|
||
|
<h3 class="label"><?php echo $translate('Item'); ?></h3>
|
||
|
</div>
|
||
|
|
||
|
<div class="grid-x">
|
||
|
|
||
|
<?php if ($embedMedia && $itemMedia): ?>
|
||
|
<div class="media-embeds">
|
||
|
<?php foreach ($itemMedia as $media):
|
||
|
echo $media->render();
|
||
|
endforeach;
|
||
|
?>
|
||
|
</div>
|
||
|
<?php endif; ?>
|
||
|
<?php if (!$embedMedia && $itemMedia): ?>
|
||
|
<div class="media-list">
|
||
|
<?php foreach ($itemMedia as $media): ?>
|
||
|
<?php echo $media->linkPretty(); ?>
|
||
|
<?php endforeach; ?>
|
||
|
</div>
|
||
|
<?php endif; ?>
|
||
|
|
||
|
<div id="resource-values" class="<?php echo ($showLayout == 'inline') ? 'inline' : 'stack'; ?>">
|
||
|
<?php $this->trigger('view.show.before'); ?>
|
||
|
<?php echo $item->displayValues(); ?>
|
||
|
<?php $itemSets = $item->itemSets(); ?>
|
||
|
<dl>
|
||
|
<?php if (count($itemSets) > 0): ?>
|
||
|
<div class="property">
|
||
|
<dt><?php echo $translate('Item sets'); ?></dt>
|
||
|
<div class="values">
|
||
|
<?php foreach ($itemSets as $itemSet): ?>
|
||
|
<dd class="value"><a href="<?php echo $escape($itemSet->url()); ?>"><?php echo $itemSet->displayTitle(); ?></a></dd>
|
||
|
<?php endforeach; ?>
|
||
|
</div>
|
||
|
</div>
|
||
|
<?php endif; ?>
|
||
|
</dl>
|
||
|
|
||
|
<?php
|
||
|
$page = $this->params()->fromQuery('page', 1);
|
||
|
$property = $this->params()->fromQuery('property');
|
||
|
$subjectValues = $item->displaySubjectValues($page, 25, $property);
|
||
|
?>
|
||
|
<?php if ($subjectValues): ?>
|
||
|
<div id="item-linked">
|
||
|
<h3><?php echo $translate('Linked resources'); ?></h3>
|
||
|
<?php echo $subjectValues; ?>
|
||
|
</div>
|
||
|
<?php endif; ?>
|
||
|
|
||
|
<?php $this->trigger('view.show.after'); ?>
|
||
|
</div>
|
||
|
|
||
|
</div>
|