Revision b0adfd32
Added by Andreas Kohlbecker almost 8 years ago
modules/cdm_dataportal/includes/pages.inc | ||
---|---|---|
956 | 956 |
*/ |
957 | 957 |
function compose_classification_breadcrumbs($taxon_uuid) { |
958 | 958 |
|
959 |
_add_js_taxonomic_children('#classification-breadcrumbs .taxonomic-children'); |
|
959 |
_add_js_taxonomic_children('#classification-breadcrumbs .taxonomic-children-button');
|
|
960 | 960 |
|
961 | 961 |
$render_array = array(); |
962 | 962 |
if(!is_uuid($taxon_uuid)){ |
... | ... | |
973 | 973 |
$items = array(); |
974 | 974 |
$parent_taxon_nodes = cdm_ws_taxonomy_pathFromRoot($taxon_uuid); |
975 | 975 |
|
976 |
// remove the current taxon from the list |
|
977 |
array_pop($parent_taxon_nodes); |
|
978 |
|
|
979 | 976 |
foreach ($parent_taxon_nodes as $node){ |
980 | 977 |
|
981 | 978 |
$is_first_item = count($items) == 0; |
982 | 979 |
$node_name = cdm_dataportal_shortname_of($node); |
983 | 980 |
$path = path_to_taxon($node->taxonUuid); |
984 | 981 |
|
985 |
$items[] = ($is_first_item ? '': ' ' . '<span class="taxonomic-children" data-cdm-taxon-uuid="'. $node->taxonUuid. '" > > </span>' . ' ') |
|
986 |
. l($node_name, $path); |
|
982 |
$children_indicator = ''; |
|
983 |
if($node->taxonomicChildrenCount){ |
|
984 |
$children_indicator = '<span class="taxonomic-children-button" data-cdm-taxon-uuid="'. $node->taxonUuid. '" > ' |
|
985 |
. font_awesome_icon_markup('fa-chevron-right') |
|
986 |
. ' </span>'; |
|
987 |
} |
|
988 |
|
|
989 |
$items[] = |
|
990 |
($is_first_item ? '': ' ') |
|
991 |
. l($node_name, $path) |
|
992 |
. $children_indicator; |
|
987 | 993 |
} |
994 |
|
|
995 |
|
|
988 | 996 |
$render_array['#items'] = $items; |
989 | 997 |
|
990 | 998 |
return $render_array; |
Also available in: Unified diff
#5790 classification breadcrumb children implemented