|
|
@ -18,12 +18,25 @@ function islandora_basic_collection_preprocess_islandora_basic_collection_wrappe |
|
|
|
pager_default_initialize($total_count, $page_size); |
|
|
|
pager_default_initialize($total_count, $page_size); |
|
|
|
$variables['collection_pager'] = theme('pager', array('quantity' => 10)); |
|
|
|
$variables['collection_pager'] = theme('pager', array('quantity' => 10)); |
|
|
|
$display = (empty($_GET['display'])) ? 'list' : $_GET['display']; |
|
|
|
$display = (empty($_GET['display'])) ? 'list' : $_GET['display']; |
|
|
|
|
|
|
|
$link_text = (empty($_GET['display'])) ? 'grid' : $_GET['display']; |
|
|
|
|
|
|
|
$query_params = drupal_get_query_parameters($_GET); |
|
|
|
|
|
|
|
|
|
|
|
if ($display == 'grid') { |
|
|
|
if ($display == 'grid') { |
|
|
|
|
|
|
|
$query_params['display'] = 'list'; |
|
|
|
|
|
|
|
$link_text = 'list view'; |
|
|
|
|
|
|
|
$link_class = 'islandora-view-default'; |
|
|
|
$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'] = 'grid'; |
|
|
|
|
|
|
|
$link_text = 'grid view'; |
|
|
|
|
|
|
|
$link_class = 'islandora-view-grid'; |
|
|
|
$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)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
global $base_url; |
|
|
|
|
|
|
|
$link = l($link_text, $base_url . '/islandora/object/' . $islandora_object->id, array('attributes' => array('class' => $link_class), |
|
|
|
|
|
|
|
'query' => $query_params)); |
|
|
|
|
|
|
|
$variables['switch_view_link'] = $link; |
|
|
|
$variables['collection_content'] = $collection_content; |
|
|
|
$variables['collection_content'] = $collection_content; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -102,7 +115,7 @@ function islandora_basic_collection_preprocess_islandora_basic_collection(&$vari |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
$image_path = drupal_get_path('module', 'islandora'); |
|
|
|
$image_path = drupal_get_path('module', 'islandora'); |
|
|
|
$thumbnail_img = '<img src="' .$base_path . $image_path . '/images/Crystal_Clear_action_filenew.png"/>'; |
|
|
|
$thumbnail_img = '<img src="' . $base_path . $image_path . '/images/Crystal_Clear_action_filenew.png"/>'; |
|
|
|
} |
|
|
|
} |
|
|
|
$associated_objects_array[$pid]['thumbnail'] = $thumbnail_img; |
|
|
|
$associated_objects_array[$pid]['thumbnail'] = $thumbnail_img; |
|
|
|
$associated_objects_array[$pid]['title_link'] = l($title, $object_url, array('html' => TRUE, 'attributes' => array('title' => $title))); |
|
|
|
$associated_objects_array[$pid]['title_link'] = l($title, $object_url, array('html' => TRUE, 'attributes' => array('title' => $title))); |
|
|
|