From 51fd876561551135d9e5c11918f8372e5d9fa25d Mon Sep 17 00:00:00 2001 From: Alexander O'Neill Date: Mon, 31 Jan 2011 11:45:22 -0400 Subject: [PATCH] Show thumbnail in PDF. --- plugins/ShowStreamsInFieldSets.inc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/ShowStreamsInFieldSets.inc b/plugins/ShowStreamsInFieldSets.inc index c3734334..1607349c 100644 --- a/plugins/ShowStreamsInFieldSets.inc +++ b/plugins/ShowStreamsInFieldSets.inc @@ -75,9 +75,15 @@ class ShowStreamsInFieldSets { ); $objectHelper = new ObjectHelper(); $item = new Fedora_Item($this->pid); - + if (key_exists('TN', $item->datastreams)) { + $tn_url = $base_url.'/fedora/repository/'.$item->pid.'/TN'; + } + else { + $tn_url = $base_path.drupal_get_path('module', 'fedora_repository').'/images/Crystal_Clear_app_download_manager.png'; + } $dc_html = $objectHelper->getFormattedDC($item); - $dl_link = l('

Download PDF
', '/fedora/repository/'.$this->pid.'/OBJ', array('html' => TRUE)); + + $dl_link = l('

View Document
', '/fedora/repository/'.$this->pid.'/OBJ', array('html' => TRUE)); $ds_list = $objectHelper->getFormattedDatastreamList($this->pid, NULL, $item); $tabset['my_tabset']['first_tab']['tabset']['view'] = array(