Skip to content
Snippets Groups Projects
Commit 15b6c62a authored by Demian Katz's avatar Demian Katz
Browse files

Smarter offline behavior for new items.

parent a4879c86
No related merge requests found
...@@ -380,6 +380,20 @@ class NoILS extends AbstractBase implements TranslatorAwareInterface ...@@ -380,6 +380,20 @@ class NoILS extends AbstractBase implements TranslatorAwareInterface
return null; return null;
} }
/**
* Get Funds
*
* Return a list of funds which may be used to limit the getNewItems list.
*
* @throws ILSException
* @return array An associative array with key = fund ID, value = fund name.
*/
public function getFunds()
{
// Does not work while ILS offline:
return [];
}
/** /**
* Get Departments * Get Departments
* *
...@@ -437,6 +451,8 @@ class NoILS extends AbstractBase implements TranslatorAwareInterface ...@@ -437,6 +451,8 @@ class NoILS extends AbstractBase implements TranslatorAwareInterface
* *
* @throws ILSException * @throws ILSException
* @return array An array of associative arrays representing reserve items. * @return array An array of associative arrays representing reserve items.
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/ */
public function findReserves($course, $inst, $dept) public function findReserves($course, $inst, $dept)
{ {
......
...@@ -4,8 +4,14 @@ ...@@ -4,8 +4,14 @@
// Set up breadcrumbs: // Set up breadcrumbs:
$this->layout()->breadcrumbs = '<li class="active">' . $this->transEsc('New Items') . '</li>'; $this->layout()->breadcrumbs = '<li class="active">' . $this->transEsc('New Items') . '</li>';
// Convenience variable:
$offlineMode = $this->ils()->getOfflineMode();
?> ?>
<h2><?=$this->transEsc('Find New Items')?></h2> <h2><?=$this->transEsc('Find New Items')?></h2>
<? if ($offlineMode == "ils-offline"): ?>
<?=$this->render('Helpers/ils-offline.phtml', ['offlineModeMsg' => 'ils_offline_holdings_message'])?>
<? endif; ?>
<form method="get" class="form-search-newitem"> <form method="get" class="form-search-newitem">
<div class="form-group"> <div class="form-group">
<label class="control-label"><?=$this->transEsc('Range')?>:</label> <label class="control-label"><?=$this->transEsc('Range')?>:</label>
......
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