Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/tamu-development-9.0.3' into tam…
Browse files Browse the repository at this point in the history
…u-vufind-9.0.3
  • Loading branch information
doug-hahn committed Aug 8, 2024
2 parents 33eebef + 06c66cf commit 0fe352c
Show file tree
Hide file tree
Showing 13 changed files with 197 additions and 26 deletions.
52 changes: 37 additions & 15 deletions module/TAMU/config/module.config.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,39 @@
<?php
namespace TAMU\Module\Config;

return [
'vufind' => [
'plugin_managers' => [
'ils_driver' => [
'factories' => [
'TAMU\\ILS\\Driver\\Folio' => 'VuFind\\ILS\\Driver\\FolioFactory',
],
'aliases' => [
'VuFind\\ILS\\Driver\\Folio' => 'TAMU\\ILS\\Driver\\Folio',
]
],
],
],
];
return array (
'vufind' =>
array (
'plugin_managers' =>
array (
'ils_driver' =>
array (
'factories' =>
array (
'TAMU\\ILS\\Driver\\Folio' => 'VuFind\\ILS\\Driver\\FolioFactory',
),
'aliases' =>
array (
'VuFind\\ILS\\Driver\\Folio' => 'TAMU\\ILS\\Driver\\Folio',
),
),
'recorddriver' =>
array (
'factories' =>
array (
'TAMU\\RecordDriver\\SolrMarc' => 'TAMU\\RecordDriver\\SolrDefaultFactory',
),
'aliases' =>
array (
'VuFind\\RecordDriver\\SolrMarc' => 'TAMU\\RecordDriver\\SolrMarc',
),
'delegators' =>
array (
'TAMU\\RecordDriver\\SolrMarc' =>
array (
0 => 'TAMU\\RecordDriver\\IlsAwareDelegatorFactory',
),
),
),
),
),
);
10 changes: 1 addition & 9 deletions module/TAMU/src/TAMU/RecordDriver/DefaultRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,5 @@
*/
class DefaultRecord extends \VuFind\RecordDriver\DefaultRecord
{
/**
* Get an array of all the language notes associated with the record.
*
* @return array
*/
public function getLanguageNote()
{
return (array)($this->fields['language-notes'] ?? []);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace TAMU\RecordDriver;

class IlsAwareDelegatorFactory extends \VuFind\RecordDriver\IlsAwareDelegatorFactory
{
}

8 changes: 8 additions & 0 deletions module/TAMU/src/TAMU/RecordDriver/SolrDefaultFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace TAMU\RecordDriver;

class SolrDefaultFactory extends \VuFind\RecordDriver\SolrDefaultFactory
{
}

24 changes: 24 additions & 0 deletions module/TAMU/src/TAMU/RecordDriver/SolrMarc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace TAMU\RecordDriver;

class SolrMarc extends \VuFind\RecordDriver\SolrMarc
{
/**
* Get the uniform title from the 130a field
*/
public function getUniformTitle()
{
return $this->fields['uniform_title_str_mv'] ?? [];
}

/**
* Get an array of all the language notes associated with the record.
*
* @return array
*/
public function getLanguageNotes()
{
return (array)($this->fields['language-notes'] ?? []);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public function getDefaultCoreSpecs()
null,
['recordLink' => 'title']
);
$spec->setLine(
'Uniform Title',
'getUniformTitle'
);
$spec->setMultiLine(
'Authors',
'getDeduplicatedAuthors',
Expand All @@ -89,7 +93,7 @@ public function getDefaultCoreSpecs()
);
$spec->setLine(
'Language Notes',
'getLanguageNote',
'getLanguageNotes',
null,
['itemPrefix' => '<span property="notesLanguage">',
'itemSuffix' => '</span>']
Expand Down
8 changes: 8 additions & 0 deletions module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,14 @@ public function getLanguages()
return (array)($this->fields['language'] ?? []);
}

/**
* Get the uniform title from the 130a field
*/
public function getUniformTitle()
{
return $this->fields['uniform_title_str_mv'] ?? [];
}

/**
* Get a raw, unnormalized LCCN. (See getLCCN for normalization).
*
Expand Down
4 changes: 4 additions & 0 deletions themes/TAMU/templates/ContentBlock/FacetList.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
<span class="main text" title="Policy Sciences and Economics" role="menuitem">
<span class="facet-value"><a href='Search/Results?type=AllFields&filter%5B%5D=collection%3A"0%2FPolicy+Sciences+%26+Economics+Library%2F"'>Policy Sciences and Economics Library</a></span></span>
</li>
<li>
<span class="main text" title="Texas A&M University Galveston" role="menuitem">
<span class="facet-value"><a href='Search/Results?type=AllFields&filter[]=collection%3A"0%2FJack+K.+Williams+Library%2F"'>Texas A&M University Galveston</a></span></span>
</li>
<li>
<span class="main text" title="Texas A&M University Qatar" role="menuitem">
<span class="facet-value"><a href='Search/Results?type=AllFields&filter%5B%5D=collection%3A"0%2FTexas+A%26M+University+Qatar+Library%2F"'>Texas A&M University Qatar</a></span></span>
Expand Down
49 changes: 49 additions & 0 deletions themes/TAMU/templates/error/index.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php
// Set page title.
$this->headTitle($this->translate('An error has occurred'));

$this->layout()->breadcrumbs = '<li class="active">Error</li>';
?>
<div class="alert alert-danger">
<p><?=$this->transEsc('An error has occurred')?></p>
<p><?=$this->transEsc($this->message)?></p>
<p>
<?=$this->transEsc('Please contact AskUs for assistance')?>
<br>
<?php $supportEmail = $this->escapeHtmlAttr($this->systemEmail()); ?>
<a href="mailto:<?=$supportEmail?>"><?=$supportEmail?></a>
</p>
</div>

<?php if ($this->showInstallLink): ?>
<h2><a href="<?=$this->url('install-home')?>"><?=$this->transEsc('auto_configure_title', [], 'Auto Configure')?></a></h2>
<?=$this->transEsc('auto_configure_description', [], 'If this is a new installation, you may be able to fix the error using VuFind\'s Auto Configure tool.')?>
<h2><a href="<?=$this->url('upgrade-home')?>"><?=$this->transEsc('Upgrade VuFind')?></a></h2>
<?=$this->transEsc('upgrade_description', [], 'If you are upgrading a previous VuFind version, you can load your old settings with this tool.')?>
<?php endif; ?>

<?php if (isset($this->display_exceptions) && $this->display_exceptions): ?>
<h2><?=$this->transEsc('Exception')?>:</h2>
<p>
<b><?=$this->transEsc('Message')?>:</b> <?=$this->escapeHtml($this->exception->getMessage())?>
</p>

<h2><?=$this->transEsc('Backtrace')?>:</h2>
<pre><?=$this->exception->getTraceAsString()?>
</pre>

<?php if ($e = $this->exception->getPrevious()): ?>
<h3>Previous exceptions:</h3>
<?php while($e): ?>
<h4><?=get_class($e)?></h4>
<p><?=$e->getMessage()?></p>
<pre><?=$e->getTraceAsString()?></pre>
<?php $e = $e->getPrevious(); ?>
<?php endwhile; ?>
<?php endif; ?>

<?php if (isset($this->request)): ?>
<h2><?=$this->transEsc('error_page_parameter_list_heading')?>:</h2>
<pre><?=$this->escapeHtml(var_export($this->request->getParams(), true))?></pre>
<?php endif; ?>
<?php endif ?>
4 changes: 4 additions & 0 deletions themes/TAMU/templates/error/loginForAccess.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php // This can be used as a permission denied behavior; see example in permissionBehavior.ini... ?>
<a class="login" href="<?=$this->url('myresearch-home')?>" rel="nofollow">
<strong><?=$this->transEsc('Login for full access')?></strong>
</a>
25 changes: 25 additions & 0 deletions themes/TAMU/templates/error/permissiondenied.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
// Set page title.
$this->headTitle($this->translate('permission_denied_title'));

// Disable top search box -- this page has a special layout.
$this->layout()->searchbox = false;

$this->layout()->breadcrumbs = '<li class="active">Error</li>';
?>
<div>
<h2><?=$this->transEsc('permission_denied_title')?></h2>
<p><?=$this->flashmessages()?></p>
<p>
<?=$this->transEsc('permission_denied')?>
<?php if (!empty($msg)): ?>
<div class="alert alert-danger"><?=$this->transEsc($msg)?></div>
<?php endif; ?>
</p>
<p>
<?=$this->transEsc('Please contact AskUs for assistance')?>
<br>
<?php $supportEmail = $this->escapeHtmlAttr($this->systemEmail()); ?>
<a href="mailto:<?=$supportEmail?>"><?=$supportEmail?></a>
</p>
</div>
22 changes: 22 additions & 0 deletions themes/TAMU/templates/error/unavailable.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
// Set page title.
$this->headTitle($this->translate('System Unavailable'));

// Disable top search box -- this page has a special layout.
$this->layout()->searchbox = false;

$this->layout()->breadcrumbs = '<li class="active">Error</li>';
?>
<div class="alert alert-warning">
<h2><?=$this->transEsc('System Unavailable')?></h2>
<p>
<?=$this->transEsc('The system is currently unavailable due to system maintenance')?>.
<?=$this->transEsc('Please check back soon')?>.
</p>
<p>
<?=$this->transEsc('Please contact AskUs for assistance')?>
<br>
<?php $supportEmail = $this->escapeHtmlAttr($this->systemEmail()); ?>
<a href="mailto:<?=$supportEmail?>"><?=$supportEmail?></a>
</p>
</div>
3 changes: 2 additions & 1 deletion themes/TAMU/theme.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
'favicon' => 'favicon.ico',
'helpers' => [
'factories' => [
'TAMU\View\Helper\Root\Record' => 'VuFind\View\Helper\Root\RecordFactory'
'TAMU\View\Helper\Root\Record' => 'VuFind\View\Helper\Root\RecordFactory',
'VuFind\View\Helper\Root\RecordDataFormatter' => 'TAMU\View\Helper\Root\RecordDataFormatterFactory',
],
'aliases' => [
'record' => 'TAMU\View\Helper\Root\Record'
Expand Down

0 comments on commit 0fe352c

Please sign in to comment.