Fixed display errors in reports of expenses

This commit is contained in:
Manuel Cillero 2017-09-01 13:15:59 +02:00
parent 527efa9b29
commit 7d5864b347
8 changed files with 51 additions and 40 deletions

View file

@ -446,9 +446,8 @@ function stormtask_form(&$node) {
$breadcrumb[] = l(t('Home'), '<front>');
if (array_key_exists('project_nid', $_GET)) {
$breadcrumb[] = l(t('Projects'), 'projects');
$project = node_load($_GET['project_nid']);
$breadcrumb[] = l($project->title, 'node/'. $project->nid);
$breadcrumb[] = l(t('Projects'), 'projects') . ' (' . l($project->title, 'node/'. $project->nid) . ')';
$breadcrumb[] = l(t('Project tasks'), 'node/'. $project->nid .'/tasks');
}
else {
@ -1006,10 +1005,8 @@ function stormtask_validate(&$node) {
function stormtask_view($node, $teaser = FALSE, $page = FALSE) {
$breadcrumb = array();
$breadcrumb[] = l(t('Home'), '<front>');
$breadcrumb[] = l(t('Projects'), 'projects');
$breadcrumb[] = l($node->project_title, 'node/'. $node->project_nid);
$breadcrumb[] = l(t('Tasks'), 'tasks');
$breadcrumb[] = l(t('Project tasks'), 'node/'. $node->project_nid .'/tasks');
$breadcrumb[] = l(t('Projects'), 'projects') . ' (' . l($node->project_title, 'node/'. $node->project_nid) . ')';
$breadcrumb[] = l(t('Tasks'), 'tasks') . ' (' . l(t('Project tasks'), 'node/'. $node->project_nid .'/tasks') . ')';
drupal_set_breadcrumb($breadcrumb);