Skip to content

Commit

Permalink
Honor heading/body property term settings in public item set browse
Browse files Browse the repository at this point in the history
Fixes #1378
  • Loading branch information
jimsafley committed Mar 12, 2019
1 parent 16b1cb5 commit 0918d86
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions application/view/omeka/site/item-set/browse.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ $escape = $this->plugin('escapeHtml');
$translate = $this->plugin('translate');

$this->htmlElement('body')->appendAttribute('class', 'item-set resource browse');
$headingTerm = $this->siteSetting('browse_heading_property_term', 'dcterms:title');
$bodyTerm = $this->siteSetting('browse_body_property_term', 'dcterms:description');
?>

<?php echo $this->pageTitle($translate('Item sets'), 2); ?>
Expand All @@ -16,15 +18,19 @@ $this->htmlElement('body')->appendAttribute('class', 'item-set resource browse')

<?php $this->trigger('view.browse.before'); ?>
<ul class="resource-list">
<?php foreach ($itemSets as $itemSet): ?>
<?php
foreach ($itemSets as $itemSet):
$heading = $itemSet->value($headingTerm, ['default' => $translate('[Untitled]')]);
$body = $itemSet->value($bodyTerm);
?>
<li class="item-set resource">
<?php echo $itemSet->linkRaw($this->thumbnail($itemSet, 'medium')); ?>
<h4><?php echo $itemSet->link($itemSet->displayTitle()); ?></h4>
<?php if ($description = $itemSet->displayDescription()): ?>
<div class="description"><?php echo $description; ?></div>
<h4><?php echo $itemSet->link($heading); ?></h4>
<?php if ($body): ?>
<div class="description"><?php echo $body; ?></div>
<?php endif; ?>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
<?php $this->trigger('view.browse.after'); ?>
<?php echo $this->pagination(); ?>

0 comments on commit 0918d86

Please sign in to comment.