Add story points for tasks
This commit is contained in:
parent
565290fbf9
commit
44fc9c081f
|
|
@ -115,6 +115,7 @@ input[type="checkbox"] {
|
|||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
input[type="number"],
|
||||
input[type="date"],
|
||||
input[type="email"],
|
||||
input[type="tel"],
|
||||
|
|
@ -130,6 +131,7 @@ input[type="text"] {
|
|||
appearance: none;
|
||||
}
|
||||
|
||||
input[type="number"]:focus,
|
||||
input[type="date"]:focus,
|
||||
input[type="email"]:focus,
|
||||
input[type="tel"]:focus,
|
||||
|
|
@ -142,6 +144,10 @@ textarea:focus {
|
|||
box-shadow: 0 0 8px rgba(82, 168, 236, 0.6);
|
||||
}
|
||||
|
||||
input[type="number"] {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
border: 1px solid #ccc;
|
||||
padding: 3px;
|
||||
|
|
@ -494,11 +500,35 @@ div.task a:hover {
|
|||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#infos,
|
||||
div.task {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.task-score {
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
div.task .task-score {
|
||||
font-size: 1.5em;
|
||||
right: 5px;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* task view */
|
||||
article.task li {
|
||||
margin-left: 20px;
|
||||
list-style-type: square;
|
||||
}
|
||||
|
||||
article .task-score {
|
||||
font-size: 1.9em;
|
||||
right: 10px;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
/* task colors */
|
||||
tr td.task-blue,
|
||||
.task-blue {
|
||||
background-color: rgb(219, 235, 255);
|
||||
|
|
|
|||
|
|
@ -230,3 +230,8 @@ function form_date($name, $values = array(), array $errors = array(), array $att
|
|||
{
|
||||
return form_input('date', $name, $values, $errors, $attributes, $class);
|
||||
}
|
||||
|
||||
function form_number($name, $values = array(), array $errors = array(), array $attributes = array(), $class = '')
|
||||
{
|
||||
return form_input('number', $name, $values, $errors, $attributes, $class);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -186,4 +186,5 @@ return array(
|
|||
'Timezone' => 'Fuseau horaire',
|
||||
'Sorry, I didn\'t found this information in my database!' => 'Désolé, je n\'ai pas trouvé cette information dans ma base de données !',
|
||||
'Page not found' => 'Page introuvable',
|
||||
'Story Points' => 'Complexité',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -186,4 +186,5 @@ return array(
|
|||
'Timezone' => 'Strefa czasowa',
|
||||
//'Sorry, I didn\'t found this information in my database!' => '',
|
||||
//'Page not found' => '',
|
||||
//'Story Points' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ require __DIR__.'/schema.php';
|
|||
abstract class Base
|
||||
{
|
||||
const APP_VERSION = 'master';
|
||||
const DB_VERSION = 4;
|
||||
const DB_VERSION = 5;
|
||||
const DB_FILENAME = 'data/db.sqlite';
|
||||
|
||||
private static $dbInstance = null;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
namespace Schema;
|
||||
|
||||
function version_5($pdo)
|
||||
{
|
||||
$pdo->exec("ALTER TABLE tasks ADD column score INTEGER");
|
||||
}
|
||||
|
||||
function version_4($pdo)
|
||||
{
|
||||
$pdo->exec("ALTER TABLE config ADD column timezone TEXT DEFAULT 'UTC'");
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ class Task extends Base
|
|||
self::TABLE.'.owner_id',
|
||||
self::TABLE.'.position',
|
||||
self::TABLE.'.is_active',
|
||||
self::TABLE.'.score',
|
||||
\Model\Project::TABLE.'.name AS project_name',
|
||||
\Model\Board::TABLE.'.title AS column_title',
|
||||
\Model\User::TABLE.'.username'
|
||||
|
|
@ -71,6 +72,7 @@ class Task extends Base
|
|||
self::TABLE.'.owner_id',
|
||||
self::TABLE.'.position',
|
||||
self::TABLE.'.is_active',
|
||||
self::TABLE.'.score',
|
||||
\Model\Board::TABLE.'.title AS column_title',
|
||||
\Model\User::TABLE.'.username'
|
||||
)
|
||||
|
|
@ -95,7 +97,7 @@ class Task extends Base
|
|||
{
|
||||
return $this->db
|
||||
->table(self::TABLE)
|
||||
->columns('tasks.id', 'title', 'color_id', 'project_id', 'owner_id', 'column_id', 'position', 'users.username')
|
||||
->columns('tasks.id', 'title', 'color_id', 'project_id', 'owner_id', 'column_id', 'position', 'score', 'users.username')
|
||||
->join('users', 'id', 'owner_id')
|
||||
->eq('project_id', $project_id)
|
||||
->eq('column_id', $column_id)
|
||||
|
|
@ -179,6 +181,7 @@ class Task extends Base
|
|||
new Validators\Required('column_id', t('The column is required')),
|
||||
new Validators\Integer('column_id', t('This value must be an integer')),
|
||||
new Validators\Integer('owner_id', t('This value must be an integer')),
|
||||
new Validators\Integer('score', t('This value must be an integer')),
|
||||
new Validators\Required('title', t('The title is required')),
|
||||
new Validators\MaxLength('title', t('The maximum length is %d characters', 200), 200),
|
||||
));
|
||||
|
|
@ -200,6 +203,7 @@ class Task extends Base
|
|||
new Validators\Required('column_id', t('The column is required')),
|
||||
new Validators\Integer('column_id', t('This value must be an integer')),
|
||||
new Validators\Integer('owner_id', t('This value must be an integer')),
|
||||
new Validators\Integer('score', t('This value must be an integer')),
|
||||
new Validators\Required('title', t('The title is required')),
|
||||
new Validators\MaxLength('title', t('The maximum length is %d characters', 200), 200),
|
||||
));
|
||||
|
|
|
|||
|
|
@ -52,6 +52,10 @@
|
|||
<?php endif ?>
|
||||
</span>
|
||||
|
||||
<?php if ($task['score']): ?>
|
||||
<span class="task-score"><?= Helper\escape($task['score']) ?></span>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="task-title">
|
||||
<?= Helper\escape($task['title']) ?>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,10 @@
|
|||
<?php endif ?>
|
||||
</span>
|
||||
|
||||
<?php if ($task['score']): ?>
|
||||
<span class="task-score"><?= Helper\escape($task['score']) ?></span>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="task-title">
|
||||
<?= Helper\escape($task['title']) ?>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@
|
|||
<?= Helper\form_label(t('Assignee'), 'owner_id') ?>
|
||||
<?= Helper\form_select('owner_id', $users_list, $values, $errors) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Story Points'), 'score') ?>
|
||||
<?= Helper\form_number('score', $values, $errors) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Description'), 'description') ?>
|
||||
<?= Helper\form_textarea('description', $values, $errors) ?><br/>
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@
|
|||
<?= Helper\form_label(t('Assignee'), 'owner_id') ?>
|
||||
<?= Helper\form_select('owner_id', $users_list, $values, $errors) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Story Points'), 'score') ?>
|
||||
<?= Helper\form_number('score', $values, $errors) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Description'), 'description') ?>
|
||||
<?= Helper\form_textarea('description', $values, $errors) ?><br/>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
<section>
|
||||
<h3><?= t('Details') ?></h3>
|
||||
<article id="infos" class="task task-<?= $task['color_id'] ?>">
|
||||
<?php if ($task['score']): ?>
|
||||
<span class="task-score"><?= Helper\escape($task['score']) ?></span>
|
||||
<?php endif ?>
|
||||
<ul>
|
||||
<li>
|
||||
<?= dt('Created on %B %e, %G at %k:%M %p', $task['date_creation']) ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue