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/cdm_api/webservice_uris.php
73 73
 */
74 74
define('CDM_WS_PORTAL_TAXON_ACCEPTED', 'portal/taxon/$0/accepted/$1');
75 75

  
76
define('CDM_WS_PORTAL_TAXON_MEDIA', 'portal/taxon/$0/media/$1/$2');
77
define('CDM_WS_PORTAL_TAXON_SUBTREE_MEDIA', 'portal/taxon/$0/subtree/media/$1/$2');
76
define('CDM_WS_PORTAL_TAXON_MEDIA', 'portal/taxon/$0/media');
77
define('CDM_WS_PORTAL_TAXON_SUBTREE_MEDIA', 'portal/taxon/$0/subtree/media');
78 78

  
79 79
/**
80 80
 *
modules/cdm_dataportal/ide/eclipse/cdm_dataportal.launch
1 1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 2
<launchConfiguration type="org.eclipse.php.debug.core.launching.webPageLaunch">
3 3
<booleanAttribute key="auto_generated_url" value="false"/>
4
<stringAttribute key="base_url" value="http://127.0.0.1/palmae/?q=cdm_dataportal/taxon/de8a2f5a-3c2c-42c9-a02f-5264d31727ae"/>
4
<stringAttribute key="base_url" value="http://127.0.0.1/cyprus/?q=cdm_dataportal/taxon/5c229bd5-c1d4-4352-b764-a6d453216995"/>
5 5
<stringAttribute key="debugOutputEncoding" value="UTF-8"/>
6 6
<stringAttribute key="debugPages" value="debugAllPages"/>
7 7
<stringAttribute key="debugTransferEncoding" value="UTF-8"/>
modules/cdm_dataportal/theme/cdm_dataportal.common.theme
347 347
}
348 348

  
349 349
function theme_cdm_back_to_image_gallery_button(){
350
	//$galleryLinkUri = path_to_taxon($taxon->uuid).'/images';
351
	//$gallery_name = $taxon->uuid;
352
	//$mediaList = cdm_ws_get(CDM_WS_PORTAL_TAXON_MEDIA, array($taxon->uuid, $prefMimeTypeRegex, $prefMediaQuality));
353 350

  
354 351
	$out = '<div id="backToGalleryButton">'.l(t('Back to Images'), $_SESSION['cdm']['last_gallery'] ).'</div>';
355 352

  
modules/cdm_dataportal/theme/cdm_dataportal.page.theme
63 63

  
64 64

  
65 65
  // --- GET Images --- //
66
  $prefMimeTypeRegex = 'image:.*';
67
  $prefMediaQuality = '*';
66

  
67
  $mediaQueryParameters = array("type"=>"ImageFile");
68

  
68 69
  $selectShowMedia = variable_get('cdm_dataportal_show_media', 0);
69 70
  if ($selectShowMedia == 0){
70
    $media = cdm_ws_get(CDM_WS_PORTAL_TAXON_MEDIA, array($taxon->uuid, $prefMimeTypeRegex, $prefMediaQuality));
71
    $media = cdm_ws_get(CDM_WS_PORTAL_TAXON_MEDIA, array($taxon->uuid), queryString($mediaQueryParameters));
71 72
  }else{
72
    $media = cdm_ws_get(CDM_WS_PORTAL_TAXON_SUBTREE_MEDIA, array($taxon->uuid, $prefMimeTypeRegex, $prefMediaQuality));
73
    $media = cdm_ws_get(CDM_WS_PORTAL_TAXON_SUBTREE_MEDIA, array($taxon->uuid), queryString($mediaQueryParameters));
73 74
  }
74 75
  if(!isset($media[0])) {
75 76
    $hideTabs[] = theme('cdm_taxonpage_tab', 'Images');
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 ,
themes/garland_cichorieae/template.php
459 459
		$captionElements = array('title', '#uri'=>t('open Image'));
460 460
	}
461 461

  
462
	$galleryLinkUri = path_to_taxon($taxon->uuid, true).'/images';
463
	$mediaList = cdm_ws_get(CDM_WS_PORTAL_TAXON_MEDIA, array($taxon->uuid, $prefMimeTypeRegex, $prefMediaQuality));
462
	$mediaQueryParameters = array("type"=>"ImageFile");
463
	$mediaList = cdm_ws_get(CDM_WS_PORTAL_TAXON_MEDIA, array($taxon->uuid), queryString($mediaQueryParameters));
464 464
	$out .= theme('cdm_media_gallerie', $mediaList, $gallery_name ,$maxExtend, $cols, $maxRows, $captionElements, 'NORMAL', $galleryLinkUri, null);
465 465

  
466 466
	return $out;

Also available in: Unified diff