193 |
193 |
// $table_of_accepted = cdm_ws_property(CDM_WS_PORTAL_TAXON_ACCEPTED, join(',', $synonym_uuids));
|
194 |
194 |
// thus ...
|
195 |
195 |
$table_of_accepted = array();
|
196 |
|
|
|
196 |
|
197 |
197 |
foreach($synonym_uuids as $synUuid){
|
198 |
198 |
$table_of_accepted[$synUuid] = cdm_ws_get(CDM_WS_PORTAL_TAXON_ACCEPTED, array($synUuid, $classification_uuid));
|
199 |
199 |
}
|
... | ... | |
203 |
203 |
foreach($records as $taxon){
|
204 |
204 |
// its a Taxon
|
205 |
205 |
if($taxon->class == "Taxon"){
|
206 |
|
$taxonUri = url(path_to_taxon($taxon->uuid));
|
|
206 |
$taxonUri = url(path_to_taxon($taxon->uuid));
|
207 |
207 |
if(isset($taxon->name->nomenclaturalReference)){
|
208 |
208 |
$referenceUri = url(path_to_reference($taxon->name->nomenclaturalReference->uuid));
|
209 |
209 |
}
|
... | ... | |
278 |
278 |
default :
|
279 |
279 |
$relsign = $relsign_invalid;
|
280 |
280 |
}
|
281 |
|
|
282 |
|
$status = $taxon->name->status[0]->type->representation_L10n;
|
283 |
|
//if ($status == 'Invalid' || $status == 'Nudum'){
|
284 |
|
if (sizeof($status) > 0){
|
285 |
|
if ($status == 'Invalid' || $status == 'Nudum'){
|
286 |
|
$relsign = $relsign_invalid;
|
|
281 |
/*
|
|
282 |
* names with status invalid or nudum are to be displayed with the $relsign_invalid,
|
|
283 |
* these names appear at the end of all names in their homotypic group
|
|
284 |
* (ordered correctly by the java cdm_lib)
|
|
285 |
*/
|
|
286 |
if ( is_array($taxon->name->status)) {
|
|
287 |
foreach($taxon->name->status as $status){
|
|
288 |
if ($status->type->uuid == UUID_NOMENCLATURALSTATUS_TYPE_INVALID || $status->type->uuid == UUID_NOMENCLATURALSTATUS_TYPE_NUDUM){
|
|
289 |
$relsign = $relsign_invalid;
|
|
290 |
}
|
287 |
291 |
}
|
288 |
|
$status = ', ' . $taxon->name->status[0]->type->representation_L10n_abbreviated;
|
289 |
|
//var_dump('&mdash' . $taxon->name->status[0]->type->representation_L10n_abbreviated);
|
290 |
292 |
}
|
291 |
293 |
|
|
294 |
// now rendering starts ..
|
|
295 |
|
292 |
296 |
RenderHints::pushToRenderStack('related_taxon');
|
293 |
297 |
|
294 |
298 |
//$taxonUri = url(path_to_taxon($taxon->uuid));
|
... | ... | |
303 |
307 |
$nameHtml .= theme('cdm_annotations_as_footnotekeys', $special_annotations_array);
|
304 |
308 |
|
305 |
309 |
//later homonym or trated as later homonym AND bloking names
|
306 |
|
$from_name_rels = cdm_ws_get(CDM_WS_PORTAL_TAXON_FROM_NAMERELATIONS, $taxon->uuid);
|
307 |
|
$to_name_rels = cdm_ws_get(CDM_WS_PORTAL_TAXON_TO_NAMERELATIONS, $taxon->uuid);
|
|
310 |
$from_name_relations = cdm_ws_get(CDM_WS_PORTAL_TAXON_FROM_NAMERELATIONS, $taxon->uuid);
|
|
311 |
$to_name_relations = cdm_ws_get(CDM_WS_PORTAL_TAXON_TO_NAMERELATIONS, $taxon->uuid);
|
308 |
312 |
//first the FROM RELS
|
309 |
|
if ($from_name_rels){
|
310 |
|
foreach($from_name_rels as $element){
|
|
313 |
if ($from_name_relations){
|
|
314 |
foreach($from_name_relations as $element){
|
311 |
315 |
switch ($element->type->representation_L10n){
|
312 |
316 |
case 'later homonym for':
|
313 |
|
if(isset($rels_out)){
|
314 |
|
$rels_out .= ' nec ' . l($element->toName->titleCache . ' ' . substr($element->toName->nomenclaturalReference->datePublished->start, 0, 4),
|
|
317 |
if(isset($name_relations_html)){
|
|
318 |
$name_relations_html .= ' nec ' . l($element->toName->titleCache . ' ' . substr($element->toName->nomenclaturalReference->datePublished->start, 0, 4),
|
315 |
319 |
'cdm_dataportal/name/' . $element->toName->uuid . '/' . $taxon->uuid . '/' . $element->toName->taxonBases[0]->uuid);
|
316 |
320 |
}else{
|
317 |
|
$rels_out = ' non ' . l($element->toName->titleCache . ' ' . substr($element->toName->nomenclaturalReference->datePublished->start, 0, 4),
|
|
321 |
$name_relations_html = ' non ' . l($element->toName->titleCache . ' ' . substr($element->toName->nomenclaturalReference->datePublished->start, 0, 4),
|
318 |
322 |
'cdm_dataportal/name/' . $element->toName->uuid . '/' . $taxon->uuid . '/' . $element->toName->taxonBases[0]->uuid)
|
319 |
323 |
. ' ' . $element->toName->datePublished->start;
|
320 |
324 |
}
|
321 |
325 |
break;
|
322 |
326 |
case 'treated as later homonym for':
|
323 |
|
if(isset($rels_out)){
|
324 |
|
$rels_out = ' nec ' . l($element->toName->titleCache . ' ' . substr($element->toName->nomenclaturalReference->datePublished->start, 0, 4),
|
|
327 |
if(isset($name_relations_html)){
|
|
328 |
$name_relations_html = ' nec ' . l($element->toName->titleCache . ' ' . substr($element->toName->nomenclaturalReference->datePublished->start, 0, 4),
|
325 |
329 |
'cdm_dataportal/name/' . $element->toName->uuid);
|
326 |
330 |
}else{
|
327 |
|
$rels_out = ' non ' . l($element->toName->titleCache . ' ' . substr($element->toName->nomenclaturalReference->datePublished->start, 0, 4),
|
|
331 |
$name_relations_html = ' non ' . l($element->toName->titleCache . ' ' . substr($element->toName->nomenclaturalReference->datePublished->start, 0, 4),
|
328 |
332 |
'cdm_dataportal/name/' . $element->toName->uuid);
|
329 |
333 |
}
|
330 |
334 |
break;
|
331 |
335 |
}
|
332 |
336 |
}
|
333 |
337 |
//second the TO RELS
|
334 |
|
if ($to_name_rels){
|
335 |
|
foreach($to_name_rels as $element){
|
|
338 |
if ($to_name_relations){
|
|
339 |
foreach($to_name_relations as $element){
|
336 |
340 |
switch ($element->type->representation_L10n){
|
337 |
341 |
case 'blocking name for':
|
338 |
|
if(isset($rels_out) ){
|
339 |
|
$rels_out .= ' nec ' . l($element->fromName->titleCache . ' ' . substr($element->fromName->nomenclaturalReference->datePublished->start, 0, 4),
|
|
342 |
if(isset($name_relations_html) ){
|
|
343 |
$name_relations_html .= ' nec ' . l($element->fromName->titleCache . ' ' . substr($element->fromName->nomenclaturalReference->datePublished->start, 0, 4),
|
340 |
344 |
'cdm_dataportal/name/' . $element->fromName->uuid . '/' . $taxon->uuid . '/' . $element->fromName->taxonBases[0]->uuid);
|
341 |
345 |
}else{
|
342 |
|
$rels_out = ' non ' . l($element->fromName->titleCache . ' ' . substr($element->fromName->nomenclaturalReference->datePublished->start, 0, 4),
|
|
346 |
$name_relations_html = ' non ' . l($element->fromName->titleCache . ' ' . substr($element->fromName->nomenclaturalReference->datePublished->start, 0, 4),
|
343 |
347 |
'cdm_dataportal/name/' . $element->fromName->uuid . '/' . $taxon->uuid . '/' . $element->fromName->taxonBases[0]->uuid)
|
344 |
348 |
. ' ' . $element->fromName->datePublished->start;
|
345 |
349 |
}
|
... | ... | |
348 |
352 |
}
|
349 |
353 |
}
|
350 |
354 |
//rels output
|
351 |
|
if(isset($rels_out)){
|
352 |
|
$rels_out = '['. $rels_out .']';
|
|
355 |
if(isset($name_relations_html)){
|
|
356 |
$name_relations_html = '['. $name_relations_html .']';
|
353 |
357 |
}
|
354 |
358 |
}
|
355 |
359 |
//geneal output
|
356 |
|
$out = '<span class="relation_sign">'.$relsign.'</span>'.$name_prefix . $nameHtml . $name_postfix . $rels_out . $status;
|
|
360 |
$out = '<span class="relation_sign">'.$relsign.'</span>'.$name_prefix . $nameHtml . $name_postfix . $name_relations_html;
|
357 |
361 |
$out = uuid_anchor($taxon->uuid, $out);
|
358 |
362 |
|
359 |
363 |
RenderHints::popFromRenderStack();
|
fixing status rendering