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

Add grid view for BrowZine.

parent d3080df4
Branches
Tags
No related merge requests found
......@@ -10,3 +10,14 @@ library_id = "yyy"
; HTTP timeout
timeout = 30
; This setting controls the default view for search results; the selected option
; should be one of the options present in the [Views] section below.
default_view = list
; This section defines the view options available on standard search results.
; If only one view is required, set default_view under [General] above, and
; leave this section commented out.
;[Views]
;list = List
;grid = Grid
......@@ -38,6 +38,8 @@ namespace VuFind\Search\BrowZine;
*/
class Options extends \VuFind\Search\Base\Options
{
use \VuFind\Search\Options\ViewOptionsTrait;
/**
* Constructor
*
......@@ -47,6 +49,10 @@ class Options extends \VuFind\Search\Base\Options
{
$this->facetsIni = $this->searchIni = 'BrowZine';
parent::__construct($configLoader);
// Set up views
$searchSettings = $configLoader->get($this->searchIni);
$this->initViewOptions($searchSettings);
}
/**
......
<?
$urls = $this->driver->getURLs();
$url = isset($urls[0]) ? $urls[0]['url'] : null;
$coverDetails = $this->record($this->driver)->getCoverDetails('result-list', 'medium', $url);
?>
<div class="grid-result">
<div class="grid-body">
<div class="browzine"><?=$coverDetails['html']?></div>
<div>
<a class="title" href="<?=$this->escapeHtmlAttr($url)?>">
<?=$this->record($this->driver)->getTitleHtml(80)?>
</a>
</div>
</div>
<?=$this->driver->supportsCoinsOpenUrl()?'<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>':''?>
</div>
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