Revision 46a93d1e
Added by Andreas Kohlbecker over 3 years ago
modules/cdm_dataportal/includes/name.inc | ||
---|---|---|
929 | 929 |
$link_to_name_page = url(path_to_name($name_type_designation->typeName->uuid)); |
930 | 930 |
$out .= '<'. $element_tag .' class="' . html_class_attribute_ref($name_type_designation) . '">' . type_designation_status_label_markup($name_type_designation) ; |
931 | 931 |
|
932 |
if (!empty($name_type_designation->citation)) { |
|
932 |
if (!empty($name_type_designation->source->citation)) {
|
|
933 | 933 |
$out .= type_designation_citation_layout($name_type_designation, $separator); // TODO type_designation_citation_layout() needs most probably to be replaced |
934 | 934 |
|
935 | 935 |
} |
... | ... | |
954 | 954 |
foreach ($specimen_type_designations as $specimen_type_designation) { |
955 | 955 |
$type_citation_markup = ''; |
956 | 956 |
|
957 |
if (!empty($specimen_type_designation->citation)) { |
|
957 |
if (!empty($specimen_type_designation->source->citation)) {
|
|
958 | 958 |
|
959 |
$citation_footnote_str = cdm_reference_markup($specimen_type_designation->citation, null, false, true); |
|
960 |
$author_team = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $specimen_type_designation->citation->uuid); |
|
959 |
$citation_footnote_str = cdm_reference_markup($specimen_type_designation->source->citation, null, false, true);
|
|
960 |
$author_team = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $specimen_type_designation->source->citation->uuid);
|
|
961 | 961 |
|
962 | 962 |
if (!empty($author_team->titleCache)) { |
963 |
$year = @timePeriodToString($specimen_type_designation->citation->datePublished, true, 'YYYY'); |
|
963 |
$year = @timePeriodToString($specimen_type_designation->source->citation->datePublished, true, 'YYYY');
|
|
964 | 964 |
$authorteam_str = $author_team->titleCache . ($year ? ' ' : '') . $year; |
965 |
if ($authorteam_str == $specimen_type_designation->citation->titleCache) { |
|
965 |
if ($authorteam_str == $specimen_type_designation->source->citation->titleCache) {
|
|
966 | 966 |
$citation_footnote_str = ''; |
967 | 967 |
} |
968 | 968 |
} else { |
... | ... | |
985 | 985 |
} |
986 | 986 |
|
987 | 987 |
$type_citation_markup .= ' (' . t('designated by') . ' <span class="typeReference">' . $authorteam_str . '</span>'; |
988 |
if (!empty($specimen_type_designation->citationMicroReference)) { |
|
989 |
$type_citation_markup .= ': ' . trim($specimen_type_designation->citationMicroReference); |
|
988 |
if (!empty($specimen_type_designation->source->citationMicroReference)) {
|
|
989 |
$type_citation_markup .= ': ' . trim($specimen_type_designation->source->citationMicroReference);
|
|
990 | 990 |
} |
991 | 991 |
$type_citation_markup .= $footnote_key_markup . ')'; |
992 | 992 |
|
... | ... | |
1909 | 1909 |
*/ |
1910 | 1910 |
function type_designation_citation_layout($typeDesignation, $footnote_separator = ',') { |
1911 | 1911 |
$res = ''; |
1912 |
$citation = $typeDesignation->citation; |
|
1913 |
$pages = $typeDesignation->citationMicroReference; |
|
1912 |
$citation = $typeDesignation->source->citation;
|
|
1913 |
$pages = $typeDesignation->source->citationMicroReference;
|
|
1914 | 1914 |
if(isset($typeDesignation->typeStatus->uuid) && isset($typeDesignation->typeStatus->representation_L10n)) { |
1915 | 1915 |
if ( $typeDesignation->typeStatus->uuid == UUID_NTD_ORIGINAL_DESIGNATION || $typeDesignation->typeStatus->uuid == UUID_NTD_MONOTYPY) { |
1916 | 1916 |
$res = ' (' . $typeDesignation->typeStatus->representation_L10n . ')'; |
... | ... | |
1930 | 1930 |
|
1931 | 1931 |
// footnotes should be rendered in the parent element so we |
1932 | 1932 |
// are relying on the FootnoteListKey set there |
1933 |
$fkey_typeDesignation = FootnoteManager::addNewFootnote(RenderHints::getFootnoteListKey(), $typeDesignation->citation->titleCache);
|
|
1933 |
$fkey_typeDesignation = FootnoteManager::addNewFootnote(RenderHints::getFootnoteListKey(), $citation->titleCache); |
|
1934 | 1934 |
$res .= render_footnote_key($fkey_typeDesignation, $footnote_separator,TRUE) . ')'; |
1935 | 1935 |
} |
1936 | 1936 |
return $res; |
Also available in: Unified diff
ref #9222 adapting specimens and typedesignations to single sourced