Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
69 lines (58 sloc) 2.98 KB
<?php echo head(array('title' => metadata('item', array('Dublin Core', 'Title')),'bodyclass' => 'items show')); ?>
<h1><?php echo metadata('item', array('Dublin Core', 'Title')); ?></h1>
<div id="primary">
<!-- prevent pdf files from showing both in the item view and in the plugins /viewers (lines 8 - 11), fix to prevent images being thumbnailed as a knock-on (line 12) -->
<?php if ((get_theme_option('Item FileGallery') == 0) && metadata('item', 'has files')): ?>
<?php echo set_loop_records('files', $item->Files);
foreach (loop('files') as $file):
if ($file->getExtension() !='pdf'):
echo file_markup($file, array('imageSize' => 'fullsize'));
endif;
endforeach; ?>
<?php endif; ?>
<?php echo all_element_texts('item'); ?>
<!-- disply pdfs in pdf.js, which should be installed in /var/www/html/ (lines 23 - 24), if the file is not a pdf it can be displayed in plugins as normal (lines 26 -28) -->
<?php if (!$item) $item = get_current_record('item');
$files = $item->Files;
foreach($files as $file)
if ($file->getExtension() =='pdf'){echo '<iframe width=100% height=800 src="http://deevy.nuim.ie/pdf.js/web/viewer.html?file=http://deevy.nuim.ie/files/original/'.metadata($file,'filename').'"></iframe>';
break;
}
if($file->getExtension() !='pdf'){
fire_plugin_hook('public_items_show', array('view' => $this, 'item' => $item));
}
?>
</div><!-- end primary -->
<aside id="sidebar">
<!-- The following returns all of the files associated with an item. -->
<?php if ((get_theme_option('Item FileGallery') == 1) && metadata('item', 'has files')): ?>
<div id="itemfiles" class="element">
<h2><?php echo __('Files'); ?></h2>
<?php echo item_image_gallery(); ?>
</div>
<?php endif; ?>
<!-- If the item belongs to a collection, the following creates a link to that collection. -->
<?php if (metadata('item', 'Collection Name')): ?>
<div id="collection" class="element">
<h2><?php echo __('Collection'); ?></h2>
<div class="element-text"><p><?php echo link_to_collection_for_item(); ?></p></div>
</div>
<?php endif; ?>
<!-- The following prints a list of all tags associated with the item -->
<?php if (metadata('item', 'has tags')): ?>
<div id="item-tags" class="element">
<h2><?php echo __('Tags'); ?></h2>
<div class="element-text"><?php echo tag_string('item'); ?></div>
</div>
<?php endif;?>
<!-- The following prints a citation for this item. -->
<div id="item-citation" class="element">
<h2><?php echo __('Citation'); ?></h2>
<div class="element-text"><?php echo metadata('item', 'citation', array('no_escape' => true)); ?></div>
</div>
</aside>
<ul class="item-pagination navigation">
<li id="previous-item" class="previous"><?php echo link_to_previous_item_show(); ?></li>
<li id="next-item" class="next"><?php echo link_to_next_item_show(); ?></li>
</ul>
<?php echo foot(); ?>