Revision 753a8083
Added by Andreas Kohlbecker over 4 years ago
modules/cdm_dataportal/includes/descriptions.inc | ||
---|---|---|
2143 | 2143 |
$out .= ' ' . icon_link($path_to_description); |
2144 | 2144 |
|
2145 | 2145 |
if($show_description_elements){ |
2146 |
$out .= '<div class="content-caption">Bracketed numbers denote sample size.</div>';
|
|
2146 |
$out .= '<div class="content-caption">'. t('Bracketed numbers denote sample size') . '</div>';
|
|
2147 | 2147 |
} |
2148 | 2148 |
|
2149 | 2149 |
return $out; |
... | ... | |
2242 | 2242 |
} |
2243 | 2243 |
$title = 'Descriptive Data ' . $dataSet->titleCache . |
2244 | 2244 |
($described_entity_title ? ' for ' . $described_entity_title : ''); |
2245 |
}
|
|
2246 |
$render_array['title'] = markup_to_render_array($title, null, '<h3 class="title">', '</h3>');
|
|
2245 |
} |
|
2246 |
$render_array['title'] = markup_to_render_array($title, null, '<h3 class="title">', '</h3>'); |
|
2247 | 2247 |
RenderHints::popFromRenderStack(); |
2248 |
// END of --- generate description title |
|
2248 | 2249 |
|
2249 |
if (isset($description->types)) { |
|
2250 |
foreach ($description->types as $type) { |
|
2251 |
if ($type == 'CLONE_FOR_SOURCE') { |
|
2252 |
$render_array['source'] = markup_to_render_array("Aggregation source from " . $description->created . '<br><br>'); |
|
2253 |
break; |
|
2254 |
} |
|
2250 |
if (isset($description->types)) { |
|
2251 |
foreach ($description->types as $type) { |
|
2252 |
if ($type == 'CLONE_FOR_SOURCE') { |
|
2253 |
$render_array['source'] = markup_to_render_array("Aggregation source from " . $description->created, null, '<div class="date-created">', '</div>'); |
|
2254 |
break; |
|
2255 | 2255 |
} |
2256 | 2256 |
} |
2257 | 2257 |
} |
2258 |
// multiple datasets present see #8714 "Show multiple datasets per description as list of links" |
|
2259 |
else { |
|
2260 |
$items = []; |
|
2261 |
foreach ($description->descriptiveDataSets as $dataSet) { |
|
2262 |
$path = path_to_description($description->uuid, $dataSet->uuid); |
|
2263 |
$attributes['class'][] = html_class_attribute_ref($description); |
|
2264 |
$items[] = [ |
|
2265 |
'data' => $dataSet->titleCache . icon_link($path), |
|
2266 |
]; |
|
2267 |
} |
|
2268 |
$render_array['description_elements'] = [ |
|
2269 |
'#title' => 'Available data sets for description', |
|
2270 |
'#theme' => 'item_list', |
|
2271 |
'#type' => 'ul', |
|
2272 |
'#items' => $items, |
|
2258 |
} |
|
2259 |
// multiple datasets present see #8714 "Show multiple datasets per description as list of links" |
|
2260 |
else { |
|
2261 |
$items = []; |
|
2262 |
foreach ($description->descriptiveDataSets as $dataSet) { |
|
2263 |
$path = path_to_description($description->uuid, $dataSet->uuid); |
|
2264 |
$attributes['class'][] = html_class_attribute_ref($description); |
|
2265 |
$items[] = [ |
|
2266 |
'data' => $dataSet->titleCache . icon_link($path), |
|
2273 | 2267 |
]; |
2274 | 2268 |
} |
2275 |
|
|
2269 |
$render_array['description_elements'] = [ |
|
2270 |
'#title' => 'Available data sets for description', |
|
2271 |
'#theme' => 'item_list', |
|
2272 |
'#type' => 'ul', |
|
2273 |
'#items' => $items, |
|
2274 |
]; |
|
2275 |
} |
|
2276 | 2276 |
|
2277 | 2277 |
$described_entities = []; |
2278 | 2278 |
if (isset($description->describedSpecimenOrObservation)) { |
... | ... | |
2302 | 2302 |
$render_array['table'] = markup_to_render_array(theme('table', [ |
2303 | 2303 |
'header' => $header, |
2304 | 2304 |
'rows' => $rows, |
2305 |
'caption' => "Bracketed numbers denote sample size.",
|
|
2305 |
'caption' => t("Bracketed numbers denote sample size"),
|
|
2306 | 2306 |
'title' => "Table" |
2307 | 2307 |
])); |
2308 | 2308 |
} |
2309 | 2309 |
|
2310 |
// --- sources |
|
2310 | 2311 |
if (isset($description->sources) and !empty($description->sources)) { |
2311 | 2312 |
$items = []; |
2312 | 2313 |
foreach ($description->sources as $source) { |
Also available in: Unified diff
ref #8739 description page better and stylable DOM