Revision 8983be45
Added by Andreas Kohlbecker over 12 years ago
modules/cdm_dataportal/theme/cdm_dataportal.taxon.theme | ||
---|---|---|
106 | 106 |
$joinedAuthorTeams[$authorteam] = 'sensu '.theme('cdm_reference', $taxonRelation->fromTaxon->sec); |
107 | 107 |
} |
108 | 108 |
|
109 |
} |
|
110 |
} else { |
|
111 |
$taxonRelationshipsLines[] = theme('cdm_related_taxon',$taxonRelation->fromTaxon, $taxonRelation->type->uuid, $taxonRelation->type->representation_L10n_abbreviatedLabel); |
|
112 |
} |
|
109 |
} else { |
|
110 |
// all relationsship types but misapplied_name_for invalid_designation_for |
|
111 |
$taxonRelationshipsLines[] = theme('cdm_related_taxon',$taxonRelation->fromTaxon, $taxonRelation->type->uuid, $taxonRelation->type->representation_L10n_abbreviatedLabel); |
|
112 |
} |
|
113 |
} |
|
113 | 114 |
} |
114 | 115 |
|
115 | 116 |
// sort the joinedAuthorTeams and create footnotes and footnotekeys |
... | ... | |
120 | 121 |
} |
121 | 122 |
|
122 | 123 |
// generate output |
123 |
$out = '<ul class="misapplied">'; |
|
124 |
|
|
125 |
foreach($misapplied as $misapplied_name){ |
|
124 |
if(is_array($misapplied) && count($misapplied) >0 ){ |
|
125 |
$out .= '<ul class="misapplied">'; |
|
126 |
foreach($misapplied as $misapplied_name){ |
|
127 |
|
|
128 |
$out .= '<li class="synonym">'.$misapplied_name['out'] . " "; |
|
129 |
if(isset($misapplied_name['authorteam'])){ |
|
130 |
// fill authors with the renderedFootnoteKey and sorting 'em |
|
131 |
foreach($misapplied_name['authorteam'] as $authorteam=>&$renderedFootnoteKey) { |
|
132 |
$renderedFootnoteKey = $joinedAuthorTeams[$authorteam]; |
|
133 |
} |
|
134 |
ksort($misapplied_name['authorteam']); |
|
135 |
$out .= join('; ', $misapplied_name['authorteam']); |
|
136 |
} |
|
137 |
$out .= '</li>'; |
|
126 | 138 |
|
127 |
$out .= '<li class="synonym">'.$misapplied_name['out'] . " "; |
|
128 |
if(isset($misapplied_name['authorteam'])){ |
|
129 |
// fill authors with the renderedFootnoteKey and sorting 'em |
|
130 |
foreach($misapplied_name['authorteam'] as $authorteam=>&$renderedFootnoteKey) { |
|
131 |
$renderedFootnoteKey = $joinedAuthorTeams[$authorteam]; |
|
132 |
} |
|
133 |
ksort($misapplied_name['authorteam']); |
|
134 |
$out .= join('; ', $misapplied_name['authorteam']); |
|
135 |
} |
|
136 |
$out .= '</li>'; |
|
139 |
} |
|
140 |
$out .= '</ul>'; |
|
141 |
} |
|
137 | 142 |
|
143 |
if(is_array($taxonRelationshipsLines) && count($taxonRelationshipsLines) >0 ){ |
|
144 |
$out .= '<ul class="taxonRelationships">'; |
|
145 |
foreach($taxonRelationshipsLines as $taxonRelationshipLine){ |
|
146 |
$out .= '<li class="synonym">'. $taxonRelationshipLine . '</li>'; |
|
147 |
} |
|
148 |
$out .= '</ul>'; |
|
138 | 149 |
} |
139 |
$out .= '</ul>'; |
|
150 |
|
|
140 | 151 |
|
141 | 152 |
$tr_footnotes = theme('cdm_footnotes', $footnoteListKey, 'li'); |
142 | 153 |
$tr_footnotes_exploded = explode('sensu', $tr_footnotes); |
... | ... | |
150 | 161 |
return $out; |
151 | 162 |
} |
152 | 163 |
|
164 |
|
|
165 |
|
|
153 | 166 |
function theme_cdm_acceptedFor(){ |
154 | 167 |
RenderHints::pushToRenderStack('acceptedFor'); |
155 | 168 |
|
... | ... | |
173 | 186 |
return $out; |
174 | 187 |
} |
175 | 188 |
|
189 |
|
|
190 |
|
|
176 | 191 |
function theme_cdm_list_of_taxa($records, $showMedia = false){ |
177 | 192 |
|
178 | 193 |
RenderHints::pushToRenderStack('list_of_taxa'); |
Also available in: Unified diff
fixing some bugs for #2609 (Implement Concept Relationships for Dataportal)