diff --git a/config/vufind/BrowZine.ini b/config/vufind/BrowZine.ini index 709f4e736afa9ac86d7ad64c12993ff53796f912..f0c213374e386dc87e6c1b2f2f2d79c336a8a983 100644 --- a/config/vufind/BrowZine.ini +++ b/config/vufind/BrowZine.ini @@ -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 diff --git a/module/VuFind/src/VuFind/Search/BrowZine/Options.php b/module/VuFind/src/VuFind/Search/BrowZine/Options.php index 4bd0ead157d1bb55fa15c7e03147c34b36ca1379..bb448de9710ad4eebc0390e1a14f8d37c6c2f6c9 100644 --- a/module/VuFind/src/VuFind/Search/BrowZine/Options.php +++ b/module/VuFind/src/VuFind/Search/BrowZine/Options.php @@ -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); } /** diff --git a/themes/bootstrap3/templates/RecordDriver/BrowZine/result-grid.phtml b/themes/bootstrap3/templates/RecordDriver/BrowZine/result-grid.phtml new file mode 100644 index 0000000000000000000000000000000000000000..729eb90437ff88cab8440797824e98a25e0d1944 --- /dev/null +++ b/themes/bootstrap3/templates/RecordDriver/BrowZine/result-grid.phtml @@ -0,0 +1,19 @@ +<? + $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> +