Skip to content
Snippets Groups Projects
Commit c71b161f authored by ha848myco's avatar ha848myco Committed by Dorian Merz
Browse files

refs #17863 [master] Removed files which should not be changed for <h4>

* Recommend/CatalogResults.phtml
* Recommend/OpenLibrarySubjects.phtml
* Recommend/WebResults.phtml
parent 2e57fd23
Branches
Tags instance/local/staging/20211104_113228
No related merge requests found
<!-- finc - templates - Recommend - CatalogResults -->
<?php /* copied from bootstrap3 - h4 becomes h2 - #17607 - HR */ ?>
<?php $searchObject = $this->recommend->getResults();
$results = $searchObject->getResults();
if (!empty($results)): ?>
<h2><?= $this->transEsc('Catalog Results') ?></h2>
<ul class="list-group">
<?php foreach ($results as $driver): ?>
<li class="list-group-item catalog-result">
<?php $formats = $driver->getFormats();
$format = $formats[0] ?? ''; ?>
<a href="<?= $this->recordLink()->getUrl($driver) ?>" class="title <?= $this->record($driver)->getFormatClass($format) ?>">
<?= $this->record($driver)->getTitleHtml() ?>
</a>
<?php $summDate = $driver->getPublicationDates(); ?>
<?php $summAuthors = $driver->getPrimaryAuthorsWithHighlighting(); ?>
<?php if (!empty($summDate) || !empty($summAuthors)): ?>
<?php if (!empty($summDate)): ?>
<br/>
<span class="small author">
<?= $this->transEsc('Published') ?>: (<?= $this->escapeHtml($summDate[0]) ?>)
</span>
<?php endif; ?>
<?php if (!empty($summAuthors)): ?>
<br/>
<span class="small"><?= $this->transEsc('By') ?></span>
<a class="small date"
href="<?= $this->record($driver)->getLink('author', $this->highlight($summAuthors[0], null, true, false)) ?>"><?= $this->highlight($summAuthors[0]) ?></a><?php if (count($summAuthors) > 1): ?>
<span class="small">, <?= $this->transEsc('more_authors_abbrev') ?></span><?php endif; ?>
<?php endif; ?>
<?php endif; ?>
</li>
<?php endforeach; ?>
<a class="list-group-item"
href="<?= $this->url($searchObject->getOptions()->getSearchAction()) . $searchObject->getUrlQuery()->setLimit($searchObject->getOptions()->getDefaultLimit()) ?>"><?= $this->transEsc('More catalog results') ?>
...</a>
</ul>
<?php endif ?>
<!-- finc - templates - Recommend - CatalogResults - END -->
<!-- finc - templates - Recommend - OpenLibrarySubjects -->
<?php /* copied from bootstrap3 - h4 becomes h2 - #17607 - HR */ ?>
<?php $data = $this->recommend->getResult();
if (is_array($data)): ?>
<div class="sidegroup">
<h2>Open Library <?php /* Intentionally not translated -- this is a site name, not a phrase */ ?></h2>
<div><?= $this->transEsc('Results for') ?> <?= $this->escapeHtmlAttr($data['subject']) ?> ...</div>
<ul class="similar">
<?php foreach ($data['worksArray'] as $work): ?>
<li>
<a href="http://openlibrary.org<?= $work['key'] ?>" title="<?= $this->transEsc('Get full text') ?>" target="_blank">
<span class="olSubjectCover">
<?php if (isset($work['cover_id']) && !empty($work['cover_id'])): ?>
<img src="http://covers.openlibrary.org/b/<?= $this->escapeHtmlAttr($work['cover_id_type']) ?>/<?= $this->escapeHtmlAttr($work['cover_id']) ?>-S.jpg" class="olSubjectImage"
alt="<?= $this->escapeHtmlAttr($work['title']) ?>"/>
<?php else: ?>
<img src="<?= $this->imageLink('noCover2.gif') ?>" class="olSubjectImage" alt="<?= $this->escapeHtmlAttr($work['title']) ?>"/>
<?php endif; ?>
</span>
<span><?= $this->escapeHtmlAttr($this->truncate($work['title'], 50)) ?></span>
<?php if (isset($work['mainAuthor'])): ?>
<span class="olSubjectAuthor"><?= $this->transEsc('by') ?> <?= $this->escapeHtmlAttr($this->truncate($work['mainAuthor'], 40)) ?></span>
<?php endif; ?>
</a>
<div class="clearfix"></div>
</li>
<?php endforeach; ?>
</ul>
<p class="olSubjectMore">
<a href="http://openlibrary.org/subjects" title="Open Library" target="_blank">
<?= $this->transEsc('more') ?>...
</a>
</p>
</div>
<?php endif; ?>
<!-- finc - templates - Recommend - OpenLibrarySubjects - END -->
\ No newline at end of file
<!-- finc - templates - Recommend - WebResults -->
<?php /* copied from bootstrap3 - h4 becomes h2 - #17607 - HR */ ?>
<?php $searchObject = $this->recommend->getResults();
$results = $searchObject->getResults();
if (!empty($results)): ?>
<div class="sidegroup">
<h4><?= $this->transEsc('Library Web Search') ?></h4>
<ul class="similar">
<?php foreach ($results as $driver): ?>
<li>
<a href="<?= $this->escapeHtmlAttr($driver->getUrl()) ?>" class="title">
<?= $this->record($driver)->getTitleHtml() ?>
</a>
<?php $snippet = $driver->getHighlightedSnippet(); ?>
<?php $summary = $driver->getSummary(); ?>
<?php if (!empty($snippet)): ?>
<br/><?= $this->highlight($snippet['snippet']) ?>
<?php elseif (!empty($summary)): ?>
<br/><?= $this->escapeHtml($summary[0]) ?>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<p><a
href="<?= $this->url($searchObject->getOptions()->getSearchAction()) . $searchObject->getUrlQuery()->setLimit($searchObject->getOptions()->getDefaultLimit()) ?>"><?= $this->transEsc('Find More') ?>
...</a></p>
</div>
<?php endif ?>
<!-- finc - templates - Recommend - WebResults - END -->
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