Skip to content

Commit

Permalink
Merge pull request #1274 from tripal/1273-tv3-bundle-description
Browse files Browse the repository at this point in the history
Use bundle description on Add Tripal Content bundle listing.
  • Loading branch information
spficklin committed Apr 28, 2022
2 parents f92e3da + 34802b8 commit 1f23e89
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tripal/includes/TripalEntityUIController.inc
Original file line number Diff line number Diff line change
Expand Up @@ -859,10 +859,16 @@ function tripal_add_page() {
if (!array_key_exists($machine_name . '_fieldset', $content)) {
$content[$machine_name . '_fieldset'] = $fieldsets[$machine_name . '_fieldset'];
}
if ($bundle->term) {
$description = tripal_get_bundle_variable('description', $bundle->id, $bundle->term->definition);
}
else {
$description = tripal_get_bundle_variable('description', $bundle->id, '');
}
$content[$machine_name . '_fieldset'][$bundle->name] = [
'#type' => 'item',
'#markup' => l($bundle->label, 'bio_data/add/' . $bundle->id),
'#description' => $bundle->term->definition,
'#description' => $description,
];
}
}
Expand Down

0 comments on commit 1f23e89

Please sign in to comment.