Revision ec6065fa
Added by Andreas Kohlbecker about 3 years ago
modules/cdm_dataportal/includes/occurrences_new.inc | ||
---|---|---|
90 | 90 |
], |
91 | 91 |
'div-container' => [ |
92 | 92 |
'root-item-and-sub-tree' => [ |
93 |
markup_to_render_array('<div class="unit-header"><div class="unit-label">' . $sob_dto->label . '</div></div>'
|
|
93 |
markup_to_render_array(derived_units_tree_node_header($sob_dto)
|
|
94 | 94 |
. '<div class="unit-content-wrapper">' // allows to apply the borders between .derived-unit-tree-root and .unit-content |
95 | 95 |
. '<div class="unit-content">' . drupal_render($field_unit_dto_render_array) . '</div>' |
96 | 96 |
. '</div>'), |
... | ... | |
149 | 149 |
// data" element of the array is used as the contents of the list item |
150 | 150 |
$item['data'] = []; |
151 | 151 |
$units_render_array = compose_cdm_specimen_or_observation_dto_details_grid($sob_dto); |
152 |
$item['data'] = '<div class="unit-header"><div class="unit-label">' . $sob_dto->label . '</div></div>'
|
|
152 |
$item['data'] = derived_units_tree_node_header($sob_dto)
|
|
153 | 153 |
. '<div class="unit-content">' . drupal_render($units_render_array) . '</div>'; |
154 | 154 |
if (isset($sob_dto->derivatives) && sizeof($sob_dto->derivatives) > 0) { |
155 | 155 |
usort($sob_dto->derivatives, 'compare_specimen_or_observation_dtos'); |
... | ... | |
162 | 162 |
return $list_items; |
163 | 163 |
} |
164 | 164 |
|
165 |
/** |
|
166 |
* @param $sob_dto |
|
167 |
* |
|
168 |
* @return string |
|
169 |
*/ |
|
170 |
function derived_units_tree_node_header($sob_dto) { |
|
171 |
$link = cdm_internal_link(path_to_specimen($sob_dto->uuid), null); |
|
172 |
return '<div class="unit-header"><div class="unit-label">' . $sob_dto->label . '<span class="page-link">' . $link . '</span></div></div>'; |
|
173 |
} |
|
174 |
|
|
165 | 175 |
/** |
166 | 176 |
* Compose grid of details tabled for a CDM SpecimenOrObservationDTO |
167 | 177 |
* |
Also available in: Unified diff
ref #7599 ref #6866 specimen details tables - derivation tree nodes with links to specimen page