summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Controller/Board.php4
-rw-r--r--app/Template/board/recurrence.php18
-rw-r--r--app/Template/board/task_menu.php4
-rw-r--r--app/Template/task/details.php47
-rw-r--r--app/Template/task/edit_recurrence.php91
-rw-r--r--app/Template/task/public.php2
-rw-r--r--app/Template/task/recurring_info.php37
-rw-r--r--app/Template/task/show.php9
-rw-r--r--assets/css/app.css8
-rw-r--r--assets/css/src/tooltip.css8
10 files changed, 97 insertions, 131 deletions
diff --git a/app/Controller/Board.php b/app/Controller/Board.php
index e92cfe37..07c99a96 100644
--- a/app/Controller/Board.php
+++ b/app/Controller/Board.php
@@ -360,11 +360,11 @@ class Board extends Base
{
$task = $this->getTask();
- $this->response->html($this->template->render('board/recurrence', array(
+ $this->response->html($this->template->render('task/recurring_info', array(
'task' => $task,
'recurrence_trigger_list' => $this->task->getRecurrenceTriggerList(),
'recurrence_timeframe_list' => $this->task->getRecurrenceTimeframeList(),
'recurrence_basedate_list' => $this->task->getRecurrenceBasedateList(),
- )));
+ )));
}
}
diff --git a/app/Template/board/recurrence.php b/app/Template/board/recurrence.php
deleted file mode 100644
index 1b71bc34..00000000
--- a/app/Template/board/recurrence.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<section class="tooltip-large">
-<?php if ($task['recurrence_status'] == \Model\Task::RECURE_STATUS_PENDING): ?>
- <?= t('Recurrent task is scheduled to generate') ?><br/>
-<?php endif ?>
-<?php if ($task['recurrence_status'] == \Model\Task::RECURE_STATUS_PROCESSED): ?>
- <?= t('Recurrent task has been generated') ?><br/>
-<?php endif ?>
- <?= t('Trigger to generate recurrent task: %s', $recurrence_trigger_list[$task['recurrence_trigger']]) ?><br/>
- <?= t('Factor to calculate new due date: %s', $task['recurrence_factor']) ?><br/>
- <?= t('Timeframe to calculate new due date: %s', $recurrence_timeframe_list[$task['recurrence_timeframe']]) ?><br/>
- <?= t('Base date to calculate new due date: %s', $recurrence_basedate_list[$task['recurrence_basedate']]) ?><br/>
-<?php if ($task['recurrence_parent']): ?>
- <?= t('Recurrent task created by: %s', $task['recurrence_parent']) ?><br/>
-<?php endif ?>
-<?php if ($task['recurrence_child']): ?>
- <?= t('Created recurrent task: %s', $task['recurrence_child']) ?><br/>
-<?php endif ?>
-</section>
diff --git a/app/Template/board/task_menu.php b/app/Template/board/task_menu.php
index fba2d71d..04b03385 100644
--- a/app/Template/board/task_menu.php
+++ b/app/Template/board/task_menu.php
@@ -5,11 +5,11 @@
<li><i class="fa fa-user"></i> <?= $this->a(t('Change assignee'), 'board', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
<li><i class="fa fa-tag"></i> <?= $this->a(t('Change category'), 'board', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
<li><i class="fa fa-align-left"></i> <?= $this->a(t('Change description'), 'task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
- <li><i class="fa fa-refresh fa-rotate-90"></i> <?= $this->a(t('Edit recurrence'), 'task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
+ <li><i class="fa fa-pencil-square-o"></i> <?= $this->a(t('Edit this task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
<li><i class="fa fa-comment-o"></i> <?= $this->a(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
<li><i class="fa fa-code-fork"></i> <?= $this->a(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
- <li><i class="fa fa-pencil-square-o"></i> <?= $this->a(t('Edit this task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
<li><i class="fa fa-camera"></i> <?= $this->a(t('Add a screenshot'), 'board', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
+ <li><i class="fa fa-refresh fa-rotate-90"></i> <?= $this->a(t('Edit recurrence'), 'task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
<li><i class="fa fa-close"></i> <?= $this->a(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'task-board-popover') ?></li>
</ul>
</span>
diff --git a/app/Template/task/details.php b/app/Template/task/details.php
index 331862b9..32f0fbb8 100644
--- a/app/Template/task/details.php
+++ b/app/Template/task/details.php
@@ -80,43 +80,16 @@
<?= $this->a(t('Public link'), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?>
</li>
<?php endif ?>
- <?php if ($task['recurrence_status'] == \Model\Task::RECURE_STATUS_NONE): ?>
- <li>
- <?= t('No recurrent task is scheduled to generate') ?>
- </li>
- <?php endif ?>
- <?php if ($task['recurrence_status'] != \Model\Task::RECURE_STATUS_NONE): ?>
- <li>
- <?php if ($task['recurrence_status'] == \Model\Task::RECURE_STATUS_PENDING): ?>
- <?= t('Recurrent task is scheduled to generate') ?>
- <?php endif ?>
- <?php if ($task['recurrence_status'] == \Model\Task::RECURE_STATUS_PROCESSED): ?>
- <?= t('Recurrent task has been generated') ?>
- <?php endif ?>
- <ul>
- <li>
- <?= t('Trigger to generate recurrent task: %s', $recurrence_trigger_list[$task['recurrence_trigger']]) ?></stong>
- </li>
- <li>
- <?= t('Factor to calculate new due date: %s', $task['recurrence_factor']) ?></stong>
- </li>
- <li>
- <?= t('Timeframe to calculate new due date: %s', $recurrence_timeframe_list[$task['recurrence_timeframe']]) ?></stong>
- </li>
- <li>
- <?= t('Base date to calculate new due date: %s', $recurrence_basedate_list[$task['recurrence_basedate']]) ?></stong>
- </li>
- </ul>
- </li>
- <?php endif ?>
- <?php if ($task['recurrence_parent']): ?>
- <li>
- <?= t('Recurrent task created by: %s', $task['recurrence_parent']) ?>
- </li>
- <?php endif ?>
- <?php if ($task['recurrence_child']): ?>
- <li>
- <?= t('Created recurrent task: %s', $task['recurrence_child']) ?>
+
+ <?php if (! isset($not_editable) && $task['recurrence_status'] != \Model\Task::RECURE_STATUS_NONE): ?>
+ <li>
+ <strong><?= t('Recurring information') ?></strong>
+ <?= $this->render('task/recurring_info', array(
+ 'task' => $task,
+ 'recurrence_trigger_list' => $recurrence_trigger_list,
+ 'recurrence_timeframe_list' => $recurrence_timeframe_list,
+ 'recurrence_basedate_list' => $recurrence_basedate_list,
+ )) ?>
</li>
<?php endif ?>
</ul>
diff --git a/app/Template/task/edit_recurrence.php b/app/Template/task/edit_recurrence.php
index bb86e429..7a65173c 100644
--- a/app/Template/task/edit_recurrence.php
+++ b/app/Template/task/edit_recurrence.php
@@ -1,85 +1,52 @@
<div class="page-header">
<h2><?= t('Edit recurrence') ?></h2>
</div>
-<section id="task-section">
-
+<?php if ($task['recurrence_status'] != \Model\Task::RECURE_STATUS_NONE): ?>
+<div class="listing">
+ <?= $this->render('task/recurring_info', array(
+ 'task' => $task,
+ 'recurrence_trigger_list' => $recurrence_trigger_list,
+ 'recurrence_timeframe_list' => $recurrence_timeframe_list,
+ 'recurrence_basedate_list' => $recurrence_basedate_list,
+ )) ?>
+</div>
+<?php endif ?>
-<form method="post" action="<?= $this->u('task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off">
+<?php if ($task['recurrence_status'] != \Model\Task::RECURE_STATUS_PROCESSED): ?>
- <?= $this->formCsrf() ?>
+ <form method="post" action="<?= $this->u('task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off">
-
- <div class="form-column">
- <?php if ($task['recurrence_status'] == \Model\Task::RECURE_STATUS_PROCESSED): ?>
- <ul>
- <li><?= t('Recurrent task has been generated') ?>
- <ul>
- <li>
- <?= t('Trigger to generate recurrent task: %s', $recurrence_trigger_list[$task['recurrence_trigger']]) ?></stong>
- </li>
- <li>
- <?= t('Factor to calculate new due date: %s', $task['recurrence_factor']) ?></stong>
- </li>
- <li>
- <?= t('Timeframe to calculate new due date: %s', $recurrence_timeframe_list[$task['recurrence_timeframe']]) ?></stong>
- </li>
- <li>
- <?= t('Base date to calculate new due date: %s', $recurrence_basedate_list[$task['recurrence_basedate']]) ?></stong>
- </li>
- </ul>
- </li>
- </ul>
- <?php endif ?>
- <?php if ($task['recurrence_parent'] || $task['recurrence_child']): ?>
- <ul>
- <?php if ($task['recurrence_parent']): ?>
- <li>
- <?= t('Recurrent task created by: %s', $task['recurrence_parent']) ?>
- </li>
- <?php endif ?>
- <?php if ($task['recurrence_child']): ?>
- <li>
- <?= t('Created recurrent task: %s', $task['recurrence_child']) ?>
- </li>
- <?php endif ?>
- </ul>
- <?php endif ?>
-
- <?php if ($task['recurrence_status'] != \Model\Task::RECURE_STATUS_PROCESSED): ?>
+ <?= $this->formCsrf() ?>
<?= $this->formHidden('id', $values) ?>
<?= $this->formHidden('project_id', $values) ?>
<?= $this->formLabel(t('Generate recurrent task'), 'recurrence_status') ?>
- <?= $this->formSelect('recurrence_status', $recurrence_status_list, $values, $errors) ?> </br>
+ <?= $this->formSelect('recurrence_status', $recurrence_status_list, $values, $errors) ?>
<?= $this->formLabel(t('Trigger to generate recurrent task'), 'recurrence_trigger') ?>
- <?= $this->formSelect('recurrence_trigger', $recurrence_trigger_list, $values, $errors) ?> </br>
+ <?= $this->formSelect('recurrence_trigger', $recurrence_trigger_list, $values, $errors) ?>
<?= $this->formLabel(t('Factor to calculate new due date'), 'recurrence_factor') ?>
- <?= $this->formNumber('recurrence_factor', $values, $errors) ?> </br>
+ <?= $this->formNumber('recurrence_factor', $values, $errors) ?>
<?= $this->formLabel(t('Timeframe to calculate new due date'), 'recurrence_timeframe') ?>
- <?= $this->formSelect('recurrence_timeframe', $recurrence_timeframe_list, $values, $errors) ?> </br>
+ <?= $this->formSelect('recurrence_timeframe', $recurrence_timeframe_list, $values, $errors) ?>
<?= $this->formLabel(t('Base date to calculate new due date'), 'recurrence_basedate') ?>
- <?= $this->formSelect('recurrence_basedate', $recurrence_basedate_list, $values, $errors) ?> </br>
+ <?= $this->formSelect('recurrence_basedate', $recurrence_basedate_list, $values, $errors) ?>
- <?php endif ?>
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <?= t('or') ?>
- </div>
+ <?php if ($ajax): ?>
+ <?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $task['project_id'])) ?>
+ <?php else: ?>
+ <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?php endif ?>
+ </div>
+ </form>
- <div class="form-actions">
- <?php if ($task['recurrence_status'] != \Model\Task::RECURE_STATUS_PROCESSED): ?>
- <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
- <?= t('or') ?>
- <?php endif ?>
- <?php if ($ajax): ?>
- <?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $task['project_id'])) ?>
- <?php else: ?>
- <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- <?php endif ?>
- </div>
-</form>
-</section>
+<?php endif ?> \ No newline at end of file
diff --git a/app/Template/task/public.php b/app/Template/task/public.php
index d7acef9f..9f32f669 100644
--- a/app/Template/task/public.php
+++ b/app/Template/task/public.php
@@ -1,6 +1,6 @@
<section id="main" class="public-task">
- <?= $this->render('task/details', array('task' => $task, 'project' => $project)) ?>
+ <?= $this->render('task/details', array('task' => $task, 'project' => $project, 'not_editable' => true)) ?>
<p class="pull-right"><?= $this->a(t('Back to the board'), 'board', 'readonly', array('token' => $project['token'])) ?></p>
diff --git a/app/Template/task/recurring_info.php b/app/Template/task/recurring_info.php
new file mode 100644
index 00000000..1009a970
--- /dev/null
+++ b/app/Template/task/recurring_info.php
@@ -0,0 +1,37 @@
+<ul>
+ <?php if ($task['recurrence_status'] == \Model\Task::RECURE_STATUS_PENDING): ?>
+ <li><?= t('Recurrent task is scheduled to be generated') ?></li>
+ <?php elseif ($task['recurrence_status'] == \Model\Task::RECURE_STATUS_PROCESSED): ?>
+ <li><?= t('Recurrent task has been generated') ?>
+ <ul>
+ <li>
+ <?= t('Trigger to generate recurrent task: ') ?><strong><?= $this->e($recurrence_trigger_list[$task['recurrence_trigger']]) ?></strong>
+ </li>
+ <li>
+ <?= t('Factor to calculate new due date: ') ?><strong><?= $this->e($task['recurrence_factor']) ?></strong>
+ </li>
+ <li>
+ <?= t('Timeframe to calculate new due date: ') ?><strong><?= $this->e($recurrence_timeframe_list[$task['recurrence_timeframe']]) ?></strong>
+ </li>
+ <li>
+ <?= t('Base date to calculate new due date: ') ?><strong><?= $this->e($recurrence_basedate_list[$task['recurrence_basedate']]) ?></strong>
+ </li>
+ </ul>
+ </li>
+ <?php endif ?>
+
+ <?php if ($task['recurrence_parent'] || $task['recurrence_child']): ?>
+ <?php if ($task['recurrence_parent']): ?>
+ <li>
+ <?= t('Recurrent task created by: ') ?>
+ <?= $this->a('#'.$task['recurrence_parent'], 'task', 'show', array('task_id' => $task['recurrence_parent'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <?php endif ?>
+ <?php if ($task['recurrence_child']): ?>
+ <li>
+ <?= t('Created recurrent task: ') ?>
+ <?= $this->a('#'.$task['recurrence_child'], 'task', 'show', array('task_id' => $task['recurrence_child'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <?php endif ?>
+ <?php endif ?>
+</ul> \ No newline at end of file
diff --git a/app/Template/task/show.php b/app/Template/task/show.php
index 9d16ab74..5aa352a6 100644
--- a/app/Template/task/show.php
+++ b/app/Template/task/show.php
@@ -1,4 +1,11 @@
-<?= $this->render('task/details', array('task' => $task, 'project' => $project, 'recurrence_trigger_list' => $this->task->getRecurrenceTriggerList(), 'recurrence_timeframe_list' => $this->task->getRecurrenceTimeframeList(), 'recurrence_basedate_list' => $this->task->getRecurrenceBasedateList())) ?>
+<?= $this->render('task/details', array(
+ 'task' => $task,
+ 'project' => $project,
+ 'recurrence_trigger_list' => $this->task->getRecurrenceTriggerList(),
+ 'recurrence_timeframe_list' => $this->task->getRecurrenceTimeframeList(),
+ 'recurrence_basedate_list' => $this->task->getRecurrenceBasedateList(),
+)) ?>
+
<?= $this->render('task/time', array('task' => $task, 'values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?>
<?= $this->render('task/show_description', array('task' => $task)) ?>
<?= $this->render('tasklink/show', array('task' => $task, 'links' => $links, 'link_label_list' => $link_label_list)) ?>
diff --git a/assets/css/app.css b/assets/css/app.css
index 7ab009a5..82e7fd4b 100644
--- a/assets/css/app.css
+++ b/assets/css/app.css
@@ -641,14 +641,14 @@ div.ui-tooltip {
margin-bottom: 0px;
}
-.tooltip-tasklinks li {
- list-style-type: none;
-}
-
.column-tooltip {
color: #999;
font-size: 0.95em;
}
+
+.ui-tooltip ul {
+ margin-left: 20px;
+}
/* header */
header {
margin-top: 10px;
diff --git a/assets/css/src/tooltip.css b/assets/css/src/tooltip.css
index fb1d5312..f6fa8f15 100644
--- a/assets/css/src/tooltip.css
+++ b/assets/css/src/tooltip.css
@@ -68,11 +68,11 @@ div.ui-tooltip {
margin-bottom: 0px;
}
-.tooltip-tasklinks li {
- list-style-type: none;
-}
-
.column-tooltip {
color: #999;
font-size: 0.95em;
}
+
+.ui-tooltip ul {
+ margin-left: 20px;
+}