Skip to content

Commit

Permalink
Display the author in email notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
fguillot committed Apr 8, 2015
1 parent e41495a commit 4325679
Show file tree
Hide file tree
Showing 18 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/Locale/da_DK/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
// 'Secret key: ' => '',
// 'Test your device' => '',
// 'Assign a color when the task is moved to a specific column' => '',
// '%s via Kanboard' => '',
);
1 change: 1 addition & 0 deletions app/Locale/de_DE/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
// 'Secret key: ' => '',
// 'Test your device' => '',
// 'Assign a color when the task is moved to a specific column' => '',
// '%s via Kanboard' => '',
);
1 change: 1 addition & 0 deletions app/Locale/es_ES/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
// 'Secret key: ' => '',
// 'Test your device' => '',
// 'Assign a color when the task is moved to a specific column' => '',
// '%s via Kanboard' => '',
);
1 change: 1 addition & 0 deletions app/Locale/fi_FI/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
// 'Secret key: ' => '',
// 'Test your device' => '',
// 'Assign a color when the task is moved to a specific column' => '',
// '%s via Kanboard' => '',
);
1 change: 1 addition & 0 deletions app/Locale/fr_FR/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -848,4 +848,5 @@
'Secret key: ' => 'Clé secrète : ',
'Test your device' => 'Testez votre appareil',
'Assign a color when the task is moved to a specific column' => 'Assigner une couleur lorsque la tâche est déplacée dans une colonne spécifique',
'%s via Kanboard' => '%s via Kanboard',
);
1 change: 1 addition & 0 deletions app/Locale/hu_HU/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
// 'Secret key: ' => '',
// 'Test your device' => '',
// 'Assign a color when the task is moved to a specific column' => '',
// '%s via Kanboard' => '',
);
1 change: 1 addition & 0 deletions app/Locale/it_IT/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
// 'Secret key: ' => '',
// 'Test your device' => '',
// 'Assign a color when the task is moved to a specific column' => '',
// '%s via Kanboard' => '',
);
1 change: 1 addition & 0 deletions app/Locale/ja_JP/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
// 'Secret key: ' => '',
// 'Test your device' => '',
// 'Assign a color when the task is moved to a specific column' => '',
// '%s via Kanboard' => '',
);
1 change: 1 addition & 0 deletions app/Locale/nl_NL/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
// 'Secret key: ' => '',
// 'Test your device' => '',
// 'Assign a color when the task is moved to a specific column' => '',
// '%s via Kanboard' => '',
);
1 change: 1 addition & 0 deletions app/Locale/pl_PL/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
// 'Secret key: ' => '',
// 'Test your device' => '',
// 'Assign a color when the task is moved to a specific column' => '',
// '%s via Kanboard' => '',
);
1 change: 1 addition & 0 deletions app/Locale/pt_BR/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
'Secret key: ' => 'Chave secreta:',
'Test your device' => 'Teste o seu dispositivo',
'Assign a color when the task is moved to a specific column' => 'Atribuir uma cor quando a tarefa é movida em uma coluna específica',
// '%s via Kanboard' => '',
);
1 change: 1 addition & 0 deletions app/Locale/ru_RU/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
// 'Secret key: ' => '',
// 'Test your device' => '',
// 'Assign a color when the task is moved to a specific column' => '',
// '%s via Kanboard' => '',
);
1 change: 1 addition & 0 deletions app/Locale/sr_Latn_RS/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
// 'Secret key: ' => '',
// 'Test your device' => '',
// 'Assign a color when the task is moved to a specific column' => '',
// '%s via Kanboard' => '',
);
1 change: 1 addition & 0 deletions app/Locale/sv_SE/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
// 'Secret key: ' => '',
// 'Test your device' => '',
// 'Assign a color when the task is moved to a specific column' => '',
// '%s via Kanboard' => '',
);
1 change: 1 addition & 0 deletions app/Locale/th_TH/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
// 'Secret key: ' => '',
// 'Test your device' => '',
// 'Assign a color when the task is moved to a specific column' => '',
// '%s via Kanboard' => '',
);
1 change: 1 addition & 0 deletions app/Locale/tr_TR/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
// 'Secret key: ' => '',
// 'Test your device' => '',
// 'Assign a color when the task is moved to a specific column' => '',
// '%s via Kanboard' => '',
);
1 change: 1 addition & 0 deletions app/Locale/zh_CN/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,5 @@
'Secret key: ' => '密码:',
'Test your device' => '测试设备',
'Assign a color when the task is moved to a specific column' => '任务移动到指定栏目时设置颜色',
// '%s via Kanboard' => '',
);
9 changes: 8 additions & 1 deletion app/Model/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,18 @@ public function getUsersList($project_id, array $exclude_users = array())
public function sendEmails($template, array $users, array $data)
{
try {

$author = '';

if (Session::isOpen()) {
$author = e('%s via Kanboard', $this->user->getFullname($this->session['user']));
}

$mailer = Swift_Mailer::newInstance($this->container['mailer']);

$message = Swift_Message::newInstance()
->setSubject($this->getMailSubject($template, $data))
->setFrom(array(MAIL_FROM => 'Kanboard'))
->setFrom(array(MAIL_FROM => $author ?: 'Kanboard'))
->setBody($this->getMailContent($template, $data), 'text/html');

foreach ($users as $user) {
Expand Down

0 comments on commit 4325679

Please sign in to comment.