Browse Source

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

pull/117/head
krisbulman 13 years ago
parent
commit
31f011a9d7
  1. 6
      islandora.module
  2. 2
      islandora_basic_collection/admin/islandora_basic_collection.admin.inc
  3. 37
      islandora_basic_collection/islandora-basic-collection-grid.tpl.php
  4. 21
      islandora_basic_collection/islandora_basic_collection.module
  5. 2
      islandora_basic_image/admin/islandora_basic_image.admin.inc

6
islandora.module

@ -670,9 +670,9 @@ function islandora_preprocess_islandora_default_edit(&$variables) {
$rows = array(); $rows = array();
foreach ($islandora_object as $ds) { foreach ($islandora_object as $ds) {
$rows[] = array( $rows[] = array(
array('class' => 'datastream-label', 'data' => l($ds->id, $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/' . $ds->id . '/view')), array('class' => 'datastream-id', 'data' => l($ds->id, $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/' . $ds->id . '/view')),
array('class' => 'datastream-label', 'data' => $ds->controlGroup), array('class' => 'datastream-control', 'data' => $ds->controlGroup),
array('class' => 'datastream-label', 'data' => $ds->mimeType), array('class' => 'datastream-mime', 'data' => $ds->mimeType),
array('class' => 'datastream-label', 'data' => l($ds->label, $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/' . $ds->id . '/view')), array('class' => 'datastream-label', 'data' => l($ds->label, $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/' . $ds->id . '/view')),
array('class' => 'datastream-download', 'data' => l(t('download'), $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/' . $ds->id . '/download')), array('class' => 'datastream-download', 'data' => l(t('download'), $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/' . $ds->id . '/download')),
array('class' => 'datastream-delete', 'data' => l(t('delete'), $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/' . $ds->id . '/delete')), array('class' => 'datastream-delete', 'data' => l(t('delete'), $base_url . '/islandora/object/' . $islandora_object->id . '/datastream/' . $ds->id . '/delete')),

2
islandora_basic_collection/admin/islandora_basic_collection.admin.inc

@ -5,7 +5,7 @@ function islandora_basic_collection_admin() {
$form['islandora_basic_collection_use_for_default_tab'] = array( $form['islandora_basic_collection_use_for_default_tab'] = array(
'#type' => 'checkbox', '#type' => 'checkbox',
'#title' => t('Provide the view for the default tab'), '#title' => t('Provide the view for the default tab'),
'#default_value' => variable_get('islandora_basic_collection_use_for_default_tab', 'TRUE'), '#default_value' => variable_get('islandora_basic_collection_use_for_default_tab', TRUE),
'#description' => t('Should this module provide the view for the default view tab. If you are seeing unexpected content '#description' => t('Should this module provide the view for the default view tab. If you are seeing unexpected content
on a view tab you may have multiple modules configured to provide content for the default tab.'), on a view tab you may have multiple modules configured to provide content for the default tab.'),
'#weight' => -10 '#weight' => -10

37
islandora_basic_collection/islandora-basic-collection-grid.tpl.php

@ -0,0 +1,37 @@
<?php
/*
* islandora-basic-collection.tpl.php
*
*
*
* This file is part of Islandora.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program. If not, see <http ://www.gnu.org/licenses/>.
*/
?>
<?php drupal_set_title('grid_view'); ?>
<div class="islandora-basic-collection-wrapper">
<div class="islandora-basic-collection clearfix">
<?php print($variables['pager']); ?>
<?php foreach($associated_objects_array as $key => $value): ?>
<dl class="islandora-basic-collection-object <?php print $value['class']; ?>">
<dt class="islandora-basic-collection-thumb"><?php print $value['thumb_link']; ?></dt>
<dd class="islandora-basic-collection-caption"><?php print $value['title_link']; ?></dd>
</dl>
<?php endforeach; ?>
<?php print($variables['pager']); ?>
</div>
</div>

21
islandora_basic_collection/islandora_basic_collection.module

@ -176,6 +176,11 @@ function islandora_basic_collection_theme($existing, $type, $theme, $path) {
//an example template would be named islandora-basic-image--islandora-27.tpl.phps //an example template would be named islandora-basic-image--islandora-27.tpl.phps
'variables' => array('islandora_object' => NULL), 'variables' => array('islandora_object' => NULL),
), ),
'islandora_basic_collection_grid' => array(
'template' => 'islandora-basic-collection-grid',
'pattern' => 'islandora_basic_collection_grid__',
'variables' => array('islandora_object' => NULL),
),
'islandora_basic_collection_management_form_table' => array( 'islandora_basic_collection_management_form_table' => array(
'arguments' => array('element' => NULL), 'arguments' => array('element' => NULL),
'file' => 'includes/CollectionManagerTable.inc', 'file' => 'includes/CollectionManagerTable.inc',
@ -216,13 +221,27 @@ function islandora_basic_collection_islandora_view_object($object, $user) {
$models = $object->models; $models = $object->models;
foreach ($object->models as $model) { foreach ($object->models as $model) {
if (isset($cmodel_list[$model][ISLANDORA_VIEW_HOOK]) && $cmodel_list[$model][ISLANDORA_VIEW_HOOK] == TRUE) { if (isset($cmodel_list[$model][ISLANDORA_VIEW_HOOK]) && $cmodel_list[$model][ISLANDORA_VIEW_HOOK] == TRUE) {
$display = (empty($_GET['display'])) ? 'list' : $_GET['display'];
if($display == 'grid'){
$output = theme('islandora_basic_collection_grid', array('islandora_object' => $object));
} else {
$output = theme('islandora_basic_collection', array('islandora_object' => $object)); $output = theme('islandora_basic_collection', array('islandora_object' => $object));
return array('' => $output); }
return array('Collection View' => $output);
} }
} }
return NULL; return NULL;
} }
/**
* list view preprocess
* currently just calls normal view preprocess as variables are the same
* @param type $variables
*/
function islandora_basic_collection_preprocess_islandora_basic_collection_grid(&$variables){
islandora_basic_collection_preprocess_islandora_basic_collection($variables);
}
/** /**
* *
* @global type $base_url * @global type $base_url

2
islandora_basic_image/admin/islandora_basic_image.admin.inc

@ -5,7 +5,7 @@ function islandora_basic_image_admin() {
$form['islandora_basic_image_use_for_default_tab'] = array( $form['islandora_basic_image_use_for_default_tab'] = array(
'#type' => 'checkbox', '#type' => 'checkbox',
'#title' => t('Provide the view for the default tab'), '#title' => t('Provide the view for the default tab'),
'#default_value' => variable_get('islandora_basic_image_use_for_default_tab', 'TRUE'), '#default_value' => variable_get('islandora_basic_image_use_for_default_tab', TRUE),
'#description' => t('Should this module provide the view for the default view tab. If you are seeing unexpected content '#description' => t('Should this module provide the view for the default view tab. If you are seeing unexpected content
on a view tab you may have multiple modules configured to provide content for the default tab.'), on a view tab you may have multiple modules configured to provide content for the default tab.'),
'#weight' => -10 '#weight' => -10

Loading…
Cancel
Save