Revision 74b5b8a3
Added by Alex Theys almost 12 years ago
5.x/themes/palmweb_2/template.php | ||
---|---|---|
333 | 333 |
//Bibluiography theming function |
334 | 334 |
function theme_cdm_descriptionElementBibliography($descriptionElementsBibliogragphy) { |
335 | 335 |
$listOfReferences = array(); |
336 |
foreach ($descriptionElementsBibliogragphy as $descriptionElementsBiblio) { |
|
336 |
//$useDescriptions = cdm_ws_get() |
|
337 |
$markerTypes['markerTypes'] = UUID_MARKERTYPE_USE; |
|
338 |
$useDescriptions = cdm_ws_get(CDM_WS_PORTAL_TAXON_DESCRIPTIONS, substr(strrchr($_GET["q"], '/'), 1), queryString($markerTypes)); |
|
339 |
//= substr(strrchr($_GET["q"], '/'), 1); |
|
340 |
//$descout = print_r($useDescriptions); |
|
341 |
foreach ($descriptionElementsBibliogragphy as $descriptionElementsBiblio) { |
|
337 | 342 |
foreach ($descriptionElementsBiblio as $descriptionElementBiblio) { |
338 | 343 |
if(is_array($descriptionElementBiblio->sources)){ |
339 | 344 |
foreach($descriptionElementBiblio->sources as $source){ |
... | ... | |
358 | 363 |
} |
359 | 364 |
|
360 | 365 |
} |
366 |
foreach($useDescriptions as $useDescription) { |
|
367 |
if (is_array($useDescription->sources)) { |
|
368 |
foreach ($useDescription->sources as $source) { |
|
369 |
$isAlreadySelected = false; |
|
370 |
if(empty($listOfReferences)) { |
|
371 |
$listOfReferences[] = $source; |
|
372 |
} |
|
373 |
else { |
|
374 |
foreach ($listOfReferences as $selectedReference) { |
|
375 |
if ($selectedReference->citation->uuid == $source->citation->uuid) { |
|
376 |
$isAlreadySelected = true; |
|
377 |
} |
|
378 |
} |
|
379 |
if (!$isAlreadySelected) { |
|
380 |
$listOfReferences[] = $source; |
|
381 |
} |
|
382 |
} |
|
383 |
} |
|
384 |
} |
|
385 |
} |
|
386 |
|
|
361 | 387 |
//Call the reference formatting function, it will do the heavy lifting |
362 | 388 |
$out = formatReference_for_Bibliogrpahy($listOfReferences); |
363 | 389 |
return $out; |
Also available in: Unified diff
AT: Committing Uses dataportal interface changes