Revision 30845bda
Added by Andreas Kohlbecker almost 8 years ago
modules/cdm_dataportal/includes/pages.inc | ||
---|---|---|
197 | 197 |
if($derivateHierarchy->preservedSpecimenDTOs){ |
198 | 198 |
foreach($derivateHierarchy->preservedSpecimenDTOs as $preservedSpecimenDTO) { |
199 | 199 |
$detail_html .= "<br>"; |
200 |
$detail_html .= compose_cdm_specimen_page_html($preservedSpecimenDTO);
|
|
200 |
$detail_html .= render_cdm_specimen_page($preservedSpecimenDTO);
|
|
201 | 201 |
} |
202 | 202 |
} |
203 | 203 |
$detail_html .= "<br>"; |
... | ... | |
1049 | 1049 |
|
1050 | 1050 |
} |
1051 | 1051 |
|
1052 |
$render_array['#items'] = $items; |
|
1052 | 1053 |
|
1054 |
return $render_array; |
|
1055 |
} |
|
1053 | 1056 |
|
1054 |
$render_array['#items'] = $items; |
|
1057 |
/** |
|
1058 |
* @param $specimen_uuid |
|
1059 |
* @return array |
|
1060 |
* The drupal render array for the page |
|
1061 |
* |
|
1062 |
* @ingroup compose |
|
1063 |
*/ |
|
1064 |
function compose_cdm_specimen_page($specimen_uuid) |
|
1065 |
{ |
|
1066 |
drupal_set_title("Specimen Details"); |
|
1067 |
$specimen = cdm_ws_get(CDM_WS_PORTAL_OCCURRENCE, array($specimen_uuid, 'specimenDerivates')); |
|
1068 |
|
|
1069 |
$render_array = array(); |
|
1070 |
RenderHints::pushToRenderStack('specimen_page'); |
|
1055 | 1071 |
|
1072 |
$detail_html = render_cdm_specimen_page($specimen, true); |
|
1073 |
$render_array['specimen_html'] = array( |
|
1074 |
'#markup' => $detail_html |
|
1075 |
); |
|
1076 |
|
|
1077 |
RenderHints::popFromRenderStack(); |
|
1056 | 1078 |
return $render_array; |
1079 |
} |
|
1057 | 1080 |
|
1081 |
/** |
|
1082 |
* @param $named_area_uuid |
|
1083 |
* @return array |
|
1084 |
* The drupal render array for the page |
|
1085 |
* |
|
1086 |
* @ingroup compose |
|
1087 |
*/ |
|
1088 |
function compose_cdm_named_area_page($named_area_uuid) |
|
1089 |
{ |
|
1090 |
|
|
1091 |
$named_area = cdm_ws_get(CDM_WS_PORTAL_TERM, array($named_area_uuid)); |
|
1092 |
|
|
1093 |
$render_array = array(); |
|
1094 |
RenderHints::pushToRenderStack('named_area_page'); |
|
1095 |
|
|
1096 |
$groups = array(); |
|
1097 |
@_description_list_group_add($groups, t('Name') . ':', $named_area->representation_L10n); |
|
1098 |
@_description_list_group_add($groups, t('IdInVocabulary') . ':', $named_area->idInVocabulary); |
|
1099 |
if(isset($named_area->level)) { |
|
1100 |
@_description_list_group_add($groups, t('Level') . ':', $named_area->level->representation_L10n); |
|
1101 |
} |
|
1102 |
|
|
1103 |
$name_area_details_elements = array( |
|
1104 |
// '#title' => $title, |
|
1105 |
'#theme' => 'description_list', |
|
1106 |
'#groups' => $groups, |
|
1107 |
'#attributes' => array('class' => html_class_attribute_ref($named_area)), |
|
1108 |
); |
|
1109 |
|
|
1110 |
$render_array[] = $name_area_details_elements; |
|
1111 |
|
|
1112 |
RenderHints::popFromRenderStack(); |
|
1113 |
return $render_array; |
|
1058 | 1114 |
} |
Also available in: Unified diff
ref #2985 implementing named area page to make area details like level accessible