Browse Source

updated templates for default list view when viewing collections, fixed problem with linking to full image if full image does not exist

pull/120/head
krisbulman 13 years ago
parent
commit
9873ebe120
  1. 50
      islandora_basic_collection/css/islandora_basic_collection.theme.css
  2. 2
      islandora_basic_collection/islandora-basic-collection-grid.tpl.php
  3. 36
      islandora_basic_collection/islandora-basic-collection.tpl.php
  4. 6
      islandora_basic_image/islandora-basic-image.tpl.php

50
islandora_basic_collection/css/islandora_basic_collection.theme.css

@ -6,12 +6,16 @@
*/ */
.islandora-basic-collection { .islandora-basic-collection {
margin: 1.5em auto;
overflow: hidden; overflow: hidden;
width: 96%; width: 100%;
margin: 0 auto;
} }
dl.islandora-basic-collection-object .islandora-basic-collection-object {
margin: 1.5em auto 3em;
}
.islandora-basic-collection-grid dl.islandora-basic-collection-object
{ {
width: 20%; width: 20%;
min-width: 100px; min-width: 100px;
@ -25,7 +29,7 @@ dl.islandora-basic-collection-object
_height: 180px; _height: 180px;
} }
.islandora-basic-collection-object dt img { .islandora-basic-collection-grid .islandora-basic-collection-object dt img {
max-width: 100%; max-width: 100%;
*width: 100%; *width: 100%;
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
@ -33,7 +37,7 @@ dl.islandora-basic-collection-object
border-radius: 5px; border-radius: 5px;
} }
.islandora-basic-collection-object dd .islandora-basic-collection-grid .islandora-basic-collection-object dd
{ {
margin: 0; margin: 0;
padding: 0; padding: 0;
@ -44,3 +48,39 @@ dl.islandora-basic-collection-object
#islandora-collection-migrate-form table th.select-all { #islandora-collection-migrate-form table th.select-all {
width: 20px; width: 20px;
} }
/* the base css for lists is set in islandora, just adding details */
dl.islandora-basic-collection-thumb
{
float: left;
width: 15%;
margin: 0;
}
.islandora-basic-collection-thumb dt,
.islandora-basic-collection-thumb dd
{
margin: 0;
}
dl.islandora-basic-collection-fields
{
float: right;
width: 83%;
border-top: 0px solid #ddd;
padding-left: 10px;
}
.islandora-basic-collection-fields dt,
.islandora-basic-collection-fields dd
{
border-top: 1px solid #ddd;
}
.islandora-basic-collection-fields dt.first,
.islandora-basic-collection-fields dd.first
{
border-top: 1px solid #ddd;
}

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

@ -24,7 +24,7 @@
<div class="islandora-basic-collection-wrapper"> <div class="islandora-basic-collection-wrapper">
<div class="islandora-basic-collection clearfix"> <div class="islandora-basic-collection-grid clearfix">
<?php foreach($associated_objects_array as $key => $value): ?> <?php foreach($associated_objects_array as $key => $value): ?>
<dl class="islandora-basic-collection-object <?php print $value['class']; ?>"> <dl class="islandora-basic-collection-object <?php print $value['class']; ?>">
<dt class="islandora-basic-collection-thumb"><?php print $value['thumb_link']; ?></dt> <dt class="islandora-basic-collection-thumb"><?php print $value['thumb_link']; ?></dt>

36
islandora_basic_collection/islandora-basic-collection.tpl.php

@ -23,13 +23,31 @@
?> ?>
<?php drupal_set_title($islandora_object->label); ?> <?php drupal_set_title($islandora_object->label); ?>
<div class="islandora-basic-collection-wrapper"> <div class="islandora islandora-basic-collection-wrapper">
<div class="islandora-basic-collection clearfix"> <?php $row_field = 0; ?>
<?php foreach($associated_objects_array as $key => $value): ?> <?php foreach($associated_objects_array as $associated_object): ?>
<dl class="islandora-basic-collection-object <?php print $value['class']; ?>"> <div class="islandora-basic-collection-object clearfix">
<dt class="islandora-basic-collection-thumb"><?php print $value['thumb_link']; ?></dt> <dl class="islandora-basic-collection-thumb <?php print $associated_object['class']; ?>">
<dd class="islandora-basic-collection-caption"><?php print $value['title_link']; ?></dd> <dt><?php print $associated_object['thumb_link']; ?></dt>
</dl> <dd></dd>
<?php endforeach; ?> </dl>
</div> <dl class="islandora-inline-metadata islandora-basic-collection-fields">
<dt class="collection-label <?php print $associated_object['dc_array']['dc:title']['class']; ?> <?php print $row_field == 0 ? ' first' : ''; ?>">
<?php print $associated_object['dc_array']['dc:title']['label']; ?>
</dt>
<dd class="collection-value <?php print $associated_object['dc_array']['dc:title']['class']; ?> <?php print $row_field == 0 ? ' first' : ''; ?>">
<?php print $associated_object['title_link']; ?>
</dd>
<?php if ($associated_object['dc_array']['dc:description']['value']): ?>
<dt class="collection-label <?php print $associated_object['dc_array']['dc:description']['class']; ?>">
<?php print $associated_object['dc_array']['dc:description']['label']; ?>
</dt>
<dd class="collection-value <?php print $associated_object['dc_array']['dc:description']['class']; ?>">
<?php print $associated_object['dc_array']['dc:description']['value']; ?>
</dd>
<?php $row_field++; ?>
<?php endif; ?>
</dl>
</div>
<?php endforeach; ?>
</div> </div>

6
islandora_basic_image/islandora-basic-image.tpl.php

@ -25,7 +25,11 @@
<div class="islandora-basic-image-object islandora"> <div class="islandora-basic-image-object islandora">
<div class="islandora-basic-image-content clearfix"> <div class="islandora-basic-image-content clearfix">
<?php print l($islandora_medium_img, $islandora_full_url, array('html' => TRUE)); ?> <?php if(isset($islandora_full_url)): ?>
<?php print l($islandora_medium_img, $islandora_full_url, array('html' => TRUE)); ?>
<?php else: ?>
<?php print $islandora_medium_img; ?>
<?php endif; ?>
</div> </div>
<div class="islandora-basic-image-sidebar"> <div class="islandora-basic-image-sidebar">
<h1 class="title"><?php print $islandora_object_label; ?></h1> <h1 class="title"><?php print $islandora_object_label; ?></h1>

Loading…
Cancel
Save