Skip to content

Commit

Permalink
Merge branch 'dev' into dev-style-tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
demiankatz committed Dec 18, 2023
2 parents ef12d0c + a4bdcbc commit cbca02a
Show file tree
Hide file tree
Showing 17 changed files with 61 additions and 27 deletions.
4 changes: 3 additions & 1 deletion module/VuFind/src/VuFind/AjaxHandler/GetSideFacets.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ protected function formatFacets(
= $this->getCheckboxFacetCount($facet, $results);
} else {
$context['facet'] = $facet;
$context['cluster'] = $facetSet[$facet] ?? [];
$context['cluster'] = $facetSet[$facet] ?? [
'list' => [],
];
$context['collapsedFacets'] = [];
$response[$facet]['html'] = $this->renderer->render(
'Recommend/SideFacets/facet.phtml',
Expand Down
2 changes: 1 addition & 1 deletion themes/bootprint3/css/compiled.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/bootstrap3/css/compiled.css

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions themes/bootstrap3/js/combined-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ VuFind.combinedSearch = (function CombinedSearch() {
VuFind.loadHtml(container, url, '', function containerLoad(responseText) {
if (responseText.length === 0) {
container.hide();
let parent = container.parent();
while (parent.hasClass('js-hide-if-empty')) {
parent.hide();
parent = parent.parent();
}
} else {
VuFind.initResultScripts(container);
}
Expand Down
12 changes: 9 additions & 3 deletions themes/bootstrap3/less/components/advanced-search.less
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,25 @@
}

/* --- Primo --- */
.primo-adv-search .search { margin-bottom: .5rem; }
.primo-adv-search .search {
margin-bottom: .5rem;

.adv-term-type {
margin-bottom: .25rem;
}
}
.primo-adv-search .search-container { width: 100%; }
.primo-adv-label {
line-height: @input-height-base;
padding-right: 1rem;
}
@media (min-width: 768px) {
@media (min-width: 640px) {
.primo.adv-group,
.primo-adv-search .search {
display: flex;

select {
flex-shrink: 2;
flex-shrink: 1.5;
margin-right: .5rem;
}
.primo-adv-input { flex-grow: 1; }
Expand Down
7 changes: 6 additions & 1 deletion themes/bootstrap3/less/components/search.less
Original file line number Diff line number Diff line change
Expand Up @@ -430,13 +430,18 @@ body.rtl {
margin-left: 1rem;
margin-right: 1rem;

// This is overridden via JS in combined/results-list.phtml
visibility: hidden;

ul {
display: inline;
list-style: none;
padding-left: 0;

li {
display: inline;
// This is overridden via JS in combined/results-list.phtml
display: none;

white-space: nowrap;
&:not(:first-child):before {
content: '\2013'; // n-dash
Expand Down
12 changes: 9 additions & 3 deletions themes/bootstrap3/scss/components/advanced-search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,25 @@
}

/* --- Primo --- */
.primo-adv-search .search { margin-bottom: .5rem; }
.primo-adv-search .search {
margin-bottom: .5rem;

.adv-term-type {
margin-bottom: .25rem;
}
}
.primo-adv-search .search-container { width: 100%; }
.primo-adv-label {
line-height: $input-height-base;
padding-right: 1rem;
}
@media (min-width: 768px) {
@media (min-width: 640px) {
.primo.adv-group,
.primo-adv-search .search {
display: flex;

select {
flex-shrink: 2;
flex-shrink: 1.5;
margin-right: .5rem;
}
.primo-adv-input { flex-grow: 1; }
Expand Down
7 changes: 6 additions & 1 deletion themes/bootstrap3/scss/components/search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -430,13 +430,18 @@ body.rtl {
margin-left: 1rem;
margin-right: 1rem;

// This is overridden via JS in combined/results-list.phtml
visibility: hidden;

ul {
display: inline;
list-style: none;
padding-left: 0;

li {
display: inline;
// This is overridden via JS in combined/results-list.phtml
display: none;

white-space: nowrap;
&:not(:first-child):before {
content: '\2013'; // n-dash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@
<?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate[0])?>
<?php endif; ?>
<?php $summInCollection = $this->driver->getContainingCollections(); ?>
<?php if (false && !empty($summInCollection)): ?>
<?php if (!empty($summInCollection)): ?>
<?php foreach ($summInCollection as $collId => $collText): ?>
<div>
<b><?=$this->transEsc('in_collection_label')?></b>
<a class="collectionLinkText" href="<?=$this->record($this->driver)->getLink('collection', $collid)?>">
<a class="collectionLinkText" href="<?=$this->record($this->driver)->getLink('collection', $collId)?>">
<?=$this->escapeHtml($collText)?>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion themes/bootstrap3/templates/collections/bytitle.phtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php $this->layout()->breadcrumbs = '<a href="' . $this->url('collections-home') . '">' . $this->transEsc('Collections') . '</a>'; ?>
<?php $this->layout()->breadcrumbs = '<li><a href="' . $this->url('collections-home') . '">' . $this->transEsc('Collections') . '</a></li>'; ?>
<div id="bd">
<div id="yui-main" class="content">
<div class="disambiguationDiv" >
Expand Down
5 changes: 4 additions & 1 deletion themes/bootstrap3/templates/combined/results-list.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@
template.innerHTML = "<span class='record-total'>(" + count + ")</span>";
const span = template.content.children[0];
const link = document.querySelector('.combined-jump-links .$classId');
const combinedJumpLinks = document.querySelector('.combined-jump-links');
const link = combinedJumpLinks?.querySelector('.$classId');
if (link) {
link.append(span);
link.style.display = "inline";
combinedJumpLinks.style.visibility = "inherit";
}
}
Expand Down
2 changes: 1 addition & 1 deletion themes/bootstrap3/templates/combined/stack-grid.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
$columnIndex ++;
?>
<?php // This empty div prevents margin collapse, as the otherwise unneeded div.combined-column does elsewhere. ?>
<div>
<div class="js-hide-if-empty">
<div id="<?=$this->escapeHtmlAttr($colParams['domId'])?>" class="combined-list">
<?php $templateSuffix = ($colParams['ajax'] ?? false) ? 'ajax' : 'list'; ?>
<?=$this->render('combined/results-' . $templateSuffix . '.phtml', $colParams)?>
Expand Down
2 changes: 1 addition & 1 deletion themes/bootstrap3/templates/oai/home.phtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
$this->headTitle($this->translate('OAI Server'));
$this->layout()->breadcrumbs = $this->transEsc('OAI Server');
$this->layout()->breadcrumbs = '<li>' . $this->transEsc('OAI Server') . '</li>';
$baseUrl = $this->url('oai-server');
?>
<div class="<?=$this->layoutClass('mainbody')?>">
Expand Down
6 changes: 3 additions & 3 deletions themes/bootstrap3/templates/primo/advanced.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@
<?php for ($j = 0; $j < $numRows; $j++): ?>
<?php $currRow = $currentGroup[$j] ?? false; ?>
<div class="search">
<select id="search_type<?=$i?>_<?=$j?>" name="type<?=$i?>[]" class="form-control">
<select id="search_type<?=$i?>_<?=$j?>" name="type<?=$i?>[]" class="form-control adv-term-type">
<?php foreach ($this->options->getAdvancedHandlers() as $searchVal => $searchDesc): ?>
<option value="<?=$this->escapeHtmlAttr($searchVal)?>"<?=($currRow && $currRow->getHandler() == $searchVal) ? ' selected="selected"' : ''?>><?=$this->transEsc($searchDesc)?></option>
<?php endforeach; ?>
</select>
<select name="op<?=$i?>[]" id="searchForm_op<?=$i?>_<?=$j?>" class="form-control">
<select name="op<?=$i?>[]" id="searchForm_op<?=$i?>_<?=$j?>" class="form-control adv-term-type">
<?php foreach ($this->options->getAdvancedOperators() as $searchVal => $searchDesc): ?>
<option value="<?=$this->escapeHtmlAttr($searchVal)?>"<?=($currRow && $currRow->getOperator() == $searchVal) ? ' selected="selected"' : ''?>><?=$this->transEsc($searchDesc)?></option>
<?php endforeach; ?>
</select>
<input id="search_lookfor<?=$i?>_<?=$j?>" type="text" value="<?=$currRow ? $this->escapeHtmlAttr($currRow->getString()) : ''?>" size="30" name="lookfor<?=$i?>[]" class="form-control primo-adv-input" aria-label="<?=$this->transEscAttr('search_terms')?>">
<input id="search_lookfor<?=$i?>_<?=$j?>" type="text" value="<?=$currRow ? $this->escapeHtmlAttr($currRow->getString()) : ''?>" size="30" name="lookfor<?=$i?>[]" class="form-control primo-adv-input" aria-label="<?=$this->transEscAttr('search_terms')?>">
</div>
<?php endfor; ?>
</div>
Expand Down
12 changes: 7 additions & 5 deletions themes/bootstrap3/templates/search/history-table.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
<tr class="<?=$iteration % 2 == 1 ? 'even' : 'odd'?>row">
<td class="history_time" data-label="<?=$this->transEscAttr('history_time')?>"><?=$this->escapeHtml($this->dateTime()->convertToDisplayDateAndTime('U', $info->getStartTime()))?></td>
<td class="history_search" data-label="<?=$this->transEscAttr('history_search')?>">
<?=$this->historylabel($info->getParams()->getSearchClassId())?>
<a href="<?=$this->url($info->getOptions()->getSearchAction()) . $info->getUrlQuery()->getParams()?>"><?php
$desc = $info->getParams()->getDisplayQuery();
echo empty($desc) ? $this->transEsc('history_empty_search') : $this->escapeHtml($desc);
?></a>
<span>
<?=$this->historylabel($info->getParams()->getSearchClassId())?>
<a href="<?=$this->url($info->getOptions()->getSearchAction()) . $info->getUrlQuery()->getParams()?>"><?php
$desc = $info->getParams()->getDisplayQuery();
echo empty($desc) ? $this->transEsc('history_empty_search') : $this->escapeHtml($desc);
?></a>
</span>
</td>
<td class="history_limits" data-label="<?=$this->transEscAttr('history_limits')?>">
<span class="history_limits_field">
Expand Down
2 changes: 1 addition & 1 deletion themes/local_theme_example/css/compiled.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/sandal/css/compiled.css

Large diffs are not rendered by default.

0 comments on commit cbca02a

Please sign in to comment.