From e7bc273c02f5db7ce3ede96531c25279d9e007b2 Mon Sep 17 00:00:00 2001 From: buttle Date: Thu, 2 Dec 2021 11:42:02 +0100 Subject: [PATCH 1/2] 'browse items' page redirects to sites main page --- view/omeka/site/item/browse.phtml | 99 +------------------------------ view/omeka/site/item/show.phtml | 3 +- 2 files changed, 5 insertions(+), 97 deletions(-) diff --git a/view/omeka/site/item/browse.phtml b/view/omeka/site/item/browse.phtml index 6f6939b..601d880 100644 --- a/view/omeka/site/item/browse.phtml +++ b/view/omeka/site/item/browse.phtml @@ -1,97 +1,4 @@ -plugin('translate'); -$escape = $this->plugin('escapeHtml'); -$this->headScript()->appendFile($this->assetUrl('js/browse.js')); -$this->htmlElement('body')->appendAttribute('class', 'item resource browse'); -$query = $this->params()->fromQuery(); -$itemSetShow = isset($itemSet); -if ($itemSetShow): - $this->htmlElement('body')->appendAttribute('class', 'item-set'); - $query['item_set_id'] = $itemSet->id(); -endif; - -$layoutSetting = $this->themeSetting('browse_layout'); -$gridState = ($layoutSetting == 'togglegrid') ? 'disabled' : ''; -$listState = ($layoutSetting == 'togglelist') ? 'disabled': ''; -$isGrid = (!isset($layoutSetting) || strpos($layoutSetting, 'grid') !== false) ? true : false; -$headingTerm = $this->siteSetting('browse_heading_property_term'); -$bodyTerm = $this->siteSetting('browse_body_property_term'); -$bodyTruncate = $this->themeSetting('truncate_body_property'); - -$sortHeadings = [ - [ - 'label' => $translate('Title'), - 'value' => 'dcterms:title' - ], - [ - 'label' => $translate('Identifier'), - 'value' => 'dcterms:identifier' - ], - [ - 'label' => $translate('Class'), - 'value' => 'resource_class_label' - ], - [ - 'label' => $translate('Created'), - 'value' => 'created' - ], -]; -?> - - - pageTitle($itemSet->displayTitle(), 2); ?> -

-
- displayValues(); ?> -
-
- ' . $escape($translate('Items')) . ''; ?> - - pageTitle($translate('Items'), 2); ?> - - -searchFilters(); ?> -
- -
-
- pagination(); ?> - -
- - -
- - hyperlink($translate('Advanced search'), $this->url('site/resource', ['controller' => 'item', 'action' => 'search'], ['query' => $query], true), ['class' => 'advanced-search']); ?> - sortSelector($sortHeadings); ?> -
- -trigger('view.browse.before'); ?> - -' : ''; ?> -trigger('view.browse.after'); ?> - -
- pagination(); ?> -
\ No newline at end of file + diff --git a/view/omeka/site/item/show.phtml b/view/omeka/site/item/show.phtml index c642215..030cee1 100644 --- a/view/omeka/site/item/show.phtml +++ b/view/omeka/site/item/show.phtml @@ -50,7 +50,8 @@ $("#archive_page_title").html('');