3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Add the asset and log IDs to entity view pages.

This commit is contained in:
Michael Stenta 2018-09-05 14:22:43 -04:00
parent ece50ced0e
commit 7be4c7e19c
2 changed files with 16 additions and 0 deletions

View file

@ -329,6 +329,14 @@ function farm_asset_entity_view($entity, $type, $view_mode, $langcode) {
if (!empty($asset_types[$entity->type])) {
$entity->content['type'] = array(
'#markup' => '<div><strong>Asset type:</strong> ' . $asset_types[$entity->type] . '</div>',
'#weight' => -102,
);
}
// Add the asset ID.
if (!empty($entity->id)) {
$entity->content['id'] = array(
'#markup' => '<div><strong>Asset ID:</strong> ' . $entity->id . '</div>',
'#weight' => -101,
);
}

View file

@ -22,6 +22,14 @@ function farm_log_entity_view($entity, $type, $view_mode, $langcode) {
if (!empty($log_types[$entity->type])) {
$entity->content['type'] = array(
'#markup' => '<div><strong>Log type:</strong> ' . $log_types[$entity->type] . '</div>',
'#weight' => -102,
);
}
// Add the log ID.
if (!empty($entity->id)) {
$entity->content['id'] = array(
'#markup' => '<div><strong>Log ID:</strong> ' . $entity->id . '</div>',
'#weight' => -101,
);
}