Browse Source

added metadata to fieldset, switched box model to border box to avoid truncating labels in definition lists

pull/113/head
krisbulman 13 years ago
parent
commit
59232b05fd
  1. 36
      islandora_basic_image/css/islandora_basic_image.theme.css
  2. 35
      islandora_basic_image/islandora-basic-image.tpl.php
  3. 2
      islandora_basic_image/islandora_basic_image.module

36
islandora_basic_image/css/islandora_basic_image.theme.css

@ -18,8 +18,8 @@
}
.islandora-basic-image-metadata {
clear: both;
padding-top: 1.5em;
display: block;
clear: both
}
dl.islandora-basic-image-fields {
@ -33,15 +33,25 @@ dl.islandora-basic-image-fields {
/*
* The width + left/right padding of DTs/DDs equals 88% when compensating for an image
*/
.islandora-basic-image-metadata * {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.islandora-basic-image-metadata dt {
margin-right:-1px;
width:12.5%;
font-weight: bold;
width:15.625%;
font-weight: normal;
text-align: right;
font-weight: bold;
padding-right: 0;
}
.islandora-basic-image-metadata dd {
width:77%;
width:84.375%;
padding-left: 40px;
}
/*
@ -55,15 +65,15 @@ dl.islandora-basic-image-fields {
letter-spacing:normal;
word-spacing:normal;
vertical-align:top;
padding:5px 0 3px 3%;
padding-top: 6px;
padding-bottom: 4px;
margin:0;
border-top:1px solid #ddd;
-ms-word-break: break-all;
word-break: break-all;
word-break: break-word; /* webkit */
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
border-top:1px solid #e5e5e5;
}
.islandora-basic-image-metadata dt.first,
.islandora-basic-image-metadata dd.first {
border-top:0;
}
.islandora-basic-image-sidebar,

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

@ -32,19 +32,22 @@
<h3><?php print $dc_array['dc:description']['label']; ?></h3>
<p><?php print $dc_array['dc:description']['value']; ?></p>
</div>
<div class="islandora-basic-image-metadata">
<h4>Details</h4>
<dl class="islandora-basic-image-fields">
<?php $row_field = 0; ?>
<?php foreach($dc_array as $key => $value): ?>
<dt class="<?php print $value['class']; ?><?php print $row_field == 0 ? ' first' : ''; ?>">
<?php print $value['label']; ?>
</dt>
<dd class="<?php print $value['class']; ?><?php print $row_field == 0 ? ' first' : ''; ?>">
<?php print $value['value']; ?>
</dd>
<?php $row_field++; ?>
<?php endforeach; ?>
</dl>
</div>
</div>
<fieldset class="collapsible collapsed islandora-basic-image-metadata">
<legend><span class="fieldset-legend">Extended Details</span></legend>
<div class="fieldset-wrapper">
<dl class="islandora-basic-image-fields">
<?php $row_field = 0; ?>
<?php foreach($dc_array as $key => $value): ?>
<dt class="<?php print $value['class']; ?><?php print $row_field == 0 ? ' first' : ''; ?>">
<?php print $value['label']; ?>
</dt>
<dd class="<?php print $value['class']; ?><?php print $row_field == 0 ? ' first' : ''; ?>">
<?php print $value['value']; ?>
</dd>
<?php $row_field++; ?>
<?php endforeach; ?>
</dl>
</div>
</fieldset>
</div>

2
islandora_basic_image/islandora_basic_image.module

@ -200,6 +200,8 @@ function islandora_basic_image_islandora_view_object($object, $user, $page_numbe
* an array of variables that will be passed to the theme function
*/
function islandora_basic_image_preprocess_islandora_basic_image(&$variables) {
drupal_add_js('misc/form.js');
drupal_add_js('misc/collapse.js');
$islandora_object = $variables['islandora_object'];
module_load_include('inc', 'islandora', 'includes/islandora_dublin_core');
try {

Loading…
Cancel
Save