Project priority is always rendered now
This commit is contained in:
@@ -143,16 +143,12 @@ class TaskHelper extends Base
|
||||
|
||||
public function renderPriorityField(array $project, array $values)
|
||||
{
|
||||
$html = '';
|
||||
$range = range($project['priority_start'], $project['priority_end']);
|
||||
$options = array_combine($range, $range);
|
||||
$values += array('priority' => $project['priority_default']);
|
||||
|
||||
if ($project['priority_end'] != $project['priority_start']) {
|
||||
$range = range($project['priority_start'], $project['priority_end']);
|
||||
$options = array_combine($range, $range);
|
||||
$values += array('priority' => $project['priority_default']);
|
||||
|
||||
$html .= $this->helper->form->label(t('Priority'), 'priority');
|
||||
$html .= $this->helper->form->select('priority', $options, $values, array(), array('tabindex="7"'));
|
||||
}
|
||||
$html = $this->helper->form->label(t('Priority'), 'priority');
|
||||
$html .= $this->helper->form->select('priority', $options, $values, array(), array('tabindex="7"'));
|
||||
|
||||
return $html;
|
||||
}
|
||||
@@ -211,15 +207,11 @@ class TaskHelper extends Base
|
||||
return $this->helper->form->date(t('Due Date'), 'date_due', $values, $errors, $attributes);
|
||||
}
|
||||
|
||||
public function formatPriority(array $project, array $task)
|
||||
public function renderPriority($priority)
|
||||
{
|
||||
$html = '';
|
||||
|
||||
if ($project['priority_end'] != $project['priority_start']) {
|
||||
$html .= '<span class="task-board-priority" title="'.t('Task priority').'">';
|
||||
$html .= $task['priority'] >= 0 ? 'P'.$task['priority'] : '-P'.abs($task['priority']);
|
||||
$html .= '</span>';
|
||||
}
|
||||
$html = '<span class="task-priority" title="'.t('Task priority').'">';
|
||||
$html .= $this->helper->text->e($priority >= 0 ? 'P'.$priority : '-P'.abs($priority));
|
||||
$html .= '</span>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<span class="task-board-closed"><i class="fa fa-ban fa-fw"></i><?= t('Closed') ?></span>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->task->formatPriority($project, $task) ?>
|
||||
<?= $this->task->renderPriority($task['priority']) ?>
|
||||
|
||||
<?= $this->hook->render('template:board:task:icons', array('task' => $task)) ?>
|
||||
</div>
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
|
||||
<?= $this->form->label(t('Highest priority'), 'priority_end') ?>
|
||||
<?= $this->form->number('priority_end', $values, $errors, array('tabindex="10"')) ?>
|
||||
<p class="form-help"><?= t('If you put zero to the low and high priority, this feature will be disabled.') ?></p>
|
||||
</fieldset>
|
||||
|
||||
<?= $this->modal->submitButtons(array('tabindex' => 11)) ?>
|
||||
|
||||
@@ -90,5 +90,5 @@
|
||||
<span class="task-board-closed"><i class="fa fa-ban fa-fw"></i><?= t('Closed') ?></span>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->task->formatPriority($project, $task) ?>
|
||||
<?= $this->task->renderPriority($task['priority']) ?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user