Browse Source

Merge pull request #125 from krisbulman/7.x

updated conditionals and modified grid list lingo
pull/145/head
Kris Bulman 13 years ago
parent
commit
d17d226b79
  1. 13
      islandora_basic_collection/theme/islandora-basic-collection.tpl.php
  2. 8
      islandora_basic_collection/theme/islandora_basic_collection.theme.inc
  3. 18
      theme/islandora-object.tpl.php

13
islandora_basic_collection/theme/islandora-basic-collection.tpl.php

@ -21,7 +21,10 @@
* along with the program. If not, see <http ://www.gnu.org/licenses/>.
*/
?>
<?php drupal_set_title($islandora_object->label); ?>
<?php if(isset($islandora_object_label)): ?>
<?php drupal_set_title("$islandora_object_label"); ?>
<?php endif; ?>
<div class="islandora islandora-basic-collection">
<?php $row_field = 0; ?>
@ -29,10 +32,14 @@
<div class="islandora-basic-collection-object islandora-basic-collection-list-item clearfix">
<dl class="<?php print $associated_object['class']; ?>">
<dt>
<?php print $associated_object['thumb_link']; ?>
<?php if (isset($associated_object['thumb_link'])): ?>
<?php print $associated_object['thumb_link']; ?>
<?php endif; ?>
</dt>
<dd class="collection-value <?php print isset($associated_object['dc_array']['dc:title']['class']) ? $associated_object['dc_array']['dc:title']['class'] : ''; ?> <?php print $row_field == 0 ? ' first' : ''; ?>">
<strong><?php print $associated_object['title_link']; ?></strong>
<?php if (isset($associated_object['thumb_link'])): ?>
<strong><?php print $associated_object['title_link']; ?></strong>
<?php endif; ?>
</dd>
<?php if (isset($associated_object['dc_array']['dc:description']['value'])): ?>
<dd class="collection-value <?php print $associated_object['dc_array']['dc:description']['class']; ?>">

8
islandora_basic_collection/theme/islandora_basic_collection.theme.inc

@ -23,21 +23,21 @@ function islandora_basic_collection_preprocess_islandora_basic_collection_wrappe
global $base_url;
if ($display == 'grid') {
$query_params['display'] = 'list';
$list_link = array('title' => 'List View', 'href' => $base_url . '/islandora/object/' . $islandora_object->id, '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);
unset($query_params['display']);
$query_params['display'] = 'grid';
$grid_link = array('title' => 'Grid View', 'href' => $base_url . '/islandora/object/' . $islandora_object->id, '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);
$collection_content = theme('islandora_basic_collection_grid', array('islandora_object' => $islandora_object, 'collection_results' => $results));
}
else {
$query_params['display'] = 'list';
$list_link = array('title' => 'List View', 'href' => $base_url . '/islandora/object/' . $islandora_object->id, '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);
unset($query_params['display']);
$query_params['display'] = 'grid';
$grid_link = array('title' => 'Grid View', 'href' => $base_url . '/islandora/object/' . $islandora_object->id, '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);
$collection_content = theme('islandora_basic_collection', array('islandora_object' => $islandora_object, 'collection_results' => $results));
}

18
theme/islandora-object.tpl.php

@ -74,9 +74,11 @@
* }
*
*/
drupal_set_title($islandora_object->label);
?>
<?php if(isset($islandora_object_label)): ?>
<?php drupal_set_title("$islandora_object_label"); ?>
<?php endif; ?>
<div class="islandora-object islandora">
<h2>Details</h2>
<dl class="islandora-object-tn">
@ -97,12 +99,14 @@ drupal_set_title($islandora_object->label);
</dd>
<?php $row_field++; ?>
<?php endforeach; ?>
<?php if($parent_collections): ?>
<dt>Collections</dt>
<dd>
<?php foreach($parent_collections as $key => $value): ?>
<div><?php print $value['label_link'] ?></div>
<?php endforeach; ?>
</dd>
<?php endif; ?>
</dl>
</div>
<fieldset class="collapsible collapsed" style="display: block; clear:both">
@ -118,11 +122,11 @@ drupal_set_title($islandora_object->label);
</tr>
<?php foreach($datastreams as $key => $value): ?>
<tr>
<td><?php print $value['id']; ?></td>
<td><?php print $value['label_link']; ?></td>
<td><?php print $value['size']; ?></td>
<td><?php print $value['mimetype']; ?></td>
<td><?php print $value['created_date']; ?></td>
<td><?php if(isset($value['id'])): ?><?php print $value['id']; ?><?php endif; ?></td>
<td><?php if(isset($value['label_link'])): ?><?php print $value['label_link']; ?><?php endif; ?></td>
<td><?php if(isset($value['size'])): ?><?php print $value['size']; ?><?php endif; ?></td>
<td><?php if(isset($value['mimetype'])): ?><?php print $value['mimetype']; ?><?php endif; ?></td>
<td><?php if(isset($value['created_date'])): ?><?php print $value['created_date']; ?><?php endif; ?></td>
</tr>
<?php endforeach; ?>
</table>

Loading…
Cancel
Save