Revision 1f5b7a24
Added by Francisco Revilla over 13 years ago
modules/cdm_dataportal/theme/cdm_dataportal.name.theme | ||
---|---|---|
51 | 51 |
$typeDesignation_footnotes = false; |
52 | 52 |
$is_lectotype = false; |
53 | 53 |
$specimenTypeDesignations = array(); |
54 |
$separator = ','; |
|
54 | 55 |
foreach($typeDesignations as $typeDesignation){ |
55 | 56 |
if($typeDesignation->class == 'SpecimenTypeDesignation'){ |
56 | 57 |
// SpecimenTypeDesignations should be ordered. collect theme here only |
... | ... | |
70 | 71 |
$out .= type_designation_citation_layout($typeDesignation); |
71 | 72 |
//footnotes |
72 | 73 |
$fkey_typeDesignation = FootnoteManager::addNewFootnote(RenderHints::getRenderPath() . '-typeDesignations-' . $typeDesignation->uuid, $typeDesignation->citation->titleCache); |
73 |
$out .= theme('cdm_footnote_key', $fkey_typeDesignation) . ')'; |
|
74 |
$out .= theme('cdm_footnote_key', $fkey_typeDesignation, $separator) . ')';
|
|
74 | 75 |
} |
75 | 76 |
if($typeDesignation->typeName->nomenclaturalReference){ |
76 | 77 |
$referenceUri = url(path_to_reference($typeDesignation->typeName->nomenclaturalReference->uuid)); |
... | ... | |
84 | 85 |
// sorting might be different for dataportals so this has to be parameterized |
85 | 86 |
usort($specimenTypeDesignations, "compare_specimenTypeDesignationStatus"); |
86 | 87 |
foreach($specimenTypeDesignations as $std){ |
87 |
|
|
88 | 88 |
$typeReference = ''; |
89 | 89 |
//show citation only for Lectotype or Neotype |
90 | 90 |
$showCitation = isset($std->typeStatus) && ($std->typeStatus->uuid == UUID_NEOTYPE || $std->typeStatus->uuid == UUID_LECTOTYPE); |
... | ... | |
106 | 106 |
$typeReference .= ':'. $std->citationMicroReference .')'; |
107 | 107 |
|
108 | 108 |
$_fkey2 = FootnoteManager::addNewFootnote(RenderHints::getRenderPath() . '-lectotypes', $std->citation->titleCache); |
109 |
$typeReference .= theme('cdm_footnote_key', $_fkey2); |
|
109 |
$typeReference .= theme('cdm_footnote_key', $_fkey2, $separator);
|
|
110 | 110 |
} |
111 | 111 |
|
112 | 112 |
$derivedUnitFacadeInstance = cdm_ws_get(CDM_WS_DERIVEDUNIT_FACADE, $std->typeSpecimen->uuid); |
... | ... | |
117 | 117 |
|
118 | 118 |
//footnotes for synonymy acronyms |
119 | 119 |
$_fkey = FootnoteManager::addNewFootnote(RenderHints::getRenderPath() . '-acronyms', $derivedUnitFacadeInstance->collection->titleCache); |
120 |
$out .= theme('cdm_footnote_key', $_fkey); |
|
120 |
$out .= theme('cdm_footnote_key', $_fkey, $separator);
|
|
121 | 121 |
$out .= '</li>'; |
122 | 122 |
|
123 | 123 |
if (!empty($std->citation)){ |
... | ... | |
134 | 134 |
} |
135 | 135 |
$out .= theme('cdm_footnotes', RenderHints::getRenderPath() . '-acronyms'); |
136 | 136 |
|
137 |
$out .= theme('cdm_footnotes', RenderHints::getRenderPath() . '-typeDesignations-' . $typeDesignation->uuid);
|
|
137 |
//$out .= theme('cdm_footnotes', RenderHints::getRenderPath() . '-typeDesignations-' . $typeDesignation->uuid, 'li');
|
|
138 | 138 |
|
139 | 139 |
RenderHints::popFromRenderStack(); |
140 | 140 |
return $out; |
... | ... | |
249 | 249 |
$out .= '<li class="synonym">'.theme('cdm_related_taxon',$synonym, UUID_HOMOTYPIC_SYNONYM_OF).'</li>'; |
250 | 250 |
} |
251 | 251 |
} |
252 |
$test = theme('cdm_annotation_footnotes', $footnoteListKey, 'li'); |
|
252 |
//$test = theme('cdm_annotation_footnotes', $footnoteListKey, 'li');
|
|
253 | 253 |
//tuypedesignations footnotes |
254 |
|
|
254 | 255 |
if($typeDesignations){ |
255 | 256 |
$out .= theme('cdm_typedesignations', $typeDesignations); |
256 | 257 |
|
257 | 258 |
} |
259 |
|
|
258 | 260 |
//annotation footnotes |
259 | 261 |
//$annotation_key = ( isset($homotypicalGroup[0]) ? $homotypicalGroup[0]->uuid : 'NULL'); |
260 | 262 |
//$fkey_annotations = FootnoteManager::addNewFootnote(RenderHints::getRenderPath() . '-annotations-' . $annotation_key, $annotation_key); |
261 | 263 |
//$out .= theme('cdm_footnotes', RenderHints::getRenderPath() . '-annotations-' . $annotation_key); |
262 | 264 |
$out .= theme('cdm_annotation_footnotes', $footnoteListKey, 'li'); |
265 |
//$out .= theme('cdm_annotation_footnotes', $footnoteListKey); |
|
263 | 266 |
$out .= '</ul>'; |
264 | 267 |
|
265 | 268 |
|
... | ... | |
305 | 308 |
} |
306 | 309 |
|
307 | 310 |
|
308 |
function theme_cdm_taxonName($taxonName, $nameLink = NULL, $refenceLink = NULL, $showAnnotations = true, $is_type_designation = false){
|
|
311 |
function theme_cdm_taxonName($taxonName, $nameLink = NULL, $refenceLink = NULL, $show_annotations = true, $is_type_designation = false){
|
|
309 | 312 |
|
310 | 313 |
$renderTemplate = get_nameRenderTemplate(RenderHints::getRenderPath(), $nameLink, $refenceLink); |
311 | 314 |
$partDefinition = get_partDefinition($taxonName->class); |
... | ... | |
471 | 474 |
} |
472 | 475 |
} |
473 | 476 |
$out .= '</span>'; |
474 |
|
|
475 |
$out .= theme('cdm_annotations_as_footnotekeys', $taxonName); |
|
477 |
if ($show_annotations){ |
|
478 |
$out .= theme('cdm_annotations_as_footnotekeys', $taxonName); |
|
479 |
} |
|
476 | 480 |
return $out; |
477 | 481 |
} |
478 | 482 |
|
Also available in: Unified diff
Solving layout problems with taxon and taxon_name annotations. Improving footnotes citation layout.
Related with Ticket #1964