<?php $escape = $this->plugin('escapeHtml'); ?>
<?php $this->htmlElement('body')->appendAttribute('class', 'item resource show'); ?>

<?php echo $this->pageTitle($item->displayTitle(), 2); ?>
<h3><?php echo $this->translate('Item'); ?></h3>
<?php $this->trigger('view.show.before'); ?>
<?php echo $item->displayValues(); ?>
<div class="property">
    <?php $itemSets = $item->itemSets(); ?>
    <?php if (count($itemSets) > 0): ?>
    <h4><?php echo $this->translate('Item Sets'); ?></h4>
    <?php foreach ($item->itemSets() as $itemSet): ?>
    <div class="value"><a href="<?php echo $escape($itemSet->url()); ?>"><?php echo $itemSet->displayTitle(); ?></a></div>
    <?php endforeach; ?>
    <?php endif; ?>
</div>
<?php if ($item->media()): ?>
<div class="media-list">
    <?php foreach ($item->media() as $media): ?>
        <a href="<?php echo $media->url(); ?>" class="media resource">
            <img src="<?php echo $escape($media->thumbnailUrl('medium')); ?>" title="<?php echo $escape($media->displayTitle()); ?>">
        </a>
    <?php endforeach; ?>
</div>
<?php endif; ?>
<?php $this->trigger('view.show.after'); ?>
