<?php
$translate = $this->plugin('translate');
$escape = $this->plugin('escapeHtml');
?>
<div class="resource-details" data-resource-values="<?php echo $escape($values); ?>">
    <?php if ($linkTitle): ?>
    <h3 class="o-title"><?php echo $resource->link($resource->displayTitle()); ?></h3>
    <?php else: ?>
    <h3 class="o-title"><?php echo $escape($resource->displayTitle()); ?></h3>
    <?php endif; ?>
    <div class="o-description"><?php echo $escape($resource->displayDescription()); ?></div>
    <div class="meta-group">
        <h4><?php echo $translate('ID'); ?></h4>
        <div class="value"><?php echo $escape($resource->id()); ?></div>
    </div>
    <div class="meta-group">
        <h4><?php echo $escape($translate('Visibility')); ?></h4>
        <div class="value"><?php echo ($resource->isPublic()) ? $translate('Public') : $translate('Private'); ?></div>
        <div class="value"><?php echo ($resource->isOpen()) ? $escape($translate('Open to additions')) : $escape($translate('Closed to additions')); ?></div>
    </div>
    <div class="meta-group">
        <h4><?php echo $translate('Items'); ?></h4>
        <div class="value"><?php echo $this->hyperlink($resource->itemCount(), $this->url('admin/default', ['controller' => 'item', 'action' => 'browse'], ['query' => ['item_set_id' => $resource->id()]])); ?></div>
    </div>
    <?php $this->trigger('view.details', array('entity' => $resource)); ?>
</div>
