The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit d1f90f07 authored by Gregor Gawol's avatar Gregor Gawol Committed by Dorian Merz
Browse files

refs #18560 [master] BARF improve finc missing

* cleans up FincMissing - result-list
* purges redundant code from FincMissing - result-list

co-authored by: "Claas Kazzer <kazzer@uni-leipzig.de>"
parent eff614a8
No related merge requests found
<!-- finc: recordDriver - FincMissing - result-list --> <!-- finc: recordDriver - FincMissing - result-list -->
<?php /* <?php /*
this is mostly a copy of finc: recordDriver - DefaultRecord - result-list this is mostly a copy of finc: recordDriver - DefaultRecord - result-list
it is only used for the print view of FincMissingRecords in bulk mode it is only used for the print view of FincMissingRecords in bulk mode;
Fixme: Please remove any code we don't need here! - CK
*/ */
?> ?>
<?php <?php
/* finc: compare SolrAI/result-list with this one during upgrades! - CK */
$coverDetails = $this->record($this->driver)->getCoverDetails('result-list', 'medium', $this->recordLink()->getUrl($this->driver)); $coverDetails = $this->record($this->driver)->getCoverDetails('result-list', 'medium', $this->recordLink()->getUrl($this->driver));
$cover = $coverDetails['html']; $cover = $coverDetails['html'];
$thumbnail = false; $thumbnail = false;
...@@ -21,7 +21,7 @@ if ($cover): ...@@ -21,7 +21,7 @@ if ($cover):
<?php /* Show finc style-based icons; */ ?> <?php /* Show finc style-based icons; */ ?>
<?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?> <?php elseif ($this->record($this->driver)->showStyleBasedIcons()): ?>
<?php ob_start(); ?> <?php ob_start(); ?>
<div class="media-<?=$thumbnailAlignment?> record-icon"> <div class="media-<?=$thumbnailAlignment?> record-icon missing">
<?=$this->record($this->driver)->getRecordIcon()?> <?=$this->record($this->driver)->getRecordIcon()?>
</div> </div>
<?php $thumbnail = ob_get_contents(); ?> <?php $thumbnail = ob_get_contents(); ?>
...@@ -38,84 +38,18 @@ if ($cover): ...@@ -38,84 +38,18 @@ if ($cover):
<div class="media-body"> <div class="media-body">
<div class="result-body"> <div class="result-body">
<div> <div>
<a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull" data-view="<?=$this->params->getOptions()->getListViewOption()?>"> <?php /* We don't use links for missing records as they would lead nowhere - CK */ ?>
<span href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull" data-view="<?=$this->params->getOptions()->getListViewOption()?>">
<?=$this->record($this->driver)->getTitleHtml()?> <?=$this->record($this->driver)->getTitleHtml()?>
</a> </span>
</div> </div>
<div>
<?php $summAuthors = $this->driver->getPrimaryAuthors();
if (!empty($summAuthors)): ?>
<?=$this->transEsc('by')?>
<?php $authorCount = count($summAuthors);
foreach ($summAuthors as $i => $summAuthor): ?>
<a href="<?=$this->record($this->driver)->getLink('author', $this->highlight($summAuthor, null, true, false))?>" class="author"><?=$this->highlight($summAuthor)?></a><?=$i + 1 < $authorCount ? ',' : ''?>
<?php endforeach; ?>
<?php endif; ?>
<?php
/* finc-specific from here, #8639, #7345 - CK */
/* finc-specific: nxt line #8639 - CK */ ?>
<?php $journalTitle = $this->driver->getContainerTitle();
$summDate = current($this->driver->getPublicationDates()); ?>
<?php if (!empty($journalTitle)): ?>
<?=!empty($summAuthor) ? '<br />' : ''?>
<?=$this->transEsc('Published in')?>
<?php $containerSource = $this->driver->getSourceIdentifier(); ?>
<?php $containerID = $this->driver->getContainerRecordID(); ?>
<?php /* TODO: handle highlighting more elegantly here: */ ?>
<a href="<?=($containerID ? $this->recordLink()->getUrl("$containerSource|$containerID") : $this->record($this->driver)->getLink('journaltitle', str_replace(['{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'], '', $journalTitle)))?>"><?=$this->highlight($journalTitle) ?></a>
<?php /* finc-specific: nxt line #8639 - CK */ ?>
<?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate) . ')' : ''?>
<?php elseif (!empty($summDate)): ?>
<?=!empty($summAuthor) ? '<br />' : ''?>
<?php /* finc-specific: nxt line #8639 - CK */ ?>
<?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate)?>
<?php endif; ?>
<?php $summInCollection = $this->driver->getContainingCollections();
if (!empty($summInCollection)): ?>
<?php foreach ($summInCollection as $collId => $collText): ?>
<div>
<strong><?=$this->transEsc("in_collection_label")?></strong>
<a class="collectionLinkText" href="<?=$this->url('collection', ['id' => $collId])?>?recordID=<?=urlencode($this->driver->getUniqueID())?>">
<?=$this->escapeHtml($collText)?>
</a>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
<?php $summCallNo = $this->driver->getCallNumber(); <?php /* We don't display formats nor previews nor other details for missing records - CK */ ?>
if (!empty($summCallNo)): ?>
<div class="callnumAndLocation">
<strong><?=$this->transEsc('Call Number')?>:</strong> <?=$this->escapeHtml($summCallNo)?>
</div>
<?php endif; ?>
<div class="result-formats">
<?=$this->record($this->driver)->getFormatList()?>
</div>
</div> </div>
<div class="result-links hidden-print"> <div class="result-links hidden-print">
<?php /* Display qrcode if appropriate: */ ?> <?php /* We don't display any interaction buttons for missing records - CK */ ?>
<?php if ($this->cart()->isActiveInSearch() && $this->params->getOptions()->supportsCart() && $this->cart()->isActive()): ?>
<?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]);?><br/>
<?php endif; ?>
<?php if ($this->userlist()->getMode() !== 'disabled'): ?>
<?php if ($this->permission()->allowDisplay('feature.Favorites')): ?>
<?php /* Add to favorites; finc: keep Icon inside link - CK */ ?>
<a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" title="<?=$this->transEsc('Add to favorites')?>">
<i class="fa fa-fw fa-star" aria-hidden="true"></i> <span class="hidden-xs hidden-sm"><?=$this->transEsc('Add to favorites')?></span>
</a><br/>
<?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?>
<?=$block?>
<?php endif; ?>
<?php /* Saved lists */ ?>
<p class="savedLists alert alert-info hidden">
<strong><?=$this->transEsc("Saved in")?>:</strong>
</p>
<?php endif; ?>
<?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?> <?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?>
</div> </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