summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Controller/Doc.php51
-rw-r--r--app/Helper/Url.php13
-rw-r--r--app/Locale/cs_CZ/translations.php7
-rw-r--r--app/Locale/da_DK/translations.php7
-rw-r--r--app/Locale/de_DE/translations.php7
-rw-r--r--app/Locale/es_ES/translations.php7
-rw-r--r--app/Locale/fi_FI/translations.php7
-rw-r--r--app/Locale/fr_FR/translations.php7
-rw-r--r--app/Locale/hu_HU/translations.php7
-rw-r--r--app/Locale/it_IT/translations.php7
-rw-r--r--app/Locale/ja_JP/translations.php7
-rw-r--r--app/Locale/nb_NO/translations.php7
-rw-r--r--app/Locale/nl_NL/translations.php7
-rw-r--r--app/Locale/pl_PL/translations.php7
-rw-r--r--app/Locale/pt_BR/translations.php7
-rw-r--r--app/Locale/pt_PT/translations.php7
-rw-r--r--app/Locale/ru_RU/translations.php7
-rw-r--r--app/Locale/sr_Latn_RS/translations.php7
-rw-r--r--app/Locale/sv_SE/translations.php7
-rw-r--r--app/Locale/th_TH/translations.php7
-rw-r--r--app/Locale/tr_TR/translations.php7
-rw-r--r--app/Locale/zh_CN/translations.php7
-rw-r--r--app/Template/app/filters_helper.php3
-rw-r--r--app/Template/category/edit.php2
-rw-r--r--app/Template/column/edit.php2
-rw-r--r--app/Template/column/index.php2
-rw-r--r--app/Template/comment/create.php2
-rw-r--r--app/Template/comment/edit.php2
-rw-r--r--app/Template/config/integrations.php18
-rw-r--r--app/Template/config/sidebar.php3
-rw-r--r--app/Template/doc/show.php13
-rw-r--r--app/Template/project/edit.php2
-rw-r--r--app/Template/project/integrations.php12
-rw-r--r--app/Template/project/users.php1
-rw-r--r--app/Template/search/index.php2
-rw-r--r--app/Template/task_creation/form.php2
-rw-r--r--app/Template/task_modification/edit_description.php2
37 files changed, 246 insertions, 26 deletions
diff --git a/app/Controller/Doc.php b/app/Controller/Doc.php
new file mode 100644
index 00000000..19644b84
--- /dev/null
+++ b/app/Controller/Doc.php
@@ -0,0 +1,51 @@
+<?php
+
+namespace Controller;
+
+use Parsedown;
+
+/**
+ * Documentation controller
+ *
+ * @package controller
+ * @author Frederic Guillot
+ */
+class Doc extends Base
+{
+ private function readFile($filename)
+ {
+ $url = $this->helper->url;
+ $data = file_get_contents($filename);
+ list($title,, $content) = explode("\n", $data, 3);
+
+ $replaceUrl = function (array $matches) use ($url) {
+ return '('.$url->to('doc', 'show', array('file' => str_replace('.markdown', '', $matches[1]))).')';
+ };
+
+ $content = preg_replace_callback('/\((.*.markdown)\)/', $replaceUrl, $data);
+
+ return array(
+ 'content' => Parsedown::instance()->text($content),
+ 'title' => $title !== 'Documentation' ? t('Documentation: %s', $title) : $title,
+ );
+ }
+
+ public function show()
+ {
+ $filename = $this->request->getStringParam('file', 'index');
+
+ if (! preg_match('/^[a-z0-9\-]+/', $filename)) {
+ $filename = 'index';
+ }
+
+ $filename = __DIR__.'/../../doc/'.$filename.'.markdown';
+
+ if (! file_exists($filename)) {
+ $filename = __DIR__.'/../../doc/index.markdown';
+ }
+
+ $this->response->html($this->template->layout('doc/show', $this->readFile($filename) + array(
+ 'board_selector' => $this->projectPermission->getAllowedProjects($this->userSession->getId()),
+ )));
+ }
+}
diff --git a/app/Helper/Url.php b/app/Helper/Url.php
index 964e0762..22e9035e 100644
--- a/app/Helper/Url.php
+++ b/app/Helper/Url.php
@@ -17,6 +17,19 @@ class Url extends \Core\Base
private $directory = '';
/**
+ * Helper to generate a link to the documentation
+ *
+ * @access public
+ * @param string $label
+ * @param string $file
+ * @return string
+ */
+ public function doc($label, $file)
+ {
+ return $this->link($label, 'doc', 'show', array('file' => $file), false, '', '', true);
+ }
+
+ /**
* HTML Link tag
*
* @access public
diff --git a/app/Locale/cs_CZ/translations.php b/app/Locale/cs_CZ/translations.php
index 6eefa33f..557a62cc 100644
--- a/app/Locale/cs_CZ/translations.php
+++ b/app/Locale/cs_CZ/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php
index 35634be8..6a41f065 100644
--- a/app/Locale/da_DK/translations.php
+++ b/app/Locale/da_DK/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php
index 9e3097fd..7b38e9fc 100644
--- a/app/Locale/de_DE/translations.php
+++ b/app/Locale/de_DE/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php
index 43122ea3..ac7c0e4b 100644
--- a/app/Locale/es_ES/translations.php
+++ b/app/Locale/es_ES/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php
index fc517b0b..d8c749a3 100644
--- a/app/Locale/fi_FI/translations.php
+++ b/app/Locale/fi_FI/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php
index c63fb60b..0c95c7eb 100644
--- a/app/Locale/fr_FR/translations.php
+++ b/app/Locale/fr_FR/translations.php
@@ -1062,4 +1062,11 @@ return array(
'Gitlab Account' => 'Compte Gitlab',
'Link my Gitlab Account' => 'Lier mon compte Gitlab',
'Unlink my Gitlab Account' => 'Ne plus utiliser mon compte Gitlab',
+ 'Documentation: %s' => 'Documentation : %s',
+ 'Switch to the Gantt chart view' => 'Passer à la vue en diagramme de Gantt',
+ 'Reset the search/filter box' => 'Réinitialiser le champ de recherche',
+ 'Documentation' => 'Documentation',
+ 'Table of contents' => 'Table des matières',
+ 'Gantt' => 'Gantt',
+ 'Help with project permissions' => 'Aide avec les permissions des projets',
);
diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php
index 9218c6d3..b346f1e3 100644
--- a/app/Locale/hu_HU/translations.php
+++ b/app/Locale/hu_HU/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php
index a8b33e8b..06e2c5ca 100644
--- a/app/Locale/it_IT/translations.php
+++ b/app/Locale/it_IT/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php
index 1ab82170..cb8c550b 100644
--- a/app/Locale/ja_JP/translations.php
+++ b/app/Locale/ja_JP/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/nb_NO/translations.php b/app/Locale/nb_NO/translations.php
index dae6507a..155d49b4 100644
--- a/app/Locale/nb_NO/translations.php
+++ b/app/Locale/nb_NO/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/nl_NL/translations.php b/app/Locale/nl_NL/translations.php
index 1f52faae..23d64163 100644
--- a/app/Locale/nl_NL/translations.php
+++ b/app/Locale/nl_NL/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php
index 900cf8d9..9947cf31 100644
--- a/app/Locale/pl_PL/translations.php
+++ b/app/Locale/pl_PL/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php
index 1de6cb9a..6aa2f4dd 100644
--- a/app/Locale/pt_BR/translations.php
+++ b/app/Locale/pt_BR/translations.php
@@ -1060,4 +1060,11 @@ return array(
'Gitlab Account' => 'Conta Gitlab',
'Link my Gitlab Account' => 'Vincular minha conta Gitlab',
'Unlink my Gitlab Account' => 'Desvincular minha conta Gitlab',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/pt_PT/translations.php b/app/Locale/pt_PT/translations.php
index 1701bb11..d19a31ec 100644
--- a/app/Locale/pt_PT/translations.php
+++ b/app/Locale/pt_PT/translations.php
@@ -1060,4 +1060,11 @@ return array(
'Gitlab Account' => 'Conta Gitlab',
'Link my Gitlab Account' => 'Connectar a minha Conta Gitlab',
'Unlink my Gitlab Account' => 'Desconectar a minha Conta Gitlab',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php
index bd2d7c6b..feb1b684 100644
--- a/app/Locale/ru_RU/translations.php
+++ b/app/Locale/ru_RU/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/sr_Latn_RS/translations.php b/app/Locale/sr_Latn_RS/translations.php
index 2decbd68..0bc5c248 100644
--- a/app/Locale/sr_Latn_RS/translations.php
+++ b/app/Locale/sr_Latn_RS/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php
index 79d5ec17..9c769724 100644
--- a/app/Locale/sv_SE/translations.php
+++ b/app/Locale/sv_SE/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php
index 959b5f38..a5ed2474 100644
--- a/app/Locale/th_TH/translations.php
+++ b/app/Locale/th_TH/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php
index 45ba9d27..9eb5c41e 100644
--- a/app/Locale/tr_TR/translations.php
+++ b/app/Locale/tr_TR/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php
index eddb261a..910bc0b4 100644
--- a/app/Locale/zh_CN/translations.php
+++ b/app/Locale/zh_CN/translations.php
@@ -1060,4 +1060,11 @@ return array(
// 'Gitlab Account' => '',
// 'Link my Gitlab Account' => '',
// 'Unlink my Gitlab Account' => '',
+ // 'Documentation: %s' => '',
+ // 'Switch to the Gantt chart view' => '',
+ // 'Reset the search/filter box' => '',
+ // 'Documentation' => '',
+ // 'Table of contents' => '',
+ // 'Gantt' => '',
+ // 'Help with project permissions' => '',
);
diff --git a/app/Template/app/filters_helper.php b/app/Template/app/filters_helper.php
index b7a0bba6..529aa6a5 100644
--- a/app/Template/app/filters_helper.php
+++ b/app/Template/app/filters_helper.php
@@ -12,8 +12,7 @@
<li><a href="#" class="filter-helper" data-filter="status:open assignee:nobody"><?= t('Not assigned') ?></a></li>
<li><a href="#" class="filter-helper" data-filter="status:open category:none"><?= t('No category') ?></a></li>
<li>
- <i class="fa fa-external-link"></i>
- <a href="http://kanboard.net/documentation/search" target="_blank"><?= t('View advanced search syntax') ?></a>
+ <?= $this->url->doc(t('View advanced search syntax'), 'search') ?>
</li>
</ul>
</div> \ No newline at end of file
diff --git a/app/Template/category/edit.php b/app/Template/category/edit.php
index f844eea4..1aae2f2a 100644
--- a/app/Template/category/edit.php
+++ b/app/Template/category/edit.php
@@ -30,7 +30,7 @@
</li>
</ul>
</div>
- <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
+ <div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/column/edit.php b/app/Template/column/edit.php
index 691cff00..a17affd8 100644
--- a/app/Template/column/edit.php
+++ b/app/Template/column/edit.php
@@ -34,7 +34,7 @@
</li>
</ul>
</div>
- <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
+ <div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/column/index.php b/app/Template/column/index.php
index a394ee67..689cbbf5 100644
--- a/app/Template/column/index.php
+++ b/app/Template/column/index.php
@@ -81,7 +81,7 @@
</li>
</ul>
</div>
- <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
+ <div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div>
<div class="form-actions">
<input type="submit" value="<?= t('Add this column') ?>" class="btn btn-blue"/>
diff --git a/app/Template/comment/create.php b/app/Template/comment/create.php
index 8c66d9a4..8bcbe0f7 100644
--- a/app/Template/comment/create.php
+++ b/app/Template/comment/create.php
@@ -24,7 +24,7 @@
</div>
</div>
- <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
+ <div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/comment/edit.php b/app/Template/comment/edit.php
index d67aa387..e01f3da4 100644
--- a/app/Template/comment/edit.php
+++ b/app/Template/comment/edit.php
@@ -26,7 +26,7 @@
</div>
</div>
- <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
+ <div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div>
<div class="form-actions">
<input type="submit" value="<?= t('Update') ?>" class="btn btn-blue"/>
diff --git a/app/Template/config/integrations.php b/app/Template/config/integrations.php
index ddbd73dd..4e24a270 100644
--- a/app/Template/config/integrations.php
+++ b/app/Template/config/integrations.php
@@ -9,37 +9,37 @@
<h3><i class="fa fa-google"></i> <?= t('Google Authentication') ?></h3>
<div class="listing">
<input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('oauth', 'google', array(), false, '', true) ?>"/><br/>
- <p class="form-help"><a href="http://kanboard.net/documentation/google-authentication" target="_blank"><?= t('Help on Google authentication') ?></a></p>
+ <p class="form-help"><?= $this->url->doc(t('Help on Google authentication'), 'google-authentication') ?></p>
</div>
<h3><i class="fa fa-github"></i> <?= t('Github Authentication') ?></h3>
<div class="listing">
<input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('oauth', 'github', array(), false, '', true) ?>"/><br/>
- <p class="form-help"><a href="http://kanboard.net/documentation/github-authentication" target="_blank"><?= t('Help on Github authentication') ?></a></p>
+ <p class="form-help"><?= $this->url->doc(t('Help on Github authentication'), 'github-authentication') ?></p>
</div>
<h3><img src="<?= $this->url->dir() ?>assets/img/gitlab-icon.png"/>&nbsp;<?= t('Gitlab Authentication') ?></h3>
<div class="listing">
<input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('oauth', 'gitlab', array(), false, '', true) ?>"/><br/>
- <p class="form-help"><a href="http://kanboard.net/documentation/gitlab-authentication" target="_blank"><?= t('Help on Gitlab authentication') ?></a></p>
+ <p class="form-help"><?= $this->url->doc(t('Help on Gitlab authentication'), 'gitlab-authentication') ?></p>
</div>
<h3><img src="<?= $this->url->dir() ?>assets/img/mailgun-icon.png"/>&nbsp;<?= t('Mailgun (incoming emails)') ?></h3>
<div class="listing">
<input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'mailgun', array('token' => $values['webhook_token']), false, '', true) ?>"/><br/>
- <p class="form-help"><a href="http://kanboard.net/documentation/mailgun" target="_blank"><?= t('Help on Mailgun integration') ?></a></p>
+ <p class="form-help"><?= $this->url->doc(t('Help on Mailgun integration'), 'mailgun') ?></p>
</div>
<h3><img src="<?= $this->url->dir() ?>assets/img/sendgrid-icon.png"/>&nbsp;<?= t('Sendgrid (incoming emails)') ?></h3>
<div class="listing">
<input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'sendgrid', array('token' => $values['webhook_token']), false, '', true) ?>"/><br/>
- <p class="form-help"><a href="http://kanboard.net/documentation/sendgrid" target="_blank"><?= t('Help on Sendgrid integration') ?></a></p>
+ <p class="form-help"><?= $this->url->doc(t('Help on Sendgrid integration'), 'sendgrid') ?></p>
</div>
<h3><img src="<?= $this->url->dir() ?>assets/img/postmark-icon.png"/>&nbsp;<?= t('Postmark (incoming emails)') ?></h3>
<div class="listing">
<input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'postmark', array('token' => $values['webhook_token']), false, '', true) ?>"/><br/>
- <p class="form-help"><a href="http://kanboard.net/documentation/postmark" target="_blank"><?= t('Help on Postmark integration') ?></a></p>
+ <p class="form-help"><?= $this->url->doc(t('Help on Postmark integration'), 'postmark') ?></p>
</div>
<h3><img src="<?= $this->url->dir() ?>assets/img/gravatar-icon.png"/>&nbsp;<?= t('Gravatar') ?></h3>
@@ -70,7 +70,7 @@
<?= $this->form->label(t('Multi-user chat room'), 'integration_jabber_room') ?>
<?= $this->form->text('integration_jabber_room', $values, $errors, array('placeholder="myroom@conference.example.com"')) ?>
- <p class="form-help"><a href="http://kanboard.net/documentation/jabber" target="_blank"><?= t('Help on Jabber integration') ?></a></p>
+ <p class="form-help"><?= $this->url->doc(t('Help on Jabber integration'), 'jabber') ?></p>
</div>
<h3><img src="<?= $this->url->dir() ?>assets/img/hipchat-icon.png"/> <?= t('Hipchat') ?></h3>
@@ -86,7 +86,7 @@
<?= $this->form->label(t('Room notification token'), 'integration_hipchat_room_token') ?>
<?= $this->form->text('integration_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>
+ <p class="form-help"><?= $this->url->doc(t('Help on Hipchat integration'), 'hipchat') ?></p>
</div>
<h3><i class="fa fa-slack fa-fw"></i>&nbsp;<?= t('Slack') ?></h3>
@@ -98,7 +98,7 @@
<?= $this->form->label(t('Channel/Group/User (Optional)'), 'integration_slack_webhook_channel') ?>
<?= $this->form->text('integration_slack_webhook_channel', $values, $errors) ?>
- <p class="form-help"><a href="http://kanboard.net/documentation/slack" target="_blank"><?= t('Help on Slack integration') ?></a></p>
+ <p class="form-help"><?= $this->url->doc(t('Help on Slack integration'), 'slack') ?></p>
</div>
<div class="form-actions">
diff --git a/app/Template/config/sidebar.php b/app/Template/config/sidebar.php
index b2c73292..3617979a 100644
--- a/app/Template/config/sidebar.php
+++ b/app/Template/config/sidebar.php
@@ -31,6 +31,9 @@
<li <?= $this->app->getRouterAction() === 'api' ? 'class="active"' : '' ?>>
<?= $this->url->link(t('API'), 'config', 'api') ?>
</li>
+ <li>
+ <?= $this->url->link(t('Documentation'), 'doc', 'show') ?>
+ </li>
</ul>
<div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div>
<div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div>
diff --git a/app/Template/doc/show.php b/app/Template/doc/show.php
new file mode 100644
index 00000000..8fbadc93
--- /dev/null
+++ b/app/Template/doc/show.php
@@ -0,0 +1,13 @@
+<section id="main">
+ <div class="page-header">
+ <ul>
+ <li>
+ <i class="fa fa-life-ring fa-fw"></i>
+ <?= $this->url->link(t('Table of contents'), 'doc', 'show', array('file' => 'index')) ?>
+ </li>
+ </ul>
+ </div>
+ <div class="markdown documentation">
+ <?= $content ?>
+ </div>
+</section> \ No newline at end of file
diff --git a/app/Template/project/edit.php b/app/Template/project/edit.php
index 3c64a399..8dcbb88f 100644
--- a/app/Template/project/edit.php
+++ b/app/Template/project/edit.php
@@ -42,7 +42,7 @@
</li>
</ul>
</div>
- <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
+ <div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/project/integrations.php b/app/Template/project/integrations.php
index 12a7ee4e..eb5faddf 100644
--- a/app/Template/project/integrations.php
+++ b/app/Template/project/integrations.php
@@ -9,21 +9,21 @@
<h3><i class="fa fa-github fa-fw"></i>&nbsp;<?= t('Github webhooks') ?></h3>
<div class="listing">
<input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'github', array('token' => $webhook_token, 'project_id' => $project['id']), false, '', true) ?>"/><br/>
- <p class="form-help"><a href="http://kanboard.net/documentation/github-webhooks" target="_blank"><?= t('Help on Github webhooks') ?></a></p>
+ <p class="form-help"><?= $this->url->doc(t('Help on Github webhooks'), 'github-webhooks') ?></p>
</div>
<h3><img src="<?= $this->url->dir() ?>assets/img/gitlab-icon.png"/>&nbsp;<?= t('Gitlab webhooks') ?></h3>
<div class="listing">
<input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'gitlab', array('token' => $webhook_token, 'project_id' => $project['id']), false, '', true) ?>"/><br/>
- <p class="form-help"><a href="http://kanboard.net/documentation/gitlab-webhooks" target="_blank"><?= t('Help on Gitlab webhooks') ?></a></p>
+ <p class="form-help"><?= $this->url->doc(t('Help on Gitlab webhooks'), 'gitlab-webhooks') ?></p>
</div>
<h3><i class="fa fa-bitbucket fa-fw"></i>&nbsp;<?= t('Bitbucket webhooks') ?></h3>
<div class="listing">
<input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'bitbucket', array('token' => $webhook_token, 'project_id' => $project['id']), false, '', true) ?>"/><br/>
- <p class="form-help"><a href="http://kanboard.net/documentation/bitbucket-webhooks" target="_blank"><?= t('Help on Bitbucket webhooks') ?></a></p>
+ <p class="form-help"><?= $this->url->doc(t('Help on Bitbucket webhooks'), 'bitbucket-webhooks') ?></p>
</div>
@@ -50,7 +50,7 @@
<?= $this->form->label(t('Multi-user chat room'), 'jabber_room') ?>
<?= $this->form->text('jabber_room', $values, $errors, array('placeholder="myroom@conference.example.com"')) ?>
- <p class="form-help"><a href="http://kanboard.net/documentation/jabber" target="_blank"><?= t('Help on Jabber integration') ?></a></p>
+ <p class="form-help"><?= $this->url->doc(t('Help on Jabber integration'), 'jabber') ?></p>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
@@ -71,7 +71,7 @@
<?= $this->form->label(t('Room notification token'), 'hipchat_room_token') ?>
<?= $this->form->text('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>
+ <p class="form-help"><?= $this->url->doc(t('Help on Hipchat integration'), 'hipchat') ?></a></p>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
@@ -88,7 +88,7 @@
<?= $this->form->label(t('Channel/Group/User (Optional)'), 'slack_webhook_channel') ?>
<?= $this->form->text('slack_webhook_channel', $values, $errors) ?>
- <p class="form-help"><a href="http://kanboard.net/documentation/slack" target="_blank"><?= t('Help on Slack integration') ?></a></p>
+ <p class="form-help"><?= $this->url->doc(t('Help on Slack integration'), 'slack') ?></p>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/project/users.php b/app/Template/project/users.php
index d725a9e8..8863a1e4 100644
--- a/app/Template/project/users.php
+++ b/app/Template/project/users.php
@@ -77,5 +77,6 @@
<ul>
<li><?= t('A project manager can change the settings of the project and have more privileges than a standard user.') ?></li>
<li><?= t('Don\'t forget that administrators have access to everything.') ?></li>
+ <li><?= $this->url->doc(t('Help with project permissions'), 'project-permissions') ?></li>
</ul>
</div>
diff --git a/app/Template/search/index.php b/app/Template/search/index.php
index 8940a24e..329c072a 100644
--- a/app/Template/search/index.php
+++ b/app/Template/search/index.php
@@ -31,7 +31,7 @@
<li><?= t('Search by description: ') ?><strong>description:"Something to find"</strong></li>
<li><?= t('Search by due date: ') ?><strong>due:2015-07-01</strong></li>
</ul>
- <p><i class="fa fa-external-link fa-fw"></i><a href="http://kanboard.net/documentation/search" target="_blank"><?= t('View advanced search syntax') ?></a></p>
+ <p><i class="fa fa-external-link fa-fw"></i><?= $this->url->doc(t('View advanced search syntax'), 'search') ?></p>
</div>
<?php elseif (! empty($values['search']) && $paginator->isEmpty()): ?>
<p class="alert"><?= t('Nothing found.') ?></p>
diff --git a/app/Template/task_creation/form.php b/app/Template/task_creation/form.php
index 84f28a1e..8a29896e 100644
--- a/app/Template/task_creation/form.php
+++ b/app/Template/task_creation/form.php
@@ -38,7 +38,7 @@
</ul>
</div>
- <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
+ <div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div>
<?php if (! isset($duplicate)): ?>
<?= $this->form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?>
diff --git a/app/Template/task_modification/edit_description.php b/app/Template/task_modification/edit_description.php
index 3168f7a3..4cae939c 100644
--- a/app/Template/task_modification/edit_description.php
+++ b/app/Template/task_modification/edit_description.php
@@ -24,7 +24,7 @@
</div>
</div>
- <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
+ <div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>