diff options
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/board/comments.php | 13 | ||||
-rw-r--r-- | app/Template/board/description.php | 5 | ||||
-rw-r--r-- | app/Template/board/files.php | 14 | ||||
-rw-r--r-- | app/Template/board/subtasks.php | 16 | ||||
-rw-r--r-- | app/Template/board/task.php | 8 | ||||
-rw-r--r-- | app/Template/subtask/icons.php | 7 | ||||
-rw-r--r-- | app/Template/subtask_show.php | 8 |
7 files changed, 60 insertions, 11 deletions
diff --git a/app/Template/board/comments.php b/app/Template/board/comments.php new file mode 100644 index 00000000..83d6bd9a --- /dev/null +++ b/app/Template/board/comments.php @@ -0,0 +1,13 @@ +<section> + <?php foreach ($comments as $comment): ?> + <p class="comment-title"> + <span class="comment-username"><?= Helper\escape($comment['name'] ?: $comment['username']) ?></span> @ <span class="comment-date"><?= dt('%b %e, %Y, %k:%M %p', $comment['date']) ?></span> + </p> + + <div class="comment-inner"> + <div class="markdown"> + <?= Helper\markdown($comment['comment']) ?> + </div> + </div> + <?php endforeach ?> +</section> diff --git a/app/Template/board/description.php b/app/Template/board/description.php new file mode 100644 index 00000000..85e042dd --- /dev/null +++ b/app/Template/board/description.php @@ -0,0 +1,5 @@ +<section class="tooltip-large"> +<div class="markdown"> + <?= Helper\markdown($task['description']) ?> +</div> +</section>
\ No newline at end of file diff --git a/app/Template/board/files.php b/app/Template/board/files.php new file mode 100644 index 00000000..66d5bff9 --- /dev/null +++ b/app/Template/board/files.php @@ -0,0 +1,14 @@ +<section> + <?php foreach ($files as $file): ?> + <i class="fa fa-file-o fa-fw"></i> + + <?= Helper\a( + Helper\escape($file['name']), + 'file', + 'download', + array('file_id' => $file['id'], 'task_id' => $file['task_id']) + ) ?> + + <br/> + <?php endforeach ?> +</section> diff --git a/app/Template/board/subtasks.php b/app/Template/board/subtasks.php new file mode 100644 index 00000000..c7f995d7 --- /dev/null +++ b/app/Template/board/subtasks.php @@ -0,0 +1,16 @@ +<section id="tooltip-subtasks"> +<?php foreach ($subtasks as $subtask): ?> + <?= Helper\template('subtask/icons', array('subtask' => $subtask)) ?> + + <?= Helper\a( + Helper\escape($subtask['title']), + 'board', + 'toggleSubtask', + array('task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id']) + ) ?> + + <?= Helper\escape(empty($subtask['username']) ? '' : ' ['.Helper\get_username($subtask).']') ?> + + <br/> +<?php endforeach ?> +</section>
\ No newline at end of file diff --git a/app/Template/board/task.php b/app/Template/board/task.php index 02ae46c1..e29ff2bb 100644 --- a/app/Template/board/task.php +++ b/app/Template/board/task.php @@ -90,19 +90,19 @@ <div class="task-board-icons"> <?php if (! empty($task['nb_subtasks'])): ?> - <span title="<?= t('Sub-Tasks') ?>"><?= $task['nb_completed_subtasks'].'/'.$task['nb_subtasks'] ?> <i class="fa fa-bars"></i></span> + <span title="<?= t('Sub-Tasks') ?>" class="task-board-tooltip" data-href="<?= helper\u('board', 'subtasks', array('task_id' => $task['id'])) ?>"><?= $task['nb_completed_subtasks'].'/'.$task['nb_subtasks'] ?> <i class="fa fa-bars"></i></span> <?php endif ?> <?php if (! empty($task['nb_files'])): ?> - <span title="<?= t('Attachments') ?>"><?= $task['nb_files'] ?> <i class="fa fa-paperclip"></i></span> + <span title="<?= t('Attachments') ?>" class="task-board-tooltip" data-href="<?= helper\u('board', 'attachments', array('task_id' => $task['id'])) ?>"><?= $task['nb_files'] ?> <i class="fa fa-paperclip"></i></span> <?php endif ?> <?php if (! empty($task['nb_comments'])): ?> - <span title="<?= p($task['nb_comments'], t('%d comment', $task['nb_comments']), t('%d comments', $task['nb_comments'])) ?>"><?= $task['nb_comments'] ?> <i class="fa fa-comment-o"></i></span> + <span title="<?= p($task['nb_comments'], t('%d comment', $task['nb_comments']), t('%d comments', $task['nb_comments'])) ?>" class="task-board-tooltip" data-href="<?= helper\u('board', 'comments', array('task_id' => $task['id'])) ?>"><?= $task['nb_comments'] ?> <i class="fa fa-comment-o"></i></span> <?php endif ?> <?php if (! empty($task['description'])): ?> - <span title="<?= t('Description') ?>"> + <span title="<?= t('Description') ?>" class="task-board-tooltip" data-href="<?= helper\u('board', 'description', array('task_id' => $task['id'])) ?>"> <?php if (! isset($not_editable)): ?> <a class="task-description-popover" href="?controller=task&action=description&task_id=<?= $task['id'] ?>"><i class="fa fa-file-text-o" data-href="?controller=task&action=description&task_id=<?= $task['id'] ?>"></i></a> <?php else: ?> diff --git a/app/Template/subtask/icons.php b/app/Template/subtask/icons.php new file mode 100644 index 00000000..1f31d51f --- /dev/null +++ b/app/Template/subtask/icons.php @@ -0,0 +1,7 @@ +<?php if ($subtask['status'] == 0): ?> + <i class="fa fa-square-o fa-fw"></i> +<?php elseif ($subtask['status'] == 1): ?> + <i class="fa fa-gears fa-fw"></i> +<?php else: ?> + <i class="fa fa-check-square-o fa-fw"></i> +<?php endif ?>
\ No newline at end of file diff --git a/app/Template/subtask_show.php b/app/Template/subtask_show.php index 29f4bfd1..686b160e 100644 --- a/app/Template/subtask_show.php +++ b/app/Template/subtask_show.php @@ -19,13 +19,7 @@ <tr> <td><?= Helper\escape($subtask['title']) ?></td> <td> - <?php if ($subtask['status'] == 0): ?> - <i class="fa fa-square-o fa-fw"></i> - <?php elseif ($subtask['status'] == 1): ?> - <i class="fa fa-gears fa-fw"></i> - <?php else: ?> - <i class="fa fa-check-square-o fa-fw"></i> - <?php endif ?> + <?= Helper\template('subtask/icons', array('subtask' => $subtask)) ?> <?php if (! isset($not_editable)): ?> <?= Helper\a(Helper\escape($subtask['status_name']), 'subtask', 'toggleStatus', array('task_id' => $task['id'], 'subtask_id' => $subtask['id'])) ?> |