301 |
301 |
$out;
|
302 |
302 |
$res_author;
|
303 |
303 |
$res_date;
|
304 |
|
|
|
304 |
|
305 |
305 |
if(is_array($element->sources)){
|
306 |
306 |
foreach($element->sources as $source){
|
307 |
307 |
$referenceCitation = theme('cdm_DescriptionElementSource', $source);
|
... | ... | |
639 |
639 |
RenderHints::pushToRenderStack('descriptionElementDistribution');
|
640 |
640 |
RenderHints::setFootnoteListKey(UUID_DISTRIBUTION);
|
641 |
641 |
//getting all the taxon description for a given taxon
|
642 |
|
$markerTypesEmpty = array();
|
|
642 |
$markerTypesEmpty = array();
|
643 |
643 |
//$markerTypesEmpty['markerTypes'] = 'af9860ff-08f5-4b4d-863c-49ae96985115';
|
644 |
644 |
$markerTypesEmpty['markerTypes'] = '';
|
645 |
645 |
$taxonDescriptions = cdm_ws_get(CDM_WS_PORTAL_TAXON_DESCRIPTIONS, $taxon_uuid, queryString($markerTypesEmpty));
|
... | ... | |
1225 |
1225 |
if ($descriptions == null) {
|
1226 |
1226 |
return;
|
1227 |
1227 |
}
|
1228 |
|
|
|
1228 |
$descriptionSynonyms;
|
|
1229 |
$descriptionOut = "";
|
|
1230 |
$synonymOut = "";
|
1229 |
1231 |
foreach($descriptions as $description) {
|
1230 |
1232 |
//$out .= print_r($description);
|
1231 |
1233 |
//$taxonName = cdm_ws_get(CDM_WS_NAME_NAMECAHE, $description->taxon->uuid);
|
1232 |
1234 |
//$out .= print_r($taxonName);
|
1233 |
1235 |
//$taxonnameName = cdm_ws_get(CDM_WS_PORTAL_NAME_NAMESBYNAME, $taxonName . ".");
|
1234 |
1236 |
$synonyms = cdm_ws_get(CDM_WS_PORTAL_TAXON_SYNONYMY,$description->taxon->uuid);
|
1235 |
|
$out .= print_r($synonyms);
|
|
1237 |
//$out .= print_r($synonyms);
|
1236 |
1238 |
//$out .= print_r($taxonnameName);
|
1237 |
|
$out .= '<li class="descriptionText DescriptionElement">';
|
|
1239 |
|
|
1240 |
//$out .= '<li class="descriptionText DescriptionElement">';
|
1238 |
1241 |
foreach ($description->sources as $source) {
|
|
1242 |
$isSynonym = false;
|
1239 |
1243 |
if($source->originalNameString) {
|
1240 |
|
$originalTaxonUsedInSource = cdm_ws_get(CDM_WS_PORTAL_NAME_NAMESBYNAME, $source->originalNameString . ".");
|
1241 |
|
$out .=print_r($originalTaxonUsedInSource);
|
1242 |
|
$name_used_in_source_link_to_show_use = l($source->originalNameString, path_to_name($originalTaxonUsedInSource->uuid),array(), NULL, NULL, FALSE ,TRUE);
|
|
1244 |
$originalTaxonUsedInSource = cdm_ws_get(CDM_WS_PORTAL_NAME_NAMESBYNAME, array($description->taxon->uuid, $source->originalNameString . "."));
|
|
1245 |
|
|
1246 |
foreach($synonyms as $heteroSynonym) {
|
|
1247 |
foreach ($heteroSynonym as $synonym)
|
|
1248 |
//$out .= print_r($synonym);
|
|
1249 |
foreach ($synonym as $toto) {
|
|
1250 |
//$out .= print_r($toto);
|
|
1251 |
//$out .= $toto->name->specificEpithet;
|
|
1252 |
//$out .= $toto->name->uuid;
|
|
1253 |
if($toto->name->uuid == $originalTaxonUsedInSource->uuid) {
|
|
1254 |
$isSynonym = true;
|
|
1255 |
//$descriptionSynonyms[] = $description;
|
|
1256 |
}
|
|
1257 |
else {
|
|
1258 |
|
|
1259 |
}
|
|
1260 |
|
|
1261 |
}
|
|
1262 |
//$out .= $synonym->name->uuid;
|
|
1263 |
|
|
1264 |
}
|
|
1265 |
if (!$isSynonym) {
|
|
1266 |
$descriptionOut .='<li class="descriptionText DescriptionElement">';
|
|
1267 |
$name_used_in_source_link_to_show_use = l($source->originalNameString, path_to_name($originalTaxonUsedInSource->uuid),array(), NULL, NULL, FALSE ,TRUE);
|
|
1268 |
|
|
1269 |
//$out .= $source->originalNameString . ': ';
|
|
1270 |
$descriptionOut .= $name_used_in_source_link_to_show_use . ': ';
|
|
1271 |
$descriptionOut .= $description->titleCache;
|
|
1272 |
foreach ($description->sources as $source) {
|
|
1273 |
if($source->originalNameString) {
|
|
1274 |
//$out = $source->originalNameString . ':' . $out;
|
|
1275 |
}
|
|
1276 |
$descriptionOut .= " (" . theme('cdm_DescriptionElementSource', $source, true) . ")";
|
|
1277 |
}
|
|
1278 |
$descriptionOut .= '<ul>';
|
|
1279 |
foreach ($description->elements as $descriptionElement) {
|
|
1280 |
$useRecordTags = explode(';', $descriptionElement->modifyingText->English->text);
|
|
1281 |
$descriptionOut .= '<li class="use_record_list">- ' . $useRecordTags[0] . '[' . $useRecordTags[1] . ']' . ' - ' . $useRecordTags[2] . ' - ' . $useRecordTags[3]. '[' .$useRecordTags[4]. ']' . ' - ' . $useRecordTags[5] . '</li>';
|
|
1282 |
}
|
|
1283 |
$descriptionOut .= '</ul></li>';
|
|
1284 |
|
|
1285 |
|
|
1286 |
}
|
|
1287 |
else {
|
|
1288 |
$synonymOut .='<li class="descriptionText DescriptionElement">';
|
|
1289 |
$name_used_in_source_link_to_show_use = l($source->originalNameString, path_to_name($originalTaxonUsedInSource->uuid),array(), NULL, NULL, FALSE ,TRUE);
|
|
1290 |
|
|
1291 |
//$out .= $source->originalNameString . ': ';
|
|
1292 |
$synonymOut .= $name_used_in_source_link_to_show_use . ': ';
|
|
1293 |
$synonymOut .= $description->titleCache;
|
|
1294 |
foreach ($description->sources as $source) {
|
|
1295 |
if($source->originalNameString) {
|
|
1296 |
//$out = $source->originalNameString . ':' . $out;
|
|
1297 |
}
|
|
1298 |
$synonymOut .= " (" . theme('cdm_DescriptionElementSource', $source, true) . ")";
|
|
1299 |
}
|
|
1300 |
$synonymOut .= '<ul>';
|
|
1301 |
foreach ($description->elements as $descriptionElement) {
|
|
1302 |
$useRecordTags = explode(';', $descriptionElement->modifyingText->English->text);
|
|
1303 |
$synonymOut .= '<li class="use_record_list">- ' . $useRecordTags[0] . '[' . $useRecordTags[1] . ']' . ' - ' . $useRecordTags[2] . ' - ' . $useRecordTags[3]. '[' .$useRecordTags[4]. ']' . ' - ' . $useRecordTags[5] . '</li>';
|
|
1304 |
}
|
|
1305 |
$synonymOut .= '</ul></li>';
|
|
1306 |
|
|
1307 |
}
|
|
1308 |
|
|
1309 |
|
|
1310 |
|
|
1311 |
//$out .=print_r($originalTaxonUsedInSource);
|
|
1312 |
//$name_used_in_source_link_to_show_use = l($source->originalNameString, path_to_name($originalTaxonUsedInSource->uuid),array(), NULL, NULL, FALSE ,TRUE);
|
1243 |
1313 |
|
1244 |
1314 |
//$out .= $source->originalNameString . ': ';
|
1245 |
|
$out .= $name_used_in_source_link_to_show_use . ': ';
|
|
1315 |
//$out .= $name_used_in_source_link_to_show_use . ': ';
|
1246 |
1316 |
}
|
1247 |
1317 |
}
|
1248 |
|
$out .= $description->titleCache;
|
1249 |
|
foreach ($description->sources as $source) {
|
1250 |
|
if($source->originalNameString) {
|
|
1318 |
//$out .= "</li>";
|
|
1319 |
//$out .= print_r($descriptionSynonyms);
|
|
1320 |
//$out .= $description->titleCache;
|
|
1321 |
//foreach ($description->sources as $source) {
|
|
1322 |
// if($source->originalNameString) {
|
1251 |
1323 |
//$out = $source->originalNameString . ':' . $out;
|
1252 |
|
}
|
1253 |
|
$out .= " (" . theme('cdm_DescriptionElementSource', $source, true) . ")";
|
1254 |
|
}
|
1255 |
|
$out .= '<ul>';
|
1256 |
|
foreach ($description->elements as $descriptionElement) {
|
1257 |
|
$useRecordTags = explode(';', $descriptionElement->modifyingText->English->text);
|
1258 |
|
$out .= '<li class="use_record_list">- ' . $useRecordTags[0] . '[' . $useRecordTags[1] . ']' . ' - ' . $useRecordTags[2] . ' - ' . $useRecordTags[3]. '[' .$useRecordTags[4]. ']' . ' - ' . $useRecordTags[5] . '</li>';
|
1259 |
|
}
|
1260 |
|
$out .= '</ul>';
|
1261 |
|
|
1262 |
|
$out .= "</li>";
|
|
1324 |
// }
|
|
1325 |
// $out .= " (" . theme('cdm_DescriptionElementSource', $source, true) . ")";
|
|
1326 |
//}
|
|
1327 |
//$out .= '<ul>';
|
|
1328 |
//foreach ($description->elements as $descriptionElement) {
|
|
1329 |
// $useRecordTags = explode(';', $descriptionElement->modifyingText->English->text);
|
|
1330 |
// $out .= '<li class="use_record_list">- ' . $useRecordTags[0] . '[' . $useRecordTags[1] . ']' . ' - ' . $useRecordTags[2] . ' - ' . $useRecordTags[3]. '[' .$useRecordTags[4]. ']' . ' - ' . $useRecordTags[5] . '</li>';
|
|
1331 |
//}
|
|
1332 |
//$out .= '</ul>';
|
|
1333 |
|
|
1334 |
//$out .= "</li>";
|
1263 |
1335 |
|
1264 |
1336 |
}
|
|
1337 |
$out .= $descriptionOut . $synonymOut;
|
|
1338 |
//$out .= "</ul></div>";
|
1265 |
1339 |
$out .= "</ul></div>";
|
1266 |
1340 |
return $out;
|
1267 |
1341 |
}
|
... | ... | |
1280 |
1354 |
if(!empty($useDescriptions)) {
|
1281 |
1355 |
//$out .= print_r($useDescriptions);
|
1282 |
1356 |
//$out .= print_r($useDescriptions);
|
1283 |
|
$out .= '<div id="block-cdm_dataportal-feature-description" class="clear-block block block-cdm_dataportal-feature"><a name="userecords"> </a><H2> Uses </H2>';
|
|
1357 |
$out .= '<div id="block-cdm_dataportal-feature-description" class="clear-block block block-cdm_dataportal-feature"><H2><a name="userecords"> </a> Uses </H2>';
|
1284 |
1358 |
$formatUseDescriptions = theme('cdm_format_Uses', $useDescriptions, $pageSize, $pageNumber);
|
1285 |
1359 |
$out .= $formatUseDescriptions;
|
1286 |
1360 |
$out .="</div>";
|
AT: Committing Uses dataportal interface changes