From e9a10a446ba13438cf6f1009c2d794595b7f6152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Wed, 6 Jan 2016 10:24:17 +0100 Subject: [PATCH] Sub-task dependency display fix When displaying a sub-task's dependencies, don't display item names as they are unnecessary (all dependencies being sub-tasks of the same task anyway). --- includes/t-tasks/views.inc.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/includes/t-tasks/views.inc.php b/includes/t-tasks/views.inc.php index e7b47fa..1f86070 100644 --- a/includes/t-tasks/views.inc.php +++ b/includes/t-tasks/views.inc.php @@ -390,8 +390,15 @@ class View_TaskDependencies } $list = HTML::make( 'ul' )->setAttribute( 'class' , 'dep-list' ); - $prevItem = null; - $itemList = null; + $showItem = ( $this->task->parent_task === null ); + if ( $showItem ) { + $prevItem = null; + $itemList = null; + } else { + $prevItem = (string) $this->task->item->id; + $itemList = $list; + } + foreach ( $this->task->$source as $dependency ) { if ( $prevItem !== $dependency->item ) { $itemList = HTML::make( 'ul' );