Skip to content

Commit

Permalink
Update to the latest version of KB
Browse files Browse the repository at this point in the history
  • Loading branch information
fguillot committed May 8, 2016
1 parent c10149c commit ae3f3fc
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Notification/Slack.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public function notifyProject(array $project, $event_name, array $event_data)
* @param array $project
* @param string $event_name
* @param array $event_data
* @return array
*/
public function getMessage(array $project, $event_name, array $event_data)
{
Expand Down Expand Up @@ -88,7 +89,7 @@ public function getMessage(array $project, $event_name, array $event_data)
* Send message to Slack
*
* @access private
* @param srting $webhook
* @param string $webhook
* @param string $channel
* @param array $project
* @param string $event_name
Expand Down
9 changes: 5 additions & 4 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ public function initialize()

$this->userNotificationType->setType('slack', t('Slack'), '\Kanboard\Plugin\Slack\Notification\Slack');
$this->projectNotificationType->setType('slack', t('Slack'), '\Kanboard\Plugin\Slack\Notification\Slack');
}

$this->on('app.bootstrap', function($container) {
Translator::load($container['config']->getCurrentLanguage(), __DIR__.'/Locale');
});
public function onStartup()
{
Translator::load($this->language->getCurrentLanguage(), __DIR__.'/Locale');
}

public function getPluginDescription()
Expand All @@ -39,7 +40,7 @@ public function getPluginAuthor()

public function getPluginVersion()
{
return '1.0.2';
return '1.0.3';
}

public function getPluginHomepage()
Expand Down
4 changes: 2 additions & 2 deletions Template/config/integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<?= $this->form->label(t('Webhook URL'), 'slack_webhook_url') ?>
<?= $this->form->text('slack_webhook_url', $values) ?>

<p class="form-help"><a href="https://github.com/kanboard/plugin-slack" target="_blank"><?= t('Help on Slack integration') ?></a></p>
<p class="form-help"><a href="https://kanboard.net/plugin/slack" target="_blank"><?= t('Help on Slack integration') ?></a></p>

<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions Template/project/integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<?= $this->form->label(t('Channel/Group/User (Optional)'), 'slack_webhook_channel') ?>
<?= $this->form->text('slack_webhook_channel', $values, array(), array('placeholder="#channel"')) ?>

<p class="form-help"><a href="https://github.com/kanboard/plugin-slack" target="_blank"><?= t('Help on Slack integration') ?></a></p>
<p class="form-help"><a href="https://kanboard.net/plugin/slack" target="_blank"><?= t('Help on Slack integration') ?></a></p>

<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions Template/user/integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<?= $this->form->label(t('Channel/Group/User (Optional)'), 'slack_webhook_channel') ?>
<?= $this->form->text('slack_webhook_channel', $values, array(), array('placeholder="@username"')) ?>

<p class="form-help"><a href="https://github.com/kanboard/plugin-slack" target="_blank"><?= t('Help on Slack integration') ?></a></p>
<p class="form-help"><a href="https://kanboard.net/plugin/slack" target="_blank"><?= t('Help on Slack integration') ?></a></p>

<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
</div>
</div>
</div>
1 change: 1 addition & 0 deletions Test/PluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public function testPlugin()
{
$plugin = new Plugin($this->container);
$this->assertSame(null, $plugin->initialize());
$this->assertSame(null, $plugin->onStartup());
$this->assertNotEmpty($plugin->getPluginName());
$this->assertNotEmpty($plugin->getPluginDescription());
$this->assertNotEmpty($plugin->getPluginAuthor());
Expand Down

0 comments on commit ae3f3fc

Please sign in to comment.