Revision 20b503f3
Added by Andreas Kohlbecker over 3 years ago
modules/cdm_dataportal/includes/common.inc | ||
---|---|---|
892 | 892 |
|
893 | 893 |
/** |
894 | 894 |
* Creates an icon which links to the given path |
895 |
* |
|
895 | 896 |
* @param $path |
896 | 897 |
* |
898 |
* @param string $fragment |
|
899 |
* The URL fragment to link to |
|
900 |
* @param bool $superscript |
|
901 |
* If TRUE, the Icon will be be displayed in superscript position. Default is TRUE. |
|
902 |
* |
|
897 | 903 |
* @return string |
898 | 904 |
*/ |
899 |
function icon_link($path, $fragment = '') { |
|
900 |
$iconlink = l(custom_icon_font_markup('icon-interal-link-alt-solid', ['class' => ['superscript']]), $path, ['html' => TRUE, 'fragment' => $fragment] ); |
|
901 |
return $iconlink; |
|
905 |
function icon_link($path, $fragment = '', $superscript = FALSE) { |
|
906 |
if($superscript){ |
|
907 |
$attributes = ['class' => ['superscript']]; |
|
908 |
} else { |
|
909 |
$attributes = []; |
|
910 |
} |
|
911 |
$icon_link = l(custom_icon_font_markup('icon-interal-link-alt-solid', $attributes), $path, ['html' => TRUE, 'fragment' => $fragment] ); |
|
912 |
return $icon_link; |
|
902 | 913 |
} |
modules/cdm_dataportal/includes/occurrences.inc | ||
---|---|---|
101 | 101 |
{ |
102 | 102 |
$detail_html = ""; |
103 | 103 |
//link to specimen page |
104 |
$pathToSpecimen = path_to_specimen($specimen->uuid);
|
|
104 |
$path_to_specimen = path_to_specimen($specimen->uuid);
|
|
105 | 105 |
if (!$is_specimen_page) { |
106 |
$specimenPageLink = l($specimen->specimenIdentifier, $pathToSpecimen);
|
|
106 |
$specimenPageLink = l($specimen->specimenIdentifier, $path_to_specimen);
|
|
107 | 107 |
$detail_html .= "<strong>Specimen summary: $specimenPageLink</strong><br>"; |
108 | 108 |
} |
109 | 109 |
|
... | ... | |
227 | 227 |
foreach ($specimen->characterData as $characterStatePair) { |
228 | 228 |
$detail_html .= "<i>" . $characterStatePair->first . "</i>:" . $characterStatePair->second; |
229 | 229 |
$detail_html .= "<br>"; |
230 |
}
|
|
230 |
} |
|
231 | 231 |
} else { |
232 |
$detail_html .= l("detail page", $pathToSpecimen);
|
|
232 |
$detail_html .= l("detail page", $path_to_specimen);
|
|
233 | 233 |
$detail_html .= "<br>"; |
234 | 234 |
} |
235 | 235 |
} |
... | ... | |
1363 | 1363 |
case 'preferredStableUri': |
1364 | 1364 |
@_description_list_group_add($groups, cdm_occurrence_field_name_label($field), array(array('#markup' => cdm_external_uri($value, false)))); |
1365 | 1365 |
break; |
1366 |
case 'characterData': |
|
1367 |
@_description_list_group_add($groups, cdm_occurrence_field_name_label($field), array(array('#markup' => icon_link(path_to_specimen($specimen_or_observation_dto->uuid), '', FALSE), false))); |
|
1368 |
break; |
|
1366 | 1369 |
case 'specimenTypeDesignations': |
1367 | 1370 |
@_description_list_group_add( |
1368 | 1371 |
$groups, |
Also available in: Unified diff
ref #7599 showing link for present character data