diff --git a/themes/finc/css/print.css b/themes/finc/css/print.css deleted file mode 100644 index 44619cbd04d07d6ceedf181902d6e37f4af1b998..0000000000000000000000000000000000000000 --- a/themes/finc/css/print.css +++ /dev/null @@ -1 +0,0 @@ -*{background-color:#FFF;color:#000}a[href]:after{content:''}.container{margin:0}.hidden-print,.hidden-print *{display:none !important}@media print{body{padding:0}.main .container,.main .container-fluid,footer .container{border:0}.search-results-col{width:100%}.media-body .middle{width:88%}.print-full-width{width:85%}.info-col table{border:0}.record[class^='source']{border:0}.record-tabs li:not(.active){display:none}.record-tabs .table{border:0}.tab-content>.active{display:inline}.result:nth-of-type(2n){background-color:#fff}} diff --git a/themes/finc/scss/compiled.scss b/themes/finc/scss/compiled.scss index 87454c4e71d4defd49c79f74e11be084f9553b2c..1714fe728be812bab764d8c02c979079324d5ea6 100644 --- a/themes/finc/scss/compiled.scss +++ b/themes/finc/scss/compiled.scss @@ -83,6 +83,11 @@ body { @media (min-width: $screen-md-min) { padding-top: $navbar-height; } + + //// for print + @media print { + padding-top: 0; + } } // Collapse/Hide empty containers -- DO NOT INCLUDE span (dropdown carets are empty spans) NOR DIV (slider track handles) @@ -1414,6 +1419,12 @@ footer { .media-left { min-width: 16%; text-align: center; + + //// remove left padding for print + @media print { + padding-left: 0; + } + } } @@ -1458,7 +1469,7 @@ footer { // hide last and first page buttons &.first, &.last, - // select 7th to 11th child + // select 7th to 11th child &:nth-child(n+10):nth-child(-n+13) { display: none; } diff --git a/themes/finc/scss/print.scss b/themes/finc/scss/print.scss new file mode 100644 index 0000000000000000000000000000000000000000..8206a48e875e07297fe82f2a324955db8a3ee5fd --- /dev/null +++ b/themes/finc/scss/print.scss @@ -0,0 +1,100 @@ +@import 'customVariables'; +@import 'customMixins'; + +* { + background-color: #FFF; + color: #000; +} + +// hide following urls +a[href]:after { + content: ''; +} + +// print margins +.container { + margin: 0; +} + +// print utilities +.hidden-print, +.hidden-print * { + display: none !important; +} + +//// Make full width for printing +@media print { + body { + padding: 0; + } + + .main .container, + .main .container-fluid, + footer .container { + border: 0; + } + + .search-results-col { + width: 100%; + + .record-icon { + display: none; + } + } + + .result-body { + width: 90%; + } + + .media-body { + line-height: 1.75; + + .middle { + width: 88%; + } + } + + .print-full-width { + width: 100%; + + .nav-tabs > li.active > a, + .tab-content, + .table { + border: 0; + } + + .holdings, + .description, + .details { + font-size: 120%; + font-weight: bold; + } + } + + .info-col table { + border: 0; + } + + .record[class^='source'] { + border: 0; + } + + .record-tabs li:not(.active) { + display: none; + } + + .record-tabs .table { + border: 0; + } + + .tab-content > .active { + display: inline; + } + + .result:nth-of-type(2n) { + background-color: $snow; + } + + .print-full-width {} + +} diff --git a/themes/finc/templates/RecordDriver/SolrAI/core.phtml b/themes/finc/templates/RecordDriver/SolrAI/core.phtml index 2828594c460282cc9771ead438aff4f2c1e0fa40..46a41ae1385f9f4c9f8c03a02d7c458896a5b84a 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/core.phtml @@ -50,7 +50,7 @@ <p><?=$this->truncate($summary, 300)?></p> <? if(strlen($summary) > 300): ?> - <p><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> + <p class="hidden-print"><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> <? endif; ?> <? endif; ?> @@ -58,7 +58,7 @@ <? /* Display the lists that this record is saved to */ ?> <div class="savedLists hidden alert alert-info"> <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> + </div> <? endif; ?> <?/* Display Main Details */?> diff --git a/themes/finc/templates/RecordDriver/SolrDefault/core.phtml b/themes/finc/templates/RecordDriver/SolrDefault/core.phtml index 48462c26c31e8798eb152a81a40f36227533cac8..94e2bdf42cd98f1d24cec1cba8278d3160ffd428 100644 --- a/themes/finc/templates/RecordDriver/SolrDefault/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrDefault/core.phtml @@ -49,7 +49,7 @@ <p><?=$this->truncate($summary, 300)?></p> <? if(strlen($summary) > 300): ?> - <p><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> + <p class="hidden-print"><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> <? endif; ?> <? endif; ?> diff --git a/themes/finc/templates/RecordDriver/SolrLido/core.phtml b/themes/finc/templates/RecordDriver/SolrLido/core.phtml index 269dddf05df0e95a397177630f59a376ac082b19..90bc7cc8fc8f0a23de9a6e9020a67216c281ca77 100644 --- a/themes/finc/templates/RecordDriver/SolrLido/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrLido/core.phtml @@ -67,7 +67,7 @@ <p><?=$this->truncate($summary, 300)?></p> <? if(strlen($summary) > 300): ?> - <p><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> + <p class="hidden-print"><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> <? endif; ?> <? endif; ?> diff --git a/themes/finc/templates/RecordDriver/SolrMarc/core.phtml b/themes/finc/templates/RecordDriver/SolrMarc/core.phtml index bbb181fc9bb795c37b2525caf062436059d6d643..f1e9c6cd6d757ad79598748c94570fd81ed1fb10 100644 --- a/themes/finc/templates/RecordDriver/SolrMarc/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrMarc/core.phtml @@ -49,7 +49,7 @@ <p><?=$this->truncate($summary, 300)?></p> <? if(strlen($summary) > 300): ?> - <p><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> + <p class="hidden-print"><a href='<?=$this->recordLink()->getTabUrl($this->driver, 'Description')?>#tabnav'><?=$this->transEsc('Full description')?></a></p> <? endif; ?> <? endif; ?> diff --git a/themes/finc/templates/record/view.phtml b/themes/finc/templates/record/view.phtml index 1e24eb623bdd4ed31274c8153156591ebe948b42..2117940030a02d2b6dbc4f17d42f1fef38c78e18 100644 --- a/themes/finc/templates/record/view.phtml +++ b/themes/finc/templates/record/view.phtml @@ -64,8 +64,9 @@ $this->layout()->title = $this->driver->getShortTitle(); <? /* finc-specific: Remove getToolbar from here and add it to sidebar below - CK */ ?> - <div class="record source<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>"> - <div class="<?=$this->layoutClass('mainbody')?>"> + <div class="record source<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?> row"> + <? /* finc-specific print... class - CK */ ?> + <div class="<?=$this->layoutClass('mainbody')?> print-full-width"> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" class="hiddenId"/> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource"/> <?=$this->flashmessages()?> diff --git a/themes/finc/templates/search/advanced/layout.phtml b/themes/finc/templates/search/advanced/layout.phtml index 1bf1f46e7eee11004402fc3fe7feb41aa04e3074..ebcf5d381ece8330fea4836b4fdcf717fa92bab2 100644 --- a/themes/finc/templates/search/advanced/layout.phtml +++ b/themes/finc/templates/search/advanced/layout.phtml @@ -116,9 +116,7 @@ if (isset($searchDetails) && is_object($searchDetails)) { </div> <? if($group == 0 && $search == 0): ?> </div> - <? /* finc: moving entire original icon tag inside link WILL BUST removal-button functionality! - (As this will also 'shift search_place_holder') Therefore Keep 'search_place_holder' separate and move icon only ! - */ ?> + <? /* finc: use xs-cols to improve mobile view, .middle used in print styles, CK */ ?> <span class="float-left"> <span class="search_place_holder hidden" aria-hidden="true"></span> <a href="javascript:void(0);" class="add_search_link hidden"> diff --git a/themes/finc/templates/search/results.phtml b/themes/finc/templates/search/results.phtml index 4ec2aee5626492de661a4756177925bebc6f631e..61584de96cd83af71730636c63dec9da5e205546 100644 --- a/themes/finc/templates/search/results.phtml +++ b/themes/finc/templates/search/results.phtml @@ -1,59 +1,60 @@ <!-- finc: search - results --> <? - // Set up page title: - $lookfor = $this->results->getUrlQuery()->isQuerySuppressed() ? '' : $this->params->getDisplayQuery(); - if (isset($this->overrideTitle)) { - $this->headTitle($this->overrideTitle); - } else { - $this->headTitle($this->translate('Search Results') . (empty($lookfor) ? '' : " - {$lookfor}")); - } +// Set up page title: +$lookfor = $this->results->getUrlQuery()->isQuerySuppressed() ? '' : $this->params->getDisplayQuery(); +if (isset($this->overrideTitle)) { + $this->headTitle($this->overrideTitle); +} else { + $this->headTitle($this->translate('Search Results') . (empty($lookfor) ? '' : " - {$lookfor}")); +} - // Set up search box: - $this->layout()->searchbox = $this->context($this)->renderInContext( - 'search/searchbox.phtml', - [ - 'lookfor' => $lookfor, - 'searchIndex' => $this->params->getSearchHandler(), - 'searchType' => $this->params->getSearchType(), - 'searchId' => $this->results->getSearchId(), - 'searchClassId' => $this->params->getSearchClassId(), - 'checkboxFilters' => $this->params->getCheckboxFacets(), - 'filterList' => $this->params->getFilters(), - 'hasDefaultsApplied' => $this->params->hasDefaultsApplied(), - 'selectedShards' => $this->params->getSelectedShards(), - 'ignoreHiddenFiltersInRequest' => isset($this->ignoreHiddenFiltersInRequest) ? $this->ignoreHiddenFiltersInRequest : false, - 'ignoreHiddenFilterMemory' => isset($this->ignoreHiddenFilterMemory) ? $this->ignoreHiddenFilterMemory : false, - ] - ); +// Set up search box: +$this->layout()->searchbox = $this->context($this)->renderInContext( + 'search/searchbox.phtml', + [ + 'lookfor' => $lookfor, + 'searchIndex' => $this->params->getSearchHandler(), + 'searchType' => $this->params->getSearchType(), + 'searchId' => $this->results->getSearchId(), + 'searchClassId' => $this->params->getSearchClassId(), + 'checkboxFilters' => $this->params->getCheckboxFacets(), + 'filterList' => $this->params->getFilters(), + 'hasDefaultsApplied' => $this->params->hasDefaultsApplied(), + 'selectedShards' => $this->params->getSelectedShards(), + 'ignoreHiddenFiltersInRequest' => isset($this->ignoreHiddenFiltersInRequest) ? $this->ignoreHiddenFiltersInRequest : false, + 'ignoreHiddenFilterMemory' => isset($this->ignoreHiddenFilterMemory) ? $this->ignoreHiddenFilterMemory : false, + ] +); - // Set up breadcrumbs: - if (isset($this->overrideTitle)) { - $this->layout()->breadcrumbs .= '<li class="active">' . $this->escapeHtml($this->overrideTitle) . '</li>'; - } else { - $this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc('Search') . ': ' . $this->escapeHtml($lookfor) . '</li>'; - } +// Set up breadcrumbs: +if (isset($this->overrideTitle)) { + $this->layout()->breadcrumbs .= '<li class="active">' . $this->escapeHtml($this->overrideTitle) . '</li>'; +} else { + $this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc('Search') . ': ' . $this->escapeHtml($lookfor) . '</li>'; +} - // Enable cart if appropriate: - $this->showBulkOptions = $this->params->getOptions()->supportsCart() && $this->showBulkOptions; - // Checkboxes if appropriate: - $this->showCartControls = $this->params->getOptions()->supportsCart() && $this->cart()->isActive() - && ($this->showBulkOptions || !$this->cart()->isActiveInSearch()); - // Enable bulk options if appropriate: - $this->showCheckboxes = $this->showCartControls || $this->showBulkOptions; +// Enable cart if appropriate: +$this->showBulkOptions = $this->params->getOptions()->supportsCart() && $this->showBulkOptions; +// Checkboxes if appropriate: +$this->showCartControls = $this->params->getOptions()->supportsCart() && $this->cart()->isActive() + && ($this->showBulkOptions || !$this->cart()->isActiveInSearch()); +// Enable bulk options if appropriate: +$this->showCheckboxes = $this->showCartControls || $this->showBulkOptions; - // Load Javascript only if list view parameter is NOT full: - if ($this->params->getOptions()->getListViewOption() != "full") { - $this->headScript()->appendFile("record.js"); - $this->headScript()->appendFile("embedded_record.js"); - } +// Load Javascript only if list view parameter is NOT full: +if ($this->params->getOptions()->getListViewOption() != "full") { + $this->headScript()->appendFile("record.js"); + $this->headScript()->appendFile("embedded_record.js"); +} - // Load Javascript dependencies into header: - $this->headScript()->appendFile("vendor/hunt.min.js"); - $this->headScript()->appendFile("check_item_statuses.js"); - $this->headScript()->appendFile("check_save_statuses.js"); +// Load Javascript dependencies into header: +$this->headScript()->appendFile("vendor/hunt.min.js"); +$this->headScript()->appendFile("check_item_statuses.js"); +$this->headScript()->appendFile("check_save_statuses.js"); ?> -<div class="<?=$this->layoutClass('mainbody')?>"> +<? /* finc: we need search-results-col to pull content to full width, also used in print styles! - CK */?> +<div class="<?=$this->layoutClass('mainbody')?> search-results-col"> <? if (($recordTotal = $this->results->getResultTotal()) > 0): // only display these at very top if we have results ?> <? foreach ($this->results->getRecommendations('top') as $current): ?> <?=$this->recommend($current)?> @@ -70,37 +71,37 @@ <? endif; ?> </div> - <? if ($recordTotal > 0): ?> - <div class="search-controls"> - <?=$this->render('search/controls/limit.phtml')?> - <?=$this->render('search/controls/sort.phtml')?> - <?=$this->render('search/controls/view.phtml')?> - </div> - <? endif; ?> - </nav> - <? /* End Listing Options */ ?> + <? if ($recordTotal > 0): ?> + <div class="search-controls"> + <?=$this->render('search/controls/limit.phtml')?> + <?=$this->render('search/controls/sort.phtml')?> + <?=$this->render('search/controls/view.phtml')?> + </div> + <? endif; ?> + </nav> + <? /* End Listing Options */ ?> - <? if ($recordTotal < 1): ?> - <p> - <? if (isset($this->overrideEmptyMessage)): ?> - <?=$this->overrideEmptyMessage?> - <? else: ?> + <? if ($recordTotal < 1): ?> + <p> + <? if (isset($this->overrideEmptyMessage)): ?> + <?=$this->overrideEmptyMessage?> + <? else: ?> <? $this->layout()->srmessage = $this->translate('nohit_lookfor_html', ['%%lookfor%%' => $this->escapeHtml($lookfor)]); ?> - <?=$this->layout()->srmessage ?> - <? endif; ?> - </p> - <? if (isset($this->parseError)): ?> - <p class="alert alert-danger"><?=$this->transEsc('nohit_parse_error')?></p> + <?=$this->layout()->srmessage?> <? endif; ?> - <? foreach (($top = $this->results->getRecommendations('top')) as $current): ?> + </p> + <? if (isset($this->parseError)): ?> + <p class="alert alert-danger"><?=$this->transEsc('nohit_parse_error')?></p> + <? endif; ?> + <? foreach (($top = $this->results->getRecommendations('top')) as $current): ?> + <?=$this->recommend($current)?> + <? endforeach; ?> + <? foreach ($this->results->getRecommendations('noresults') as $current): ?> + <? if (!in_array($current, $top)): ?> <?=$this->recommend($current)?> - <? endforeach; ?> - <? foreach ($this->results->getRecommendations('noresults') as $current): ?> - <? if (!in_array($current, $top)): ?> - <?=$this->recommend($current)?> - <? endif; ?> - <? endforeach; ?> - <? else: ?> + <? endif; ?> + <? endforeach; ?> + <? else: ?> <form id="search-cart-form" method="post" name="bulkActionForm" action="<?=$this->url('cart-searchresultsbulk')?>" data-lightbox data-lightbox-onsubmit="bulkFormHandler"> <?=$this->context($this)->renderInContext('search/bulk-action-buttons.phtml', ['idPrefix' => ''])?> </form> @@ -108,33 +109,34 @@ <?=$this->context($this)->renderInContext('search/bulk-action-buttons.phtml', ['idPrefix' => 'bottom_', 'formAttr' => 'search-cart-form'])?> <?=$this->paginationControl($this->results->getPaginator(), 'Sliding', 'search/pagination.phtml', ['results' => $this->results, 'options' => isset($this->paginationOptions) ? $this->paginationOptions : []])?> - <div class="searchtools hidden-print"> - <strong><?=$this->transEsc('Search Tools')?>:</strong> - <a href="<?=$this->results->getUrlQuery()->setViewParam('rss')?>"><i class="fa fa-bell" aria-hidden="true"></i> <?=$this->transEsc('Get RSS Feed')?></a> + <div class="searchtools hidden-print"> + <strong><?=$this->transEsc('Search Tools')?>:</strong> + <a href="<?=$this->results->getUrlQuery()->setViewParam('rss')?>"><i class="fa fa-bell" aria-hidden="true"></i> <?=$this->transEsc('Get RSS Feed')?></a> + — + <a href="<?=$this->url('search-email')?>" class="mailSearch" data-lightbox id="mailSearch<?=$this->escapeHtmlAttr($this->results->getSearchId())?>"> + <i class="fa fa-envelope" aria-hidden="true"></i> <?=$this->transEsc('Email this Search')?> + </a> + <? if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?> — - <a href="<?=$this->url('search-email')?>" class="mailSearch" data-lightbox id="mailSearch<?=$this->escapeHtmlAttr($this->results->getSearchId())?>"> - <i class="fa fa-envelope" aria-hidden="true"></i> <?=$this->transEsc('Email this Search')?> - </a> - <? if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?> - — - <? if (is_numeric($this->results->getSearchId())): ?> - <? if ($this->results->isSavedSearch()): ?> - <a href="<?=$this->url('myresearch-savesearch')?>?delete=<?=urlencode($this->results->getSearchId())?>"><i class="fa fa-remove" aria-hidden="true"></i> <?=$this->transEsc('save_search_remove')?></a> - <? else: ?> - <a href="<?=$this->url('myresearch-savesearch')?>?save=<?=urlencode($this->results->getSearchId())?>"><i class="fa fa-save" aria-hidden="true"></i> <?=$this->transEsc('save_search')?></a> - <? endif; ?> + <? if (is_numeric($this->results->getSearchId())): ?> + <? if ($this->results->isSavedSearch()): ?> + <a href="<?=$this->url('myresearch-savesearch')?>?delete=<?=urlencode($this->results->getSearchId())?>"><i class="fa fa-remove" + aria-hidden="true"></i> <?=$this->transEsc('save_search_remove')?></a> + <? else: ?> + <a href="<?=$this->url('myresearch-savesearch')?>?save=<?=urlencode($this->results->getSearchId())?>"><i class="fa fa-save" aria-hidden="true"></i> <?=$this->transEsc('save_search')?></a> <? endif; ?> <? endif; ?> - </div> - <? endif; ?> - </div> - <? /* End Main Listing */ ?> + <? endif; ?> + </div> + <? endif; ?> +</div> +<? /* End Main Listing */ ?> - <? /* Narrow Search Options */ ?> - <div class="<?=$this->layoutClass('sidebar')?>"> - <? foreach ($this->results->getRecommendations('side') as $current): ?> - <?=$this->recommend($current)?> - <? endforeach; ?> - </div> - <? /* End Narrow Search Options */ ?> +<? /* Narrow Search Options */ ?> +<div class="<?=$this->layoutClass('sidebar')?>"> + <? foreach ($this->results->getRecommendations('side') as $current): ?> + <?=$this->recommend($current)?> + <? endforeach; ?> +</div> +<? /* End Narrow Search Options */ ?> <!-- finc: search - results - END -->