Project

General

Profile

« Previous | Next » 

Revision a40ad0d2

Added by Andreas Kohlbecker almost 13 years ago

modifications in dataportal for #2206 (modify the means to find images for the data portal)

View differences:

modules/cdm_dataportal/theme/cdm_dataportal.taxon.theme
166 166
function theme_cdm_list_of_taxa($records, $showMedia = false){
167 167

  
168 168
	RenderHints::pushToRenderStack('list_of_taxa');
169
    
169

  
170 170
	$form_name = 'search_gallery';
171 171
	//$default_values = unserialize(CDM_DATAPORTAL_GALLERY_SETTINGS);
172 172
    //$gallery_settings = variable_get($form_name, $default_values);
173
    
173

  
174 174
    $gallery_settings = getGallerySettings(CDM_DATAPORTAL_SEARCH_GALLERY_NAME);
175
    
175

  
176 176
	$showMedia_taxa = $gallery_settings['cdm_dataportal_show_taxon_thumbnails'];
177
	$showMedia_synonyms = $gallery_settings['cdm_dataportal_show_synonym_thumbnails'];	
177
	$showMedia_synonyms = $gallery_settings['cdm_dataportal_show_synonym_thumbnails'];
178 178
	//$showMedia_taxa = variable_get('cdm_dataportal_findtaxa_show_taxon_thumbnails', 1);
179 179
	//$showMedia_synonyms = variable_get('cdm_dataportal_findtaxa_show_synonym_thumbnails', 0);
180
		
180

  
181 181
	$classification_uuid = get_taxonomictree_uuid_selected();
182 182

  
183 183
	// .. well, for sure not as performant as before, but better than nothing.
......
372 372
	$gallery_name = $taxon->uuid;
373 373

  
374 374
	$showCaption = variable_get('cdm_dataportal_findtaxa_show_thumbnail_captions', 1);
375
	$prefMimeTypeRegex = 'image:.*';
376
	$prefMediaQuality = '*';
377 375

  
378 376
	$gallery_settings = getGallerySettings(CDM_DATAPORTAL_SEARCH_GALLERY_NAME);
379 377
    $showCaption = $gallery_settings['cdm_dataportal_show_thumbnail_captions'];
......
381 379
		//$captionElements = array('title', '#uri'=>t('open Image'));
382 380
		$captionElements = array('title', 'rights');
383 381
	}
384

  
382
 	$mediaQueryParameters = array("type"=>"ImageFile");
385 383
	$galleryLinkUri = path_to_taxon($taxon->uuid).'/images';
386 384
	$selectShowMedia = variable_get('cdm_dataportal_show_media', 0);
387 385
	if ($selectShowMedia == 0){
388
		$mediaList = cdm_ws_get(CDM_WS_PORTAL_TAXON_MEDIA, array($taxon->uuid, $prefMimeTypeRegex, $prefMediaQuality));
386
		$mediaList = cdm_ws_get(CDM_WS_PORTAL_TAXON_MEDIA, array($taxon->uuid), queryString( $mediaQueryParameters ));
389 387
	}else{
390
		$mediaList = cdm_ws_get(CDM_WS_PORTAL_TAXON_SUBTREE_MEDIA, array($taxon->uuid, $prefMimeTypeRegex, $prefMediaQuality));
388
		$mediaList = cdm_ws_get(CDM_WS_PORTAL_TAXON_SUBTREE_MEDIA, array($taxon->uuid), queryString( $mediaQueryParameters ));
391 389
	}
392 390
	//$mediaList = cdm_ws_get(CDM_WS_PORTAL_TAXONOMY_MEDIA, array(variable_get('cdm_taxonomictree_uuid', false), $taxon ->rank, $taxon->uuid ));
393 391
	$out .= theme('cdm_media_gallerie', $mediaList, $gallery_name ,

Also available in: Unified diff