Add tooltip to subtask icons
This commit is contained in:
parent
914b40b4af
commit
41c2ab0c24
|
|
@ -3,6 +3,7 @@
|
|||
namespace Kanboard\Helper;
|
||||
|
||||
use Kanboard\Core\Base;
|
||||
use Kanboard\Model\SubtaskModel;
|
||||
|
||||
/**
|
||||
* Subtask helpers
|
||||
|
|
@ -66,9 +67,9 @@ class SubtaskHelper extends Base
|
|||
);
|
||||
|
||||
if ($subtask['status'] == 0 && $this->hasSubtaskInProgress()) {
|
||||
$html = $this->helper->url->link($title, 'SubtaskRestrictionController', 'show', $params, false, 'js-modal-confirm');
|
||||
$html = $this->helper->url->link($title, 'SubtaskRestrictionController', 'show', $params, false, 'js-modal-confirm', $this->getSubtaskTooltip($subtask));
|
||||
} else {
|
||||
$html = $this->helper->url->link($title, 'SubtaskStatusController', 'change', $params, false, 'js-subtask-toggle-status');
|
||||
$html = $this->helper->url->link($title, 'SubtaskStatusController', 'change', $params, false, 'js-subtask-toggle-status', $this->getSubtaskTooltip($subtask));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -136,4 +137,18 @@ class SubtaskHelper extends Base
|
|||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function getSubtaskTooltip(array $subtask)
|
||||
{
|
||||
switch ($subtask['status']) {
|
||||
case SubtaskModel::STATUS_TODO:
|
||||
return t('Subtask not started');
|
||||
case SubtaskModel::STATUS_INPROGRESS:
|
||||
return t('Subtask currently in progress');
|
||||
case SubtaskModel::STATUS_DONE:
|
||||
return t('Subtask completed');
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
'Create another link' => 'Créer un autre lien',
|
||||
'BRL - Brazilian Real' => 'BRL - Real brésilien',
|
||||
'Add a new Kanboard task' => 'Ajouter une nouvelle tâche Kanboard',
|
||||
'Subtask not started' => 'Sous-tâche pas encore commencé',
|
||||
'Subtask currently in progress' => 'Sous-tâche actuellement en progrès',
|
||||
'Subtask completed' => 'Sous-tâche terminée',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
'Create another link' => 'Criar outro link',
|
||||
'BRL - Brazilian Real' => 'BRL - Real Brasileiro',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
'Create another link' => 'Criar outro link',
|
||||
'BRL - Brazilian Real' => 'BRL - Real Brasileiro',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1341,4 +1341,7 @@ return array(
|
|||
'Create another link' => 'Başka bağlantı oluştur',
|
||||
'BRL - Brazilian Real' => 'BRL - Brezilya Reali',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1347,4 +1347,7 @@ return array(
|
|||
'Create another link' => 'Tạo liên kết khác',
|
||||
'BRL - Brazilian Real' => 'BRL - Brazilian Real',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1338,5 +1338,10 @@ return array(
|
|||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||
'Predefined Email Subjects' => '预定义的邮件主题',
|
||||
// 'Write one subject by line.' => '',
|
||||
'%a days, %h hours, %i minutes and %s seconds' => '%a 天, %h 小时, %i 分, %s 秒',
|
||||
// 'Create another link' => '',
|
||||
// 'BRL - Brazilian Real' => '',
|
||||
// 'Add a new Kanboard task' => '',
|
||||
// 'Subtask not started' => '',
|
||||
// 'Subtask currently in progress' => '',
|
||||
// 'Subtask completed' => '',
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue