Project

General

Profile

« Previous | Next » 

Revision e70c228f

Added by Francisco Revilla about 14 years ago

changes for the geoservices and ticket #1421

View differences:

modules/cdm_dataportal/cdm_dataportal.module
1230 1230
  
1231 1231
  //generating the returned object
1232 1232
  $taxon_name_page->title = theme('cdm_name_page_title', $taxon_name);
1233
  $taxon_name_page->content = theme_cdm_list_of_taxa($taxon_pager->records, false);
1233
  if($taxon_pager->records){
1234
    $taxon_name_page->content = theme_cdm_list_of_taxa($taxon_pager->records, false);
1235
  }else{
1236
    $taxon_name_page->content = 'This name has no taxa';
1237
  }
1234 1238

  
1235 1239
  return $taxon_name_page; 
1236 1240
}
modules/cdm_dataportal/theme/cdm_dataportal.descriptions.theme
170 170
          , NULL, NULL, FALSE ,TRUE);
171 171
*/  
172 172
  if ($source->nameUsedInSource->uuid){ //do a link to name page
173
    $name_used_in_source_text_to_show = l('(name used in source: '.$source->nameUsedInSource->titleCache . ')',
173
    $name_used_in_source_link_to_show = l($source->nameUsedInSource->titleCache,
174 174
                                           path_to_name($source->nameUsedInSource->uuid), 
175 175
                                           array(),
176 176
                                           NULL, NULL, FALSE ,TRUE);
177 177
   
178 178
  }else if (strlen($source->nameUsedInSource->originalNameString) > 0){ //show a text without link
179
  	$name_used_in_source_text_to_show = "  (name used in source: " . 
180
  	                                    $source->nameUsedInSource->originalNameString . ")";
179
  	$name_used_in_source_link_to_show = $source->nameUsedInSource->originalNameString;
181 180
  }
182 181
  /*
183 182
  if (strlen($name_used_in_source) > 0){
......
186 185
  */
187 186
  
188 187
  if ($asListElement){
189
    $res_text = '<li class="descriptionText">' . $description . $sourceRefs .
190
                ' ' . $name_used_in_source_text_to_show . '</li>';
188
    $res_text = '<li class="descriptionText">' 
189
      . $name_used_in_source_link_to_show . ': ' . $description . $sourceRefs . '</li>';
191 190
  }else{
192
    $res_text = $description . $sourceRefs . $name_used_in_source_text_to_show;
191
    $res_text = $description . $sourceRefs . ' (name in source: '. $name_used_in_source_link_to_show . ')';
193 192
  }
194 193
  return $res_text;
195 194
}
......
282 281

  
283 282

  
284 283
function theme_cdm_DescriptionElementSource($descriptionElementSource, $doLink = TRUE){
285
  
284

  
286 285
    //ev. delegate to theme_cdm_ReferencedEntityBase
287 286
    $out = '';
288 287
    if($descriptionElementSource->citation){
......
341 340

  
342 341
		if(variable_get('cdm_dataportal_map_openlayers', 1)){
343 342
			// embed into openlayers viewer
344
			$server = 'http://edit.csic.es/v1/areas.php';
343
			//$server = 'http://edit.csic.es/v1/areas.php';
344
			$server = 'http://edit.africamuseum.be/edit_wp5/v1/areas.php';
345 345
			$query_string .= '&img=false&legend=1&mlp=3';
346 346
			$map_tdwg_Uri = url($server. '?' .$map_data_parameters->String, $query_string);
347 347
			$legend_url_font_size = variable_get('cdm_dataportal_geoservice_legend_font_size', 10);
......
365 365
					//$splittedLegendSldUrl = explode("http://edit.csic.es/v1/sld/", $responseObj->legend);
366 366
					//$tdwg_sldLegend = $splittedLegendSldUrl[1];
367 367
					$sldLegend=$responseObj->legend;
368
					$legend_url  ="http://edit.csic.es/geoserver/wms/GetLegendGraphic?SERVICE=WMS&VERSION=1.1.1&format=image".urlencode('/')."png&TRANSPARENT=TRUE";
368
					//$legend_url  ="http://edit.csic.es/geoserver/wms/GetLegendGraphic?SERVICE=WMS&VERSION=1.1.1&format=image".urlencode('/')."png&TRANSPARENT=TRUE";
369
					$legend_url  ="http://193.190.223.46:8080/geoserver/wms/GetLegendGraphic?SERVICE=WMS&VERSION=1.1.1&format=image".urlencode('/')."png&TRANSPARENT=TRUE";
369 370
					$legend_url .= "&WIDTH=".$legend_url_icon_width."&HEIGHT=".$legend_url_icon_height."&";
370 371
					$legend_url .="layer=topp".urlencode(':')."tdwg_level_4&LEGEND_OPTIONS=forceLabels".urlencode(':')."on;fontStyle".urlencode(':').$legend_url_font_style.";fontSize".urlencode(':').$legend_url_font_size."&SLD=".urlencode($sldLegend);
371 372
				}
372 373
				$layerSlds = $responseObj->layers;
373 374
				foreach($layerSlds as $layer){
374
					$tdwg_sldUris[$layer->tdwg] = "http://edit.csic.es/v1/sld/".$layer->sld;
375
					//$tdwg_sldUris[$layer->tdwg] = "http://edit.csic.es/v1/sld/".$layer->sld;
376
					//$tdwg_sldUris[$layer->tdwg] = "http://edit.africamuseum.be/edit_wp5/v1/sld/wms".$layer->sld;
377
					$tdwg_sldUris[$layer->tdwg] = $layer->sld;
375 378
					//#print($tdwg_sldUris[$layer->tdwg].'<br>');
376 379
				}
377 380
			}
......
415 418
 
416 419
 var tdwg_1 = new OpenLayers.Layer.WMS.Untiled( 
417 420
    "tdwg level 1", 
418
    "http://edit.csic.es/geoserver/wms",
421
    "http://193.190.223.46:8080/geoserver/wms/",
419 422
    {layers:"topp:tdwg_level_1",transparent:"true", format:"image/png"},
420 423
    layerOptions
421 424
  );
422 425
  
423 426
 var tdwg_2 = new OpenLayers.Layer.WMS.Untiled( 
424 427
    "tdwg level 2", 
425
    "http://edit.csic.es/geoserver/wms",
428
    "http://193.190.223.46:8080/geoserver/wms/",
426 429
    {layers:"topp:tdwg_level_2",transparent:"true", format:"image/png"},
427 430
    layerOptions
428 431
  );
429 432
  
430 433
 var tdwg_3 = new OpenLayers.Layer.WMS.Untiled( 
431 434
    "tdwg level 3", 
432
    "http://edit.csic.es/geoserver/wms",
435
    "http://193.190.223.46:8080/geoserver/wms/",
433 436
    {layers:"topp:tdwg_level_3", transparent:"true", format:"image/png"},
434 437
    layerOptions
435 438
  );
436 439
  
437 440
  var tdwg_4 = new OpenLayers.Layer.WMS.Untiled( 
438 441
    "tdwg level 4", 
439
    "http://edit.csic.es/geoserver/wms",
442
    "http://193.190.223.46:8080/geoserver/wms/",
440 443
    {layers:"topp:tdwg_level_4",transparent:"true", format:"image/png"},
441 444
    layerOptions
442 445
  );
......
499 502
			// simple image
500 503
			$mapStaticCaption = '&mc_s=Georgia,15,blue&mc=' . variable_get('cdm_dataportal_geoservice_map_caption', '');
501 504
			$query_string .= '&img=true&legend=1&mlp=3' . $mapStaticCaption . '&recalculate=false';
502
			$mapUri = url($server. '?' .$map_data_parameters->String, $query_string);
505
			//$query_string .= '&img=true&legend=1&mlp=3' . $mapStaticCaption;
506
			$mapUri = url($server. '/areas.php?' .$map_data_parameters->String, $query_string);
503 507
			$out .= '<img class="distribution_map" src="' . $mapUri . '" alt="Distribution Map" />';
504 508
		}
505 509
		/*
modules/cdm_dataportal/theme/cdm_dataportal.name.theme
74 74

  
75 75
			$out .= '<li class="specimenTypeDesignation">';
76 76
			$out .= '<span class="status">'.(($std->typeStatus->representation_L10n) ? $std->typeStatus->representation_L10n : t('Type')) .$typeReference.'</span>: '.$std->typeSpecimen->titleCache;
77
			//$out .= '<span class="status">'.(($std->typeStatus->representation_L10n) ? $std->typeStatus->representation_L10n : t('Type')) .$typeReference.'</span>: '.$std->typeSpecimen->titleCache . ' footnote: '. theme_cdm_footnote($std->typeSpecimen->collection->code, $std->typeSpecimen->collection->titleCache);
78
  
79
			//var_dump($std->typeSpecimen->collection);
80
			
77 81
			$out .= theme('cdm_specimen', $std->typeSpecimen);
78 82
			$out .= '</li>';
79 83
		}
modules/cdm_dataportal/theme/cdm_dataportal.taxon.theme
227 227
		$referenceUri = url(path_to_reference($taxon->name->nomenclaturalReference->uuid));
228 228
	}
229 229
	$nameHtml = theme('cdm_taxonName', $taxon->name, $taxonUri, $referenceUri);
230
	
231
	//later homonym or trated as later homonym
232
	$taxon_name_relations = cdm_ws_get(CDM_WS_PORTAL_TAXON_NAMERELATIONS, $taxon->uuid);
233
	switch ($taxon_name_relations[0]->type->representation_L10n){
234
		case 'later homonym for':
235
			$later_homonym = ' [non ' . $taxon_name_relations[0]->fromName->titleCache . ']';
236
			break;
237
		case 'treated as later homonym for':
238
			$later_homonym = ' [non ' . $taxon_name_relations[0]->fromName->titleCache . ']';
239
      break;
240
	}
230 241

  
231
	$out = '<span class="relation_sign">'.$relsign.'</span>'.$name_prefix . $nameHtml . $name_postfix;
242
	$out = '<span class="relation_sign">'.$relsign.'</span>'.$name_prefix . $nameHtml . $name_postfix . $later_homonym;
243
	
244
  //var_dump($taxon_name_relations[0]->type->representation_L10n);  
232 245
	
233 246
	return uuid_anchor($taxon->uuid, $out);
234

  
235 247
}
236 248

  
237 249

  
238

  
239

  
240 250
/**
241 251
 */
242 252
function theme_cdm_taxon_list_thumbnails($taxon){

Also available in: Unified diff