From 3ff6e9da4cf28577d2e1b2da28a4a73d010ca3e9 Mon Sep 17 00:00:00 2001 From: Paul Pound Date: Fri, 1 Jun 2012 16:00:29 -0300 Subject: [PATCH] running change view links through theme links --- ...islandora-basic-collection-wrapper.tpl.php | 4 +++- .../islandora_basic_collection.theme.inc | 20 +++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/islandora_basic_collection/theme/islandora-basic-collection-wrapper.tpl.php b/islandora_basic_collection/theme/islandora-basic-collection-wrapper.tpl.php index 355da7cf..316ac719 100644 --- a/islandora_basic_collection/theme/islandora-basic-collection-wrapper.tpl.php +++ b/islandora_basic_collection/theme/islandora-basic-collection-wrapper.tpl.php @@ -25,7 +25,9 @@
- + + $view_links, 'attributes' => array('class' => array('links', 'inline'))));?> + diff --git a/islandora_basic_collection/theme/islandora_basic_collection.theme.inc b/islandora_basic_collection/theme/islandora_basic_collection.theme.inc index cc5dae16..d1851dd3 100644 --- a/islandora_basic_collection/theme/islandora_basic_collection.theme.inc +++ b/islandora_basic_collection/theme/islandora_basic_collection.theme.inc @@ -23,26 +23,26 @@ function islandora_basic_collection_preprocess_islandora_basic_collection_wrappe global $base_url; if ($display == 'grid') { $query_params['display'] = 'list'; - $list_link = l('List View', $base_url . '/islandora/object/' . $islandora_object->id, array('attributes' => array('class' => 'islandora-view-list'), - 'query' => $query_params)); + $list_link = array('title' => 'List View', 'href' => $base_url . '/islandora/object/' . $islandora_object->id, 'attributes' => array('class' => 'islandora-view-list'), + 'query' => $query_params); unset($query_params['display']); $query_params['display'] = 'grid'; - $grid_link = l('Grid View', $base_url . '/islandora/object/' . $islandora_object->id, array('attributes' => array('class' => array('islandora-view-grid', 'active')), - 'query' => $query_params)); + $grid_link = array('title' => 'Grid View', 'href' => $base_url . '/islandora/object/' . $islandora_object->id, 'attributes' => array('class' => array('islandora-view-grid', 'active')), + 'query' => $query_params); $collection_content = theme('islandora_basic_collection_grid', array('islandora_object' => $islandora_object, 'collection_results' => $results)); } else { $query_params['display'] = 'list'; - $list_link = l('List View', $base_url . '/islandora/object/' . $islandora_object->id, array('attributes' => array('class' => array('islandora-view-list', 'active')), - 'query' => $query_params)); + $list_link = array('title' => 'List View', 'href' => $base_url . '/islandora/object/' . $islandora_object->id, 'attributes' => array('class' => array('islandora-view-list', 'active')), + 'query' => $query_params); unset($query_params['display']); $query_params['display'] = 'grid'; - $grid_link = l('Grid View', $base_url . '/islandora/object/' . $islandora_object->id, array('attributes' => array('class' => 'islandora-view-grid'), - 'query' => $query_params)); + $grid_link = array('title' => 'Grid View', 'href' => $base_url . '/islandora/object/' . $islandora_object->id, 'attributes' => array('class' => 'islandora-view-grid'), + 'query' => $query_params); $collection_content = theme('islandora_basic_collection', array('islandora_object' => $islandora_object, 'collection_results' => $results)); } - $variables['list_link'] = $list_link; - $variables['grid_link'] = $grid_link; + $variables['view_links'] = array($grid_link,$list_link); + //$variables['grid_link'] = $grid_link; $variables['collection_content'] = $collection_content; }