Author: sevein
Date: Wed Oct 20 14:08:32 2010
New Revision: 8334
Log:
Support digital objects with unknown media type, fixes issue 1802.
Modified:
trunk/apps/qubit/modules/search/templates/indexSuccess.php
Modified: trunk/apps/qubit/modules/search/templates/indexSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/search/templates/indexSuccess.php Wed Oct 20
13:12:00 2010 (r8333)
+++ trunk/apps/qubit/modules/search/templates/indexSuccess.php Wed Oct 20
14:08:32 2010 (r8334)
@@ -19,9 +19,11 @@
<div class="clearfix search-results <?php echo 0 == ++$row % 2 ? 'even'
: 'odd' ?>">
<?php if (isset($informationObject->digitalObjects[0])): ?>
- <?php if (QubitTerm::AUDIO_ID ==
$informationObject->digitalObjects[0]->mediaTypeId): ?>
+ <?php if
(!isset($informationObject->digitalObjects[0]->mediaTypeId)): ?>
+ <?php echo
link_to(image_tag(QubitDigitalObject::getGenericRepresentation($informationObject->digitalObjects[0]->mediaTypeId,
QubitTerm::THUMBNAIL_ID)->getFullPath(), array('alt' =>
render_title($informationObject))), array($informationObject, 'module' =>
'informationobject')) ?>
+ <?php elseif (QubitTerm::AUDIO_ID ==
$informationObject->digitalObjects[0]->mediaTypeId): ?>
<?php echo link_to(image_tag("play.png", array('alt' =>
render_title($informationObject))), array($informationObject, 'module' =>
'informationobject')) ?>
- <?php else: ?>
+ <?php elseif (null !==
$informationObject->digitalObjects[0]->thumbnail): ?>
<?php echo
link_to(image_tag(public_path($informationObject->digitalObjects[0]->thumbnail->getFullPath()),
array('alt' => render_title($informationObject))), array($informationObject,
'module' => 'informationobject')) ?>
<?php endif;?>
<?php endif; ?>
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.