Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions application/view/omeka/site/item/browse.phtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
use Omeka\Api\Representation\ValueRepresentation;

$translate = $this->plugin('translate');
$escape = $this->plugin('escapeHtml');
$thumbnail = $this->plugin('thumbnail');
Expand Down Expand Up @@ -44,7 +46,10 @@ $headingTerm = $this->siteSetting('browse_heading_property_term');
$bodyTerm = $this->siteSetting('browse_body_property_term');
foreach ($items as $item):
$heading = $headingTerm ? $item->value($headingTerm, ['default' => $translate('[Untitled]'), 'lang' => $valueLang]) : $item->displayTitle(null, $valueLang);
$body = $bodyTerm ? $item->value($bodyTerm, ['lang' => $valueLang]) : $item->displayDescription(null, $valueLang);
$body = $bodyTerm ? $item->value($bodyTerm, ['lang' => $valueLang]) : $escape($item->displayDescription(null, $valueLang));
if ($body instanceof ValueRepresentation) {
$body = $body->asHtml();
}
?>
<li class="item resource">
<?php
Expand All @@ -54,7 +59,7 @@ foreach ($items as $item):
echo $item->linkRaw($linkContent, null, ['class' => 'resource-link']);
?>
<?php if ($body): ?>
<div class="description"><?php echo $escape($body); ?></div>
<div class="description"><?php echo $body; ?></div>
<?php endif; ?>
</li>
<?php endforeach; ?>
Expand Down