Add a default "Info" tab to /farm/reports. Make weight report a local task.

This commit is contained in:
Michael Stenta 2019-07-29 11:40:11 -04:00
parent cddb77a4d6
commit c9a21f92e2
2 changed files with 7 additions and 3 deletions

View File

@ -116,7 +116,7 @@ function farm_livestock_weight_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('farm_livestock_weight_report_form'),
'access arguments' => array('view farm reports'),
'type' => MENU_LOCAL_ACTION,
'type' => MENU_LOCAL_TASK,
);
return $items;

View File

@ -49,12 +49,16 @@ function farm_report_menu() {
'page callback' => 'farm_report_view',
'access arguments' => array('view farm reports'),
'type' => MENU_LOCAL_TASK,
'weight' => 150,
);
$items['farm/report/info'] = array(
'title' => 'Info',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -100,
);
return $items;
};
function farm_report_view() {
return t('Welcome to reports.');
return t('Select a report from the menu above.');
};