Add Slack integration
This commit is contained in:
22
app/Template/config/integrations.php
Normal file
22
app/Template/config/integrations.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Integration with third-party services') ?></h2>
|
||||
</div>
|
||||
|
||||
<form method="post" action="<?= $this->u('config', 'integrations') ?>" autocomplete="off">
|
||||
|
||||
<?= $this->formCsrf() ?>
|
||||
|
||||
<h3><i class="fa fa-slack fa-fw"></i> <?= t('Slack') ?></h3>
|
||||
<div class="listing">
|
||||
<?= $this->formCheckbox('integration_slack_webhook', t('Send notifications to a Slack channel'), 1, $values['integration_slack_webhook'] == 1) ?>
|
||||
|
||||
<?= $this->formLabel(t('Webhook URL'), 'integration_slack_webhook_url') ?>
|
||||
<?= $this->formText('integration_slack_webhook_url', $values, $errors) ?>
|
||||
|
||||
<p class="form-help"><a href="http://kanboard.net/documentation/slack" target="_blank"><?= t('Help on Slack integration') ?></a></p>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
</form>
|
||||
@@ -16,6 +16,9 @@
|
||||
<li>
|
||||
<?= $this->a(t('Currency rates'), 'currency', 'index') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->a(t('Integrations'), 'config', 'integrations') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->a(t('Webhooks'), 'config', 'webhook') ?>
|
||||
</li>
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
<p class="activity-title">
|
||||
<?= e('%s changed the assignee of the task %s to %s',
|
||||
$this->e($author),
|
||||
$this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
|
||||
$this->e($task['assignee_name'] ?: $task['assignee_username'])
|
||||
) ?>
|
||||
<?php $assignee = $task['assignee_name'] ?: $task['assignee_username'] ?>
|
||||
|
||||
<?php if (! empty($assignee)): ?>
|
||||
<?= e('%s changed the assignee of the task %s to %s',
|
||||
$this->e($author),
|
||||
$this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
|
||||
$this->e($assignee)
|
||||
) ?>
|
||||
<?php else: ?>
|
||||
<?= e('%s remove the assignee of the task %s', $this->e($author), $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
<em><?= $this->e($task['title']) ?></em>
|
||||
|
||||
Reference in New Issue
Block a user