Add a "Me" button to assignee form element
This commit is contained in:
@@ -10,6 +10,7 @@ Breaking changes:
|
|||||||
|
|
||||||
New features:
|
New features:
|
||||||
|
|
||||||
|
* Add a "Me" button to assignee form element
|
||||||
* Add external links for tasks with plugin api
|
* Add external links for tasks with plugin api
|
||||||
* Add project owner (Directly Responsible Individual)
|
* Add project owner (Directly Responsible Individual)
|
||||||
* Add configurable task priority
|
* Add configurable task priority
|
||||||
|
|||||||
@@ -45,6 +45,17 @@ class Task extends Base
|
|||||||
return $this->taskPermission->canRemoveTask($task);
|
return $this->taskPermission->canRemoveTask($task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function selectAssignee(array $users, array $values, array $errors = array(), array $attributes = array())
|
||||||
|
{
|
||||||
|
$attributes = array_merge(array('tabindex="3"'), $attributes);
|
||||||
|
|
||||||
|
$html = $this->helper->form->label(t('Assignee'), 'owner_id');
|
||||||
|
$html .= $this->helper->form->select('owner_id', $users, $values, $errors, $attributes);
|
||||||
|
$html .= '<a href="#" class="assign-me" data-target-id="form-owner_id" data-current-id="'.$this->userSession->getId().'" title="'.t('Assign to me').'">'.t('Me').'</a>';
|
||||||
|
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
public function selectPriority(array $project, array $values)
|
public function selectPriority(array $project, array $values)
|
||||||
{
|
{
|
||||||
$html = '';
|
$html = '';
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1126,4 +1126,6 @@ return array(
|
|||||||
'There is no external link for the moment.' => 'Il n\'y a pas de lien externe pour le moment.',
|
'There is no external link for the moment.' => 'Il n\'y a pas de lien externe pour le moment.',
|
||||||
'Internal links' => 'Liens internes',
|
'Internal links' => 'Liens internes',
|
||||||
'There is no internal link for the moment.' => 'Il n\'y a pas de lien interne pour le moment.',
|
'There is no internal link for the moment.' => 'Il n\'y a pas de lien interne pour le moment.',
|
||||||
|
'Assign to me' => 'Assigner à moi',
|
||||||
|
'Me' => 'Moi',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1123,4 +1123,6 @@ return array(
|
|||||||
// 'There is no external link for the moment.' => '',
|
// 'There is no external link for the moment.' => '',
|
||||||
// 'Internal links' => '',
|
// 'Internal links' => '',
|
||||||
// 'There is no internal link for the moment.' => '',
|
// 'There is no internal link for the moment.' => '',
|
||||||
|
// 'Assign to me' => '',
|
||||||
|
// 'Me' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -9,8 +9,7 @@
|
|||||||
<?= $this->form->hidden('id', $values) ?>
|
<?= $this->form->hidden('id', $values) ?>
|
||||||
<?= $this->form->hidden('project_id', $values) ?>
|
<?= $this->form->hidden('project_id', $values) ?>
|
||||||
|
|
||||||
<?= $this->form->label(t('Assignee'), 'owner_id') ?>
|
<?= $this->task->selectAssignee($users_list, $values, array(), array('autofocus')) ?>
|
||||||
<?= $this->form->select('owner_id', $users_list, $values, array(), array('autofocus')) ?><br/>
|
|
||||||
|
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||||
|
|||||||
@@ -48,8 +48,7 @@
|
|||||||
<div class="form-column">
|
<div class="form-column">
|
||||||
<?= $this->form->hidden('project_id', $values) ?>
|
<?= $this->form->hidden('project_id', $values) ?>
|
||||||
|
|
||||||
<?= $this->form->label(t('Assignee'), 'owner_id') ?>
|
<?= $this->task->selectAssignee($users_list, $values, $errors) ?>
|
||||||
<?= $this->form->select('owner_id', $users_list, $values, $errors, array('tabindex="3"')) ?>
|
|
||||||
|
|
||||||
<?= $this->form->label(t('Category'), 'category_id') ?>
|
<?= $this->form->label(t('Category'), 'category_id') ?>
|
||||||
<?= $this->form->select('category_id', $categories_list, $values, $errors, array('tabindex="4"')) ?>
|
<?= $this->form->select('category_id', $categories_list, $values, $errors, array('tabindex="4"')) ?>
|
||||||
|
|||||||
@@ -44,8 +44,7 @@
|
|||||||
<?= $this->form->hidden('id', $values) ?>
|
<?= $this->form->hidden('id', $values) ?>
|
||||||
<?= $this->form->hidden('project_id', $values) ?>
|
<?= $this->form->hidden('project_id', $values) ?>
|
||||||
|
|
||||||
<?= $this->form->label(t('Assignee'), 'owner_id') ?>
|
<?= $this->task->selectAssignee($users_list, $values, $errors) ?>
|
||||||
<?= $this->form->select('owner_id', $users_list, $values, $errors, array('tabindex="3"')) ?>
|
|
||||||
|
|
||||||
<?= $this->form->label(t('Category'), 'category_id') ?>
|
<?= $this->form->label(t('Category'), 'category_id') ?>
|
||||||
<?= $this->form->select('category_id', $categories_list, $values, $errors, array('tabindex="4"')) ?>
|
<?= $this->form->select('category_id', $categories_list, $values, $errors, array('tabindex="4"')) ?>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -329,3 +329,9 @@ div.color-square-selected {
|
|||||||
height: 28px;
|
height: 28px;
|
||||||
box-shadow: 3px 2px 10px 0 rgba(180,180,180,0.9);
|
box-shadow: 3px 2px 10px 0 rgba(180,180,180,0.9);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Assign to me */
|
||||||
|
.assign-me {
|
||||||
|
font-size: 0.8em;
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -7,4 +7,15 @@ Task.prototype.listen = function() {
|
|||||||
$(this).addClass("color-square-selected");
|
$(this).addClass("color-square-selected");
|
||||||
$("#form-color_id").val($(this).data("color-id"));
|
$("#form-color_id").val($(this).data("color-id"));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on("click", ".assign-me", function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
var currentId = $(this).data("current-id");
|
||||||
|
var dropdownId = "#" + $(this).data("target-id");
|
||||||
|
|
||||||
|
if ($(dropdownId + ' option[value=' + currentId + ']').length) {
|
||||||
|
$(dropdownId).val(currentId);
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user