diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-03-19 16:51:25 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-03-19 16:51:25 -0400 |
commit | caf8cb3323e4ef9af2f76b639785d083540d4687 (patch) | |
tree | a1d099c88e875347466974712eb5a7c722e32dad /app/Template/board | |
parent | 6351cb0e27eea05a2b0a8063b8b0df0abc49896d (diff) |
Improve board tooltips
Diffstat (limited to 'app/Template/board')
-rw-r--r-- | app/Template/board/task_footer.php | 11 | ||||
-rw-r--r-- | app/Template/board/tooltip_comments.php | 2 | ||||
-rw-r--r-- | app/Template/board/tooltip_external_links.php | 38 | ||||
-rw-r--r-- | app/Template/board/tooltip_files.php | 38 | ||||
-rw-r--r-- | app/Template/board/tooltip_subtasks.php | 34 | ||||
-rw-r--r-- | app/Template/board/tooltip_tasklinks.php | 48 |
6 files changed, 98 insertions, 73 deletions
diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php index 7d651a79..b20e4a3e 100644 --- a/app/Template/board/task_footer.php +++ b/app/Template/board/task_footer.php @@ -39,6 +39,13 @@ <?php endif ?> <div class="task-board-icons"> + <?php if ($task['score']): ?> + <span class="task-score" title="<?= t('Complexity') ?>"> + <i class="fa fa-trophy"></i> + <?= $this->text->e($task['score']) ?> + </span> + <?php endif ?> + <?php if (! empty($task['date_due'])): ?> <span class="task-board-date <?= time() > $task['date_due'] ? 'task-board-date-overdue' : '' ?>"> <i class="fa fa-calendar"></i> @@ -80,10 +87,6 @@ </span> <?php endif ?> - <?php if ($task['score']): ?> - <span class="task-score"><?= $this->text->e($task['score']) ?></span> - <?php endif ?> - <?php if (! empty($task['time_estimated'])): ?> <span class="task-time-estimated" title="<?= t('Time estimated') ?>"><?= $this->text->e($task['time_estimated']).'h' ?></span> <?php endif ?> diff --git a/app/Template/board/tooltip_comments.php b/app/Template/board/tooltip_comments.php index 1db07356..a1071848 100644 --- a/app/Template/board/tooltip_comments.php +++ b/app/Template/board/tooltip_comments.php @@ -1,4 +1,4 @@ -<div class="comment-tooltip"> +<div class="tooltip-large"> <?php foreach ($comments as $comment): ?> <?= $this->render('comment/show', array( 'comment' => $comment, diff --git a/app/Template/board/tooltip_external_links.php b/app/Template/board/tooltip_external_links.php index 24cd1d88..65331864 100644 --- a/app/Template/board/tooltip_external_links.php +++ b/app/Template/board/tooltip_external_links.php @@ -1,20 +1,22 @@ -<table class="table-striped table-small"> - <tr> - <th class="column-20"><?= t('Type') ?></th> - <th class="column-80"><?= t('Title') ?></th> - <th class="column-10"><?= t('Dependency') ?></th> - </tr> - <?php foreach ($links as $link): ?> +<div class="tooltip-large"> + <table> <tr> - <td> - <?= $link['type'] ?> - </td> - <td> - <a href="<?= $link['url'] ?>" target="_blank"><?= $this->text->e($link['title']) ?></a> - </td> - <td> - <?= $this->text->e($link['dependency_label']) ?> - </td> + <th class="column-20"><?= t('Type') ?></th> + <th class="column-70"><?= t('Title') ?></th> + <th class="column-10"><?= t('Dependency') ?></th> </tr> - <?php endforeach ?> -</table>
\ No newline at end of file + <?php foreach ($links as $link): ?> + <tr> + <td> + <?= $link['type'] ?> + </td> + <td> + <a href="<?= $link['url'] ?>" target="_blank"><?= $this->text->e($link['title']) ?></a> + </td> + <td> + <?= $this->text->e($link['dependency_label']) ?> + </td> + </tr> + <?php endforeach ?> + </table> +</div> diff --git a/app/Template/board/tooltip_files.php b/app/Template/board/tooltip_files.php index 8ee18626..5ade5b5b 100644 --- a/app/Template/board/tooltip_files.php +++ b/app/Template/board/tooltip_files.php @@ -1,18 +1,20 @@ -<table class="table-small"> - <?php foreach ($files as $file): ?> - <tr> - <th> - <i class="fa <?= $this->file->icon($file['name']) ?> fa-fw"></i> - <?= $this->text->e($file['name']) ?> - </th> - </tr> - <tr> - <td> - <i class="fa fa-download fa-fw"></i><?= $this->url->link(t('download'), 'FileViewer', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> - <?php if ($file['is_image'] == 1): ?> - <i class="fa fa-eye"></i> <?= $this->url->link(t('open file'), 'FileViewer', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?> - <?php endif ?> - </td> - </tr> - <?php endforeach ?> -</table>
\ No newline at end of file +<div class="tooltip-large"> + <table> + <?php foreach ($files as $file): ?> + <tr> + <th> + <i class="fa <?= $this->file->icon($file['name']) ?> fa-fw"></i> + <?= $this->text->e($file['name']) ?> + </th> + </tr> + <tr> + <td> + <i class="fa fa-download fa-fw"></i><?= $this->url->link(t('download'), 'FileViewer', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> + <?php if ($file['is_image'] == 1): ?> + <i class="fa fa-eye"></i> <?= $this->url->link(t('open file'), 'FileViewer', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?> + <?php endif ?> + </td> + </tr> + <?php endforeach ?> + </table> +</div> diff --git a/app/Template/board/tooltip_subtasks.php b/app/Template/board/tooltip_subtasks.php index 126a319f..0322d373 100644 --- a/app/Template/board/tooltip_subtasks.php +++ b/app/Template/board/tooltip_subtasks.php @@ -1,14 +1,22 @@ -<table class="table-stripped"> -<?php foreach ($subtasks as $subtask): ?> - <tr> - <td class="column-80"> - <?= $this->subtask->toggleStatus($subtask, $task['project_id']) ?> - </td> - <td> - <?php if (! empty($subtask['username'])): ?> +<div class="tooltip-large"> + <table> + <tr> + <th class="column-80"><?= t('Subtask') ?></th> + <th><?= t('Assignee') ?></th> + </tr> + <?php foreach ($subtasks as $subtask): ?> + <tr> + <td> + <?= $this->subtask->toggleStatus($subtask, $task['project_id']) ?> + </td> + <td> + <?php if (! empty($subtask['username'])): ?> <?= $this->text->e($subtask['name'] ?: $subtask['username']) ?> - <?php endif ?> - </td> - </tr> -<?php endforeach ?> -</table> + <?php else: ?> + <?= t('Not assigned') ?> + <?php endif ?> + </td> + </tr> + <?php endforeach ?> + </table> +</div> diff --git a/app/Template/board/tooltip_tasklinks.php b/app/Template/board/tooltip_tasklinks.php index cabe43d8..6424c39d 100644 --- a/app/Template/board/tooltip_tasklinks.php +++ b/app/Template/board/tooltip_tasklinks.php @@ -1,24 +1,34 @@ -<div class="tooltip-tasklinks"> - <dl> +<div class="tooltip-large"> + <table> <?php foreach ($links as $label => $grouped_links): ?> - <dt><strong><?= t($label) ?></strong></dt> + <tr> + <th colspan="4"><?= t($label) ?></th> + </tr> <?php foreach ($grouped_links as $link): ?> - <dd> - <span class="progress"><?= $this->task->getProgress($link).'%' ?></span> - <?= $this->url->link( - $this->text->e('#'.$link['task_id'].' '.$link['title']), - 'task', 'show', array('task_id' => $link['task_id'], 'project_id' => $link['project_id']), - false, - $link['is_active'] ? '' : 'task-link-closed' - ) ?> - <?php if (! empty($link['task_assignee_username'])): ?> - [<?= $this->text->e($link['task_assignee_name'] ?: $link['task_assignee_username']) ?>] - <?php endif ?> - <?php if ($task['project_id'] != $link['project_id']): ?> - (<i><?= $link['project_name'] ?></i>) - <?php endif ?> - </dd> + <tr> + <td class="column-10"> + <?= $this->task->getProgress($link).'%' ?> + </td> + <td class="column-60"> + <?= $this->url->link( + $this->text->e('#'.$link['task_id'].' '.$link['title']), + 'task', 'show', array('task_id' => $link['task_id'], 'project_id' => $link['project_id']), + false, + $link['is_active'] ? '' : 'task-link-closed' + ) ?> + </td> + <td> + <?php if (! empty($link['task_assignee_username'])): ?> + <?= $this->text->e($link['task_assignee_name'] ?: $link['task_assignee_username']) ?> + <?php else: ?> + <?= t('Not assigned') ?> + <?php endif ?> + </td> + <td> + <?= $link['project_name'] ?> + </td> + </tr> <?php endforeach ?> <?php endforeach ?> - </dl> + </table> </div>
\ No newline at end of file |