Revision 80e0aa8e
Added by Andreas Kohlbecker about 14 years ago
modules/cdm_dataportal/theme/cdm_dataportal.common.theme | ||
---|---|---|
86 | 86 |
* |
87 | 87 |
*/ |
88 | 88 |
function theme_cdm_annotation($cdmBase){ |
89 |
if(!$cdmBase->uuid){ |
|
90 |
return; |
|
91 |
}else{ |
|
89 |
|
|
90 |
$annotationUrl = cdm_compose_annotations_url($cdmBase); |
|
92 | 91 |
|
92 |
if($annotationUrl){ |
|
93 | 93 |
drupal_add_js(drupal_get_path('module', 'cdm_dataportal').'/js/cdm_annotations.js'); |
94 | 94 |
drupal_add_js(drupal_get_path('module', 'cdm_dataportal').'/js/jquery.form.js'); |
95 |
|
|
96 |
$annotatableUuid = $cdmBase->uuid; |
|
97 |
//FIXME annotations only available as property of e.g. taxon, name, ... |
|
98 |
$annotationUrl = cdm_compose_url(CDM_WS_ANNOTATIONS, array($annotatableUuid)); |
|
99 |
|
|
100 | 95 |
$annotationProxyUrl = url('cdm_api/proxy/'. urlencode($annotationUrl).'/cdm_annotation_content'); |
101 |
|
|
96 |
|
|
102 | 97 |
$out = ' <span class="annotation">'; |
103 | 98 |
$out .= '<span class="annotation_toggle" rel="'.$annotationProxyUrl.'">+</span>'; |
104 | 99 |
|
105 |
|
|
100 |
|
|
106 | 101 |
$out .= '<div class="annotation_box"></div>'; |
107 | 102 |
$out .= '</span>'; |
103 |
} |
|
104 |
|
|
105 |
return $out; |
|
108 | 106 |
|
109 |
return $out; |
|
110 | 107 |
|
111 |
} |
|
112 | 108 |
} |
113 | 109 |
|
114 | 110 |
function theme_cdm_annotation_content($AnnotationTO){ |
... | ... | |
233 | 229 |
function theme_cdm_back_to_image_gallery_button(){ |
234 | 230 |
//$galleryLinkUri = path_to_taxon($taxon->uuid).'/images'; |
235 | 231 |
//$gallery_name = $taxon->uuid; |
236 |
//$mediaList = cdm_ws_get(CDM_WS_TAXON_MEDIA, array($taxon->uuid, $prefMimeTypeRegex, $prefMediaQuality)); |
|
232 |
//$mediaList = cdm_ws_get(CDM_WS_PORTAL_TAXON_MEDIA, array($taxon->uuid, $prefMimeTypeRegex, $prefMediaQuality));
|
|
237 | 233 |
|
238 | 234 |
$out = '<div id="backToGalleryButton">'.l(t('Back to Images'), $_SESSION['cdm']['last_gallery'] ).'</div>'; |
239 | 235 |
|
Also available in: Unified diff
improved general render mechanism + footnotes