Add configurable list of predefined subjects when sending a task by email
This commit is contained in:
@@ -6,6 +6,7 @@ New features:
|
|||||||
* Automatic action to assign tasks to its creator
|
* Automatic action to assign tasks to its creator
|
||||||
* Add the possibility to create a comment when a task is sent by email
|
* Add the possibility to create a comment when a task is sent by email
|
||||||
* Add dropdown menu to autocomplete email field from project members
|
* Add dropdown menu to autocomplete email field from project members
|
||||||
|
* Add configurable list of predefined subjects when sending a task by email
|
||||||
|
|
||||||
Version 1.0.44 (May 28, 2017)
|
Version 1.0.44 (May 28, 2017)
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
'Assign the task to its creator' => 'Assigner une tâche à son créateur',
|
'Assign the task to its creator' => 'Assigner une tâche à son créateur',
|
||||||
'This task was sent by email to "%s" with subject "%s".' => 'Cette tâche a été envoyée par courrier électronique à « %s » avec le sujet « %s ».',
|
'This task was sent by email to "%s" with subject "%s".' => 'Cette tâche a été envoyée par courrier électronique à « %s » avec le sujet « %s ».',
|
||||||
'Log this action in a comment' => 'Enregistrez cette action dans un commentaire',
|
'Log this action in a comment' => 'Enregistrez cette action dans un commentaire',
|
||||||
|
'Predefined Email Subjects' => 'Sujets de courrier électronique prédéfinis',
|
||||||
|
'Write one subject by line.' => 'Écrivez un sujet par ligne.',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1337,4 +1337,6 @@ return array(
|
|||||||
// 'Assign the task to its creator' => '',
|
// 'Assign the task to its creator' => '',
|
||||||
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
// 'This task was sent by email to "%s" with subject "%s".' => '',
|
||||||
// 'Log this action in a comment' => '',
|
// 'Log this action in a comment' => '',
|
||||||
|
// 'Predefined Email Subjects' => '',
|
||||||
|
// 'Write one subject by line.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,7 +8,12 @@ use PDO;
|
|||||||
use Kanboard\Core\Security\Token;
|
use Kanboard\Core\Security\Token;
|
||||||
use Kanboard\Core\Security\Role;
|
use Kanboard\Core\Security\Role;
|
||||||
|
|
||||||
const VERSION = 123;
|
const VERSION = 124;
|
||||||
|
|
||||||
|
function version_124(PDO $pdo)
|
||||||
|
{
|
||||||
|
$pdo->exec('ALTER TABLE projects ADD COLUMN predefined_email_subjects TEXT');
|
||||||
|
}
|
||||||
|
|
||||||
function version_123(PDO $pdo)
|
function version_123(PDO $pdo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,12 @@ use PDO;
|
|||||||
use Kanboard\Core\Security\Token;
|
use Kanboard\Core\Security\Token;
|
||||||
use Kanboard\Core\Security\Role;
|
use Kanboard\Core\Security\Role;
|
||||||
|
|
||||||
const VERSION = 102;
|
const VERSION = 103;
|
||||||
|
|
||||||
|
function version_103(PDO $pdo)
|
||||||
|
{
|
||||||
|
$pdo->exec('ALTER TABLE projects ADD COLUMN predefined_email_subjects TEXT');
|
||||||
|
}
|
||||||
|
|
||||||
function version_102(PDO $pdo)
|
function version_102(PDO $pdo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,12 @@ use Kanboard\Core\Security\Token;
|
|||||||
use Kanboard\Core\Security\Role;
|
use Kanboard\Core\Security\Role;
|
||||||
use PDO;
|
use PDO;
|
||||||
|
|
||||||
const VERSION = 114;
|
const VERSION = 115;
|
||||||
|
|
||||||
|
function version_115(PDO $pdo)
|
||||||
|
{
|
||||||
|
$pdo->exec('ALTER TABLE projects ADD COLUMN predefined_email_subjects TEXT');
|
||||||
|
}
|
||||||
|
|
||||||
function version_114(PDO $pdo)
|
function version_114(PDO $pdo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,5 +63,11 @@
|
|||||||
<?= $this->form->number('priority_end', $values, $errors, array('tabindex="10"')) ?>
|
<?= $this->form->number('priority_end', $values, $errors, array('tabindex="10"')) ?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend><?= t('Predefined Email Subjects') ?></legend>
|
||||||
|
<?= $this->form->textarea('predefined_email_subjects', $values, $errors, array('tabindex="11"')) ?>
|
||||||
|
<p class="form-help"><?= t('Write one subject by line.') ?></p>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
<?= $this->modal->submitButtons(array('tabindex' => 11)) ?>
|
<?= $this->modal->submitButtons(array('tabindex' => 11)) ?>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -22,6 +22,22 @@
|
|||||||
|
|
||||||
<?= $this->form->label(t('Subject'), 'subject') ?>
|
<?= $this->form->label(t('Subject'), 'subject') ?>
|
||||||
<?= $this->form->text('subject', $values, $errors, array('required', 'tabindex="2"')) ?>
|
<?= $this->form->text('subject', $values, $errors, array('required', 'tabindex="2"')) ?>
|
||||||
|
<?php if (! empty($project['predefined_email_subjects'])): ?>
|
||||||
|
<div class="dropdown">
|
||||||
|
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-archive"></i><i class="fa fa-caret-down"></i></a>
|
||||||
|
<ul>
|
||||||
|
<?php foreach (explode("\r\n", trim($project['predefined_email_subjects'])) as $subject): ?>
|
||||||
|
<?php $subject = trim($subject); ?>
|
||||||
|
|
||||||
|
<?php if (! empty($subject)): ?>
|
||||||
|
<li data-subject="<?= $this->text->e($subject) ?>" class="js-autocomplete-subject">
|
||||||
|
<?= $this->text->e($subject) ?>
|
||||||
|
</li>
|
||||||
|
<?php endif ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
<?= $this->form->checkbox('add_comment', t('Log this action in a comment'), 1) ?>
|
<?= $this->form->checkbox('add_comment', t('Log this action in a comment'), 1) ?>
|
||||||
|
|
||||||
|
|||||||
4
assets/js/app.min.js
vendored
4
assets/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -10,3 +10,16 @@ KB.onClick('.js-autocomplete-email', function (e) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
KB.onClick('.js-autocomplete-subject', function (e) {
|
||||||
|
var subject = KB.dom(e.target).data('subject');
|
||||||
|
|
||||||
|
if (subject) {
|
||||||
|
var subjectField = KB.find('.js-task-mail-form input[name="subject"]');
|
||||||
|
|
||||||
|
if (subjectField) {
|
||||||
|
subjectField.attr('value', subject);
|
||||||
|
_KB.controllers['Dropdown'].close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user