<?php
$translate = $this->plugin('translate');
$escape = $this->plugin('escapeHtml');
?>
<h3><?php echo $translate($resource->link($resource->label())); ?></h3>
<?php foreach ($resource->resourceTemplateProperties() as $resourceTemplateProperty): ?>
<?php
$property = $resourceTemplateProperty->property();
$propertyAltLabel = $escape($resourceTemplateProperty->alternateLabel());
$propertyAltComment = $escape($resourceTemplateProperty->alternateComment());
?>
<div class="meta-group">
    <h4><?php echo ($propertyAltLabel) ? $propertyAltLabel : $escape($translate($property->label())); ?></h4>
    <div class="comment"><?php echo ($propertyAltComment) ? $propertyAltComment : $escape($translate($property->comment())); ?></div>
</div>
<?php endforeach; ?>
<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' => ['resource_template_id' => $resource->id()]])); ?></div>
</div>
<?php $this->trigger('view.details', array('entity' => $resource)); ?>
