Skip to content
Snippets Groups Projects
Commit d80a2de8 authored by Claas Kazzer's avatar Claas Kazzer :speech_balloon: Committed by Frank Morgner
Browse files

refs #13924

* fixes Lido schema tagging in finc
parent 182b4726
No related merge requests found
<!-- finc: RecordDriver - solrLido - core --> <!-- finc: RecordDriver - solrLido - core -->
<? /* keep schema tagging here in finc - CK, #13861 */ ?>
<div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product"> <div class="media" vocab="http://schema.org/" resource="#record" typeof="<?=$this->driver->getSchemaOrgFormats()?> Product">
<? <?
if ($loggedin = $this->auth()->isLoggedIn()) { if ($loggedin = $this->auth()->isLoggedIn()) {
...@@ -56,7 +57,7 @@ ...@@ -56,7 +57,7 @@
<div class="media-body"> <div class="media-body">
<? /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars <? /* finc: We want to get rid of trailing special chars in the title and limit its length to 100 chars
remove schema name tag here but keept in description, CK in finc: keep schema name tag here!! #13861 CK
*/ */
?> ?>
<h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h3> <h3 property="name"><?=$this->escapeHtml(preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->truncate($this->driver->getShortTitle() . ' ' . $this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection(), 100)))?></h3>
......
...@@ -14,10 +14,12 @@ $formattedAuthors = []; ...@@ -14,10 +14,12 @@ $formattedAuthors = [];
<? if (!empty($data[$type])): ?> <? if (!empty($data[$type])): ?>
<? foreach ($data[$type] as $author => $roles): ?> <? foreach ($data[$type] as $author => $roles): ?>
<? ob_start(); ?> <? ob_start(); ?>
<span class="author-data" property="<?=$this->escapeHtml($schemaLabel)?>"> <span class="author-data" property="<?=$this->escapeHtml($schemaLabel)?>" typeof="Person">
<span property="name">
<a href="<?=$this->record($this->driver)->getLink('author', $author)?>"> <a href="<?=$this->record($this->driver)->getLink('author', $author)?>">
<?=$this->escapeHtml($author)?> <?=$this->escapeHtml($author)?>
</a> </a>
</span>
<? <?
// Display additional data using the appropriate translation prefix // Display additional data using the appropriate translation prefix
// (for example, to render author roles correctly): // (for example, to render author roles correctly):
...@@ -28,7 +30,7 @@ $formattedAuthors = []; ...@@ -28,7 +30,7 @@ $formattedAuthors = [];
// deprecated due to more flexible solution at core // deprecated due to more flexible solution at core
// to-do: revision of indexing and finc specific treatment // to-do: revision of indexing and finc specific treatment
// of roles in RecordDriver // of roles in RecordDriver
if (count($roles) > 0 && $name == 'roles') { if (count($roles) > 0 && $name == 'role') {
echo $formatProperty($roles, $name, $prefix); echo $formatProperty($roles, $name, $prefix);
} }
} }
......
...@@ -6,8 +6,10 @@ $this->headTitle($this->translate('Description') . ': ' . $this->driver->getBrea ...@@ -6,8 +6,10 @@ $this->headTitle($this->translate('Description') . ': ' . $this->driver->getBrea
$formatter = $this->recordDataFormatter(); $formatter = $this->recordDataFormatter();
$mainFields = $formatter->getData($driver, $formatter->getDefaults('description')); $mainFields = $formatter->getData($driver, $formatter->getDefaults('description'));
?> ?>
<? /* finc: remove schema tag here but keep in core,*/ ?>
<table class="table table-striped"> <table class="table table-striped">
<? /* finc: table summary not supported in html 5, finc-specific solution, CK */ ?> <? /* finc: table summary not supported in html 5, finc-specific solution, CK */
/* Table gets filled via recordDriver/.../data-... templates as referenced in RecordDataFormatterFactory */ ?>
<caption class="sr-only"><?=$this->transEsc('Description')?></caption> <caption class="sr-only"><?=$this->transEsc('Description')?></caption>
<? if (!empty($mainFields)): ?> <? if (!empty($mainFields)): ?>
<? foreach ($mainFields as $key => $current): ?> <? foreach ($mainFields as $key => $current): ?>
......
...@@ -6,6 +6,10 @@ $this->headTitle($this->translate('Description') . ': ' . $this->driver->getBrea ...@@ -6,6 +6,10 @@ $this->headTitle($this->translate('Description') . ': ' . $this->driver->getBrea
$formatter = $this->recordDataFormatter(); $formatter = $this->recordDataFormatter();
$mainFields = $formatter->getData($driver, $formatter->getDefaults('description-lido')); $mainFields = $formatter->getData($driver, $formatter->getDefaults('description-lido'));
?> ?>
<? /*
This next table originally in table "Display Main Details" in solrDefault - core templates, compare with core and with description.phtml! CK
/* finc: remove schema tag here but keep in core,*/
?>
<table class="table table-striped"> <table class="table table-striped">
<? /* Table summary not supported in html 5, finc-specific solution, CK */ ?> <? /* Table summary not supported in html 5, finc-specific solution, CK */ ?>
<caption class="sr-only"><?= $this->transEsc('Description') ?></caption> <caption class="sr-only"><?= $this->transEsc('Description') ?></caption>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment