Skip to content
Snippets Groups Projects
Commit bf649561 authored by Jean-Pascal Kanter's avatar Jean-Pascal Kanter :speech_balloon: Committed by Robert Lange
Browse files

refs #25942 [fid_bbi] release/fid_bbi/2024_06 added cambridge source to list of bbi ebook tags

parent 91317182
Branches
No related merge requests found
......@@ -253,3 +253,4 @@ group.limit = 10
[BBIEbooks]
source_id[] = 222
source_id[] = 220
......@@ -193,4 +193,21 @@ class Record extends \finc\View\Helper\Root\Record
return false;
}
}
/**
* Bundles the logic for multiple, and future tags that might be needed to especially label records
*
* @return array all tags for special markers
*/
public function getBBITags()
{
$tags = [];
if ($this->allowDirectDelivery()) {
$tags[] = ['token' => "New Publication", 'class' => "new-publication-marker"];
}
if ($this->isBBIEbook()) {
$tags[] = ['token' => "bbi_ebooks_note", 'class' => "bbi-ebook-marker"];
}
return $tags;
}
}
......@@ -149,17 +149,14 @@ $licencedDriver = !empty($config->LimitedLicenses->driver_names) ?
<?=!empty($collection) && (empty($imprintLines) || $collection[0] !== $imprintLines[0]) ? $collection[0] : ''?>
</div>
<?php if ($this->record($this->driver)->allowDirectDelivery()): ?>
<div class="new-publication-marker">
<span class="label"><?=$this->translate('New Publication')?></span>
</div>
<?php endif; ?>
<?php if ($this->record($this->driver)->isBBIEbook()): ?>
<div class="bbi-ebook-marker">
<span class="label"><?=$this->translate('bbi_ebooks_note')?></span>
<?php // tags, or rather those small boxes below that show that this is something special ?>
<?php if ($tags = $this->record($this->driver)->getBBITags()): ?>
<?php foreach ( $tags as $tag ):?>
<div class="<?=$tag['class']?>">
<span class="label"><?=$this->translate($tag['token'])?></span>
</div>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
</div>
......
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