Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "hathitrust/catalog",
"description": "HathiTrust Catalog application",
"require": {
"geoip2/geoip2": "2.13.*",
"pear/pear-core-minimal": "1.10.*",
"pear/file_marc": "1.4.*",
"pear/http_request2": "2.7.*",
"pear/pager": "2.5.*",
"phpunit/phpunit": "9.6.*",
"smarty/smarty": "4.5.5"
"smarty/smarty": "^5.0"
}
}
121 changes: 108 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docker/nginx-default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ server {
server_name _;
root /app;

rewrite_log on;
rewrite_log off;
index index.php;
error_log /dev/stdout debug;
error_log /dev/stdout notice;

# Translated from .htaccess
location @rewrite {
Expand Down
6 changes: 3 additions & 3 deletions interface/plugins/function.css_link.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ function smarty_function_css_link($params, $template)
$root = dirname($_SERVER['DOCUMENT_ROOT']);
$filename = FALSE;
if ( is_dir("$root/common") ) {
$filename = "$root/${base_filename}";
$filename = "$root/{$base_filename}";
} elseif ( is_dir("$root/../babel/common") ) {
$filename = "$root/../babel/${base_filename}";
$filename = "$root/../babel/{$base_filename}";
}
$modtime = ( $filename === FALSE ) ? time() : filemtime($filename);
return "<link rel=\"stylesheet\" type=\"text/css\" href=\"${params['href']}?_=${modtime}\" />";
return "<link rel=\"stylesheet\" type=\"text/css\" href=\"{$params['href']}?_={$modtime}\" />";
}
?>
6 changes: 3 additions & 3 deletions interface/plugins/function.js_link.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ function smarty_function_js_link($params, $template)
$root = dirname($_SERVER['DOCUMENT_ROOT']);
$filename = FALSE;
if ( is_dir("$root/common") ) {
$filename = "$root/${base_filename}";
$filename = "$root/{$base_filename}";
} elseif ( is_dir("$root/../babel/common") ) {
$filename = "$root/../babel/${base_filename}";
$filename = "$root/../babel/{$base_filename}";
}
$modtime = ( $filename === FALSE ) ? time() : filemtime($filename);
return "<script type=\"text/javascript\" src=\"${params['href']}?_=${modtime}\"></script>";
return "<script type=\"text/javascript\" src=\"{$params['href']}?_={$modtime}\"></script>";

}
?>
6 changes: 3 additions & 3 deletions interface/themes/firebird/Search/advanced.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<hathi-alert-banner></hathi-alert-banner>
<main class="main-container" id="main">
<hathi-advanced-search-form
data-prop-language-data="{$languageList|@json_encode|escape}"
data-prop-format-data='{$formatList|@json_encode|escape}'
data-prop-location-data='{$locationsList|@json_encode|escape}'
data-prop-language-data="{$languageList|json_encode|escape}"
data-prop-format-data='{$formatList|json_encode|escape}'
data-prop-location-data='{$locationsList|json_encode|escape}'
></hathi-advanced-search-form>
</main>

Expand Down
9 changes: 3 additions & 6 deletions interface/themes/firebird/Search/list-list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
{/if}

<article class="record d-flex gap-3 p-3 mb-3 mt-3 shadow-sm">
{* {$ld.handle|@var_dump}
{$record.title|@var_dump} *}
<div class="cover d-none d-md-block" data-hdl="{$ld.handle}">
{if $ld.handle}
<img loading="lazy" class="bookCover border p-1 flex-grow-0 flex-shrink-0" aria-hidden="true" alt="" src="{$unicorn_root}/cgi/imgsrv/cover?id={$ld.handle};width=250" />
Expand Down Expand Up @@ -68,8 +66,7 @@
</dl>
</div>
{assign var="dfields" value=$ru->displayable_ht_fields($record.marc)}
{* {$dfields|@var_dump} *}
{if false && $dfields|@count gt 1}
{if false && $dfields|count gt 1}
<p class="fs-7 text-secondary mb-1">
Use the Catalog Record to view multiple volumes
</p>
Expand All @@ -78,7 +75,7 @@
<div class="resource-access-container">
<div class="list-group list-group-horizontal-sm align-items-center">
<a href="{$ss->asRecordURL($record.id)}" class="list-group-item list-group-item-action w-sm-50" aria-describedby="maintitle-{$i}"><i class="fa-solid fa-circle-info" aria-hidden="true"></i></i>Catalog Record<i aria-hidden="true" class="visited-link fa-solid fa-check-double"></i></a>
{if $dfields|@count eq 1 && isset($ld) && is_array($ld)}
{if $dfields|count eq 1 && isset($ld) && is_array($ld)}
{if ( $ld.is_resource_sharing ) }
<a data-activated-role="true" href="{$handle_prefix}{$ld.handle}" referrerpolicy="unsafe-url" class="list-group-item list-group-item-action list-group-item w-sm-50" aria-describedby="maintitle-{$i}"><i aria-hidden="true" class="fa-solid fa-lock-open"></i>Registered Access<i aria-hidden="true" class="visited-link fa-solid fa-check-double"></i></a>
{elseif ( $ld.role_name !== 'resourceSharing' && ! $ld.is_fullview && ( $ld.has_activated_role ) ) }
Expand All @@ -90,7 +87,7 @@
{else}
<a href="{$handle_prefix}{$ld.handle}" referrerpolicy="unsafe-url" class="list-group-item list-group-item-action list-group-item w-sm-50" aria-describedby="maintitle-{$i}"><i aria-hidden="true" class="fa-solid fa-lock"></i>Limited (search only)<i aria-hidden="true" class="visited-link fa-solid fa-check-double"></i></a>
{/if}
{elseif $dfields|@count gt 1}
{elseif $dfields|count gt 1}
<a href="{$ss->asRecordURL($record.id)}#viewability" class="list-group-item list-group-item-action w-sm-50" aria-describedby="maintitle-{$i}"><i class="fa-solid fa-layer-group" aria-hidden="true"></i></i>Multiple Items<i aria-hidden="true" class="visited-link fa-solid fa-check-double"></i></a>
{/if}
</div>
Expand Down
4 changes: 2 additions & 2 deletions interface/themes/firebird/Search/list.sidebar.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@
{/foreach}
</div>
<div class="mt-3">
{if $counts.$cluster|@count gt 6}
{if $counts.$cluster|count gt 6}
<button type="button" class="btn btn-sm btn-outline-dark" data-action="expand-filter" aria-expanded="false">
Show
<span class="not-expanded">all {$counts.$cluster|@count} </span>
<span class="not-expanded">all {$counts.$cluster|count} </span>
<span class="is-expanded">fewer </span>
{$facetConfig.$cluster} Filters
</button>
Expand Down
5 changes: 4 additions & 1 deletion static/api/templates/volumes/oclchtml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<title>{$doc.titles[0]} (OCLC {', '|implode:$doc.oclcs })</title>
<title>
{$doc.titles[0]|default:''} {if !empty($doc.oclcs|default:[])} (OCLC {$doc.oclcs|join:', '}){/if}
</title>

</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion static/api/volumes.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

# require_once 'Apache/Solr/Service.php';
require_once 'vendor/autoload.php';
use Smarty\Smarty;
require_once 'sys/SolrConnection.php';
require_once 'services/Record/RecordUtils.php';
require_once 'sys/Normalize.php';
Expand Down Expand Up @@ -629,4 +630,3 @@ function lccnnormalize($val) {




Loading
Loading