I wanted to follow up with that CSS tweaking for Solr Metadata display within the book viewer itself, in case anyone else is working on this.
1. I first changed the class name for the dl within islandora-solr-metadata-display.tpl.php, because that same class name is used elsewhere (e.g. Solr browse). I changed it to "islandora-display-metadata." Instead of changing the .tpl.php in the module, you can just drop the updated version into your theme directory, which will override the module theme. I don't know if any of these changes would be appropriate to commit to the Solr Metadata module.:
<dl class="islandora-display-metadata islandora-metadata-fields">
2. Then I added the following to my theme's style.css to fix how the record is displayed within the viewer. (You can play with the width and padding.)
.islandora-display-metadata dl {
overflow: hidden;
width: 100%;
}
dl.islandora-display-metadata dt {
width: 30%;
padding: 5px;
margin: 0;
float: left;
clear: left;
font-weight: bold;
}
dl.islandora-display-metadata dd {
width: 70%;
padding: 5px;
margin: 0;
overflow: hidden;
}
#cboxContent {
height: 100% !important;
}
3. If you have fields that are not required and don't want to display empty field labels (e.g. sometimes you have subjects, but not always, and you don't want to display the empty "Subject" label), you can also add some logic to islandora-solr-metadata-display.tpl.php to first check to see if the value is empty. Here's my complete override, which also gets rid of the "Details" legend/collapsed:
<?php if (!(empty($solr_fields) && variable_get('islandora_solr_metadata_omit_empty_values', FALSE))):?>
<fieldset <?php $print ? print('class="islandora islandora-metadata"') : print('class="islandora islandora-metadata"');?>>
<div class="fieldset-wrapper">
<?php $row_field = 0; ?>
<?php foreach($solr_fields as $value): ?>
<?php if (!empty($value['value'])): ?>
<dt class="<?php print $row_field == 0 ? ' first' : ''; ?>">
<?php print $value['display_label']; ?>
</dt>
<?php endif; ?>
<?php if (!empty($value['value'])): ?>
<dd class="<?php print $row_field == 0 ? ' first' : ''; ?>">
<?php print implode('<br/>', $value['value']); ?>
</dd>
<?php endif; ?>
<?php $row_field++; ?>
<?php endforeach; ?>
</dl>
</div>
</fieldset>
<?php endif; ?>
This thread was enormously useful while I was trying to figure out how to display with Solr Metadata within the viewer, so thanks!
Matt