Browse Source

Merge remote-tracking branch 'upstream/7.x' into 7.x

pull/125/head
krisbulman 13 years ago
parent
commit
bbfcf5ea93
  1. 6
      islandora.api.php
  2. 4
      islandora_basic_collection/theme/islandora-basic-collection-wrapper.tpl.php
  3. 20
      islandora_basic_collection/theme/islandora_basic_collection.theme.inc

6
islandora.api.php

@ -87,6 +87,12 @@ function hook_islandora_postingest($islandora_object){}
*/ */
function hook_islandora_ingest_registry($collection_object) {} function hook_islandora_ingest_registry($collection_object) {}
/**
* Register a datastream edit route/form.
* @param $islandora_object
* @param $ds_id
*/
function hook_islandora_edit_datastream_registry($islandora_object, $ds_id) {}
/** /**
* alter an object before it gets used further down the stack * alter an object before it gets used further down the stack

4
islandora_basic_collection/theme/islandora-basic-collection-wrapper.tpl.php

@ -25,7 +25,9 @@
<div class="islandora-basic-collection-wrapper"> <div class="islandora-basic-collection-wrapper">
<div class="islandora-basic-collection clearfix"> <div class="islandora-basic-collection clearfix">
<span class="islandora-basic-collection-display-switch"><?php print $grid_link; ?> <?php print $list_link; ?></span> <span class="islandora-basic-collection-display-switch">
<?php print theme('links', array('links' => $view_links, 'attributes' => array('class' => array('links', 'inline'))));?>
</span>
<?php print $collection_pager; ?> <?php print $collection_pager; ?>
<?php print $collection_content; ?> <?php print $collection_content; ?>
<?php print $collection_pager; ?> <?php print $collection_pager; ?>

20
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; global $base_url;
if ($display == 'grid') { if ($display == 'grid') {
$query_params['display'] = 'list'; $query_params['display'] = 'list';
$list_link = l('List View', $base_url . '/islandora/object/' . $islandora_object->id, array('attributes' => array('class' => 'islandora-view-list'), $list_link = array('title' => 'List View', 'href' => $base_url . '/islandora/object/' . $islandora_object->id, 'attributes' => array('class' => 'islandora-view-list'),
'query' => $query_params)); 'query' => $query_params);
unset($query_params['display']); unset($query_params['display']);
$query_params['display'] = 'grid'; $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')), $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)); 'query' => $query_params);
$collection_content = theme('islandora_basic_collection_grid', array('islandora_object' => $islandora_object, 'collection_results' => $results)); $collection_content = theme('islandora_basic_collection_grid', array('islandora_object' => $islandora_object, 'collection_results' => $results));
} }
else { else {
$query_params['display'] = 'list'; $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')), $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)); 'query' => $query_params);
unset($query_params['display']); unset($query_params['display']);
$query_params['display'] = 'grid'; $query_params['display'] = 'grid';
$grid_link = l('Grid View', $base_url . '/islandora/object/' . $islandora_object->id, array('attributes' => array('class' => 'islandora-view-grid'), $grid_link = array('title' => 'Grid View', 'href' => $base_url . '/islandora/object/' . $islandora_object->id, 'attributes' => array('class' => 'islandora-view-grid'),
'query' => $query_params)); 'query' => $query_params);
$collection_content = theme('islandora_basic_collection', array('islandora_object' => $islandora_object, 'collection_results' => $results)); $collection_content = theme('islandora_basic_collection', array('islandora_object' => $islandora_object, 'collection_results' => $results));
} }
$variables['list_link'] = $list_link; $variables['view_links'] = array($grid_link,$list_link);
$variables['grid_link'] = $grid_link; //$variables['grid_link'] = $grid_link;
$variables['collection_content'] = $collection_content; $variables['collection_content'] = $collection_content;
} }

Loading…
Cancel
Save