2021-04-25 09:49:47 +02:00
|
|
|
<?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');
|
|
|
|
?>
|
|
|
|
|
2021-05-17 22:18:06 +02:00
|
|
|
<?php
|
|
|
|
$site->pages();
|
|
|
|
// set header image
|
|
|
|
$img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getSiteImage($site);
|
|
|
|
if ($img_src) {
|
|
|
|
?>
|
|
|
|
<style>
|
|
|
|
#archive_header_img {
|
|
|
|
background:url("<?= $img_src ?>") no-repeat;
|
|
|
|
width:100%;
|
|
|
|
height:100px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<?php } else { ?>
|
|
|
|
<style>
|
|
|
|
#archive_header_img {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<?php } ?>
|
|
|
|
|
2021-05-22 21:56:48 +02:00
|
|
|
<script>
|
|
|
|
$("#archive_page_title").html('<?= $site->title(); ?>');
|
|
|
|
</script>
|
2021-05-17 22:18:06 +02:00
|
|
|
|
2021-05-24 18:13:23 +02:00
|
|
|
|
2021-04-25 09:49:47 +02:00
|
|
|
<div class="resource-title">
|
|
|
|
<?php echo $this->pageTitle($item->displayTitle(), 2); ?>
|
|
|
|
</div>
|
2021-05-24 18:13:23 +02:00
|
|
|
|
2021-04-25 09:49:47 +02:00
|
|
|
|
|
|
|
<div class="grid-x">
|
2021-05-17 22:18:06 +02:00
|
|
|
|
2021-04-25 09:49:47 +02:00
|
|
|
<?php if ($embedMedia && $itemMedia): ?>
|
|
|
|
<div class="media-embeds">
|
2021-05-24 18:13:23 +02:00
|
|
|
<?php foreach ($itemMedia as $media):
|
|
|
|
echo $media->render();
|
|
|
|
endforeach;
|
|
|
|
?>
|
2021-04-25 09:49:47 +02:00
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
2021-05-24 18:13:23 +02:00
|
|
|
|
2021-04-25 09:49:47 +02:00
|
|
|
<?php if (!$embedMedia && $itemMedia): ?>
|
|
|
|
<div class="media-list">
|
|
|
|
<?php foreach ($itemMedia as $media): ?>
|
|
|
|
<?php echo $media->linkPretty(); ?>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
2021-05-24 18:13:23 +02:00
|
|
|
|
2021-04-25 09:49:47 +02:00
|
|
|
<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(); ?>
|
2021-05-24 18:13:23 +02:00
|
|
|
<!-- remove items sets
|
2021-04-25 09:49:47 +02:00
|
|
|
<dl>
|
|
|
|
<?php if (count($itemSets) > 0): ?>
|
|
|
|
<div class="property">
|
|
|
|
<dt><?php echo $translate('Item sets'); ?></dt>
|
|
|
|
<div class="values">
|
|
|
|
<?php foreach ($itemSets as $itemSet): ?>
|
2021-05-24 18:13:23 +02:00
|
|
|
<dd class="value">
|
|
|
|
<a href="<?php echo $escape($itemSet->url()); ?>">
|
|
|
|
<?php echo $itemSet->displayTitle(); ?>
|
|
|
|
</a>
|
|
|
|
</dd>
|
2021-04-25 09:49:47 +02:00
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
</dl>
|
2021-05-24 18:13:23 +02:00
|
|
|
-->
|
2021-04-25 09:49:47 +02:00
|
|
|
<?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; ?>
|
2021-05-17 22:18:06 +02:00
|
|
|
|
2021-04-25 09:49:47 +02:00
|
|
|
<?php $this->trigger('view.show.after'); ?>
|
2021-05-24 18:54:53 +02:00
|
|
|
<button onclick="window.history.back()">
|
|
|
|
<h3 class="label">Back</h3>
|
|
|
|
</button>
|
2021-04-25 09:49:47 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|