diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-04-18 18:44:45 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-04-18 18:44:45 -0400 |
commit | 370b5a0fd7c1dba60e3b973506ba087adba42be0 (patch) | |
tree | 8da109b4fc90062d6eebb69d4ae2efca4da1bac3 /app/Template/project | |
parent | f53bb88d10836e5c31efb958683d8bf3829eecbf (diff) |
Add Slack and Hipchat integrations for each projects
Diffstat (limited to 'app/Template/project')
-rw-r--r-- | app/Template/project/integrations.php | 73 |
1 files changed, 58 insertions, 15 deletions
diff --git a/app/Template/project/integrations.php b/app/Template/project/integrations.php index 4f6553ad..da27e430 100644 --- a/app/Template/project/integrations.php +++ b/app/Template/project/integrations.php @@ -2,20 +2,63 @@ <h2><?= t('Integration with third-party services') ?></h2> </div> -<h3><i class="fa fa-github fa-fw"></i> <?= t('Github webhooks') ?></h3> -<div class="listing"> -<input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'github', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/> -<p class="form-help"><a href="http://kanboard.net/documentation/github-webhooks" target="_blank"><?= t('Help on Github webhooks') ?></a></p> -</div> +<form method="post" action="<?= $this->u('project', 'integration', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->formCsrf() ?> -<h3><img src="assets/img/gitlab-icon.png"/> <?= t('Gitlab webhooks') ?></h3> -<div class="listing"> -<input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'gitlab', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/> -<p class="form-help"><a href="http://kanboard.net/documentation/gitlab-webhooks" target="_blank"><?= t('Help on Gitlab webhooks') ?></a></p> -</div> -<h3><i class="fa fa-bitbucket fa-fw"></i> <?= t('Bitbucket webhooks') ?></h3> -<div class="listing"> -<input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'bitbucket', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/> -<p class="form-help"><a href="http://kanboard.net/documentation/bitbucket-webhooks" target="_blank"><?= t('Help on Bitbucket webhooks') ?></a></p> -</div>
\ No newline at end of file + <h3><i class="fa fa-github fa-fw"></i> <?= t('Github webhooks') ?></h3> + <div class="listing"> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'github', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/> + <p class="form-help"><a href="http://kanboard.net/documentation/github-webhooks" target="_blank"><?= t('Help on Github webhooks') ?></a></p> + </div> + + + <h3><img src="assets/img/gitlab-icon.png"/> <?= t('Gitlab webhooks') ?></h3> + <div class="listing"> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'gitlab', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/> + <p class="form-help"><a href="http://kanboard.net/documentation/gitlab-webhooks" target="_blank"><?= t('Help on Gitlab webhooks') ?></a></p> + </div> + + + <h3><i class="fa fa-bitbucket fa-fw"></i> <?= t('Bitbucket webhooks') ?></h3> + <div class="listing"> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'bitbucket', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/> + <p class="form-help"><a href="http://kanboard.net/documentation/bitbucket-webhooks" target="_blank"><?= t('Help on Bitbucket webhooks') ?></a></p> + </div> + + + <h3><img src="assets/img/hipchat-icon.png"/> <?= t('Hipchat') ?></h3> + <div class="listing"> + <?= $this->formCheckbox('hipchat', t('Send notifications to Hipchat'), 1, isset($values['hipchat']) && $values['hipchat'] == 1) ?> + + <?= $this->formLabel(t('API URL'), 'hipchat_api_url') ?> + <?= $this->formText('hipchat_api_url', $values, $errors) ?> + + <?= $this->formLabel(t('Room API ID or name'), 'hipchat_room_id') ?> + <?= $this->formText('hipchat_room_id', $values, $errors) ?> + + <?= $this->formLabel(t('Room notification token'), 'hipchat_room_token') ?> + <?= $this->formText('hipchat_room_token', $values, $errors) ?> + + <p class="form-help"><a href="http://kanboard.net/documentation/hipchat" target="_blank"><?= t('Help on Hipchat integration') ?></a></p> + + <div class="form-actions"> + <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + </div> + </div> + + + <h3><i class="fa fa-slack fa-fw"></i> <?= t('Slack') ?></h3> + <div class="listing"> + <?= $this->formCheckbox('slack', t('Send notifications to a Slack channel'), 1, isset($values['slack']) && $values['slack'] == 1) ?> + + <?= $this->formLabel(t('Webhook URL'), 'slack_webhook_url') ?> + <?= $this->formText('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 class="form-actions"> + <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + </div> + </div> +</form>
\ No newline at end of file |