summaryrefslogtreecommitdiff
path: root/app/Template/config
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-20 20:26:21 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-20 20:26:21 -0500
commit11b6381cc0f0583a11287202463d20a0ac1ebf00 (patch)
treec973b6686467272ae56914f5e143d09de476d084 /app/Template/config
parentb84edaaf13ba854290099b0df452f61e9b595a17 (diff)
Move and clean some templates to a subfolder
Diffstat (limited to 'app/Template/config')
-rw-r--r--app/Template/config/about.php41
-rw-r--r--app/Template/config/api.php18
-rw-r--r--app/Template/config/application.php27
-rw-r--r--app/Template/config/board.php29
-rw-r--r--app/Template/config/layout.php10
-rw-r--r--app/Template/config/sidebar.php20
-rw-r--r--app/Template/config/webhook.php38
7 files changed, 183 insertions, 0 deletions
diff --git a/app/Template/config/about.php b/app/Template/config/about.php
new file mode 100644
index 00000000..3f34f802
--- /dev/null
+++ b/app/Template/config/about.php
@@ -0,0 +1,41 @@
+<div class="page-header">
+ <h2><?= t('About') ?></h2>
+</div>
+<section class="listing">
+ <ul>
+ <li>
+ <?= t('Official website:') ?>
+ <a href="http://kanboard.net/" target="_blank" rel="noreferer">http://kanboard.net/</a>
+ </li>
+ <li>
+ <?= t('Application version:') ?>
+ <strong><?= APP_VERSION ?></strong>
+ </li>
+ </ul>
+</section>
+
+<div class="page-header">
+ <h2><?= t('Database') ?></h2>
+</div>
+<section class="listing">
+ <ul>
+ <li>
+ <?= t('Database driver:') ?>
+ <strong><?= Helper\escape(DB_DRIVER) ?></strong>
+ </li>
+ <?php if (DB_DRIVER === 'sqlite'): ?>
+ <li>
+ <?= t('Database size:') ?>
+ <strong><?= Helper\format_bytes($db_size) ?></strong>
+ </li>
+ <li>
+ <?= Helper\a(t('Download the database'), 'config', 'downloadDb', array(), true) ?>&nbsp;
+ <?= t('(Gzip compressed Sqlite file)') ?>
+ </li>
+ <li>
+ <?= Helper\a(t('Optimize the database'), 'config', 'optimizeDb', array(), true) ?>&nbsp;
+ <?= t('(VACUUM command)') ?>
+ </li>
+ <?php endif ?>
+ </ul>
+</section> \ No newline at end of file
diff --git a/app/Template/config/api.php b/app/Template/config/api.php
new file mode 100644
index 00000000..037ea08d
--- /dev/null
+++ b/app/Template/config/api.php
@@ -0,0 +1,18 @@
+<div class="page-header">
+ <h2><?= t('API') ?></h2>
+</div>
+<section class="listing">
+ <ul>
+ <li>
+ <?= t('API token:') ?>
+ <strong><?= Helper\escape($values['api_token']) ?></strong>
+ </li>
+ <li>
+ <?= t('API endpoint:') ?>
+ <input type="text" readonly="readonly" value="<?= Helper\get_current_base_url().'jsonrpc.php' ?>">
+ </li>
+ <li>
+ <?= Helper\a(t('Reset token'), 'config', 'token', array('type' => 'api'), true) ?>
+ </li>
+ </ul>
+</section> \ No newline at end of file
diff --git a/app/Template/config/application.php b/app/Template/config/application.php
new file mode 100644
index 00000000..c92975bc
--- /dev/null
+++ b/app/Template/config/application.php
@@ -0,0 +1,27 @@
+<div class="page-header">
+ <h2><?= t('Application settings') ?></h2>
+</div>
+<section>
+<form method="post" action="<?= Helper\u('config', 'application') ?>" autocomplete="off">
+
+ <?= Helper\form_csrf() ?>
+
+ <?= Helper\form_label(t('Application URL'), 'application_url') ?>
+ <?= Helper\form_text('application_url', $values, $errors, array('placeholder="http://example.kanboard.net/"')) ?><br/>
+ <p class="form-help"><?= t('Example: http://example.kanboard.net/ (used by email notifications)') ?></p>
+
+ <?= Helper\form_label(t('Language'), 'application_language') ?>
+ <?= Helper\form_select('application_language', $languages, $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Timezone'), 'application_timezone') ?>
+ <?= Helper\form_select('application_timezone', $timezones, $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Date format'), 'application_date_format') ?>
+ <?= Helper\form_select('application_date_format', $date_formats, $values, $errors) ?><br/>
+ <p class="form-help"><?= t('ISO format is always accepted, example: "%s" and "%s"', date('Y-m-d'), date('Y_m_d')) ?></p>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ </div>
+</form>
+</section> \ No newline at end of file
diff --git a/app/Template/config/board.php b/app/Template/config/board.php
new file mode 100644
index 00000000..f260d084
--- /dev/null
+++ b/app/Template/config/board.php
@@ -0,0 +1,29 @@
+<div class="page-header">
+ <h2><?= t('Board settings') ?></h2>
+</div>
+<section>
+<form method="post" action="<?= Helper\u('config', 'board') ?>" autocomplete="off">
+
+ <?= Helper\form_csrf() ?>
+
+ <?= Helper\form_label(t('Task highlight period'), 'board_highlight_period') ?>
+ <?= Helper\form_number('board_highlight_period', $values, $errors) ?><br/>
+ <p class="form-help"><?= t('Period (in second) to consider a task was modified recently (0 to disable, 2 days by default)') ?></p>
+
+ <?= Helper\form_label(t('Refresh interval for public board'), 'board_public_refresh_interval') ?>
+ <?= Helper\form_number('board_public_refresh_interval', $values, $errors) ?><br/>
+ <p class="form-help"><?= t('Frequency in second (60 seconds by default)') ?></p>
+
+ <?= Helper\form_label(t('Refresh interval for private board'), 'board_private_refresh_interval') ?>
+ <?= Helper\form_number('board_private_refresh_interval', $values, $errors) ?><br/>
+ <p class="form-help"><?= t('Frequency in second (0 to disable this feature, 10 seconds by default)') ?></p>
+
+ <?= Helper\form_label(t('Default columns for new projects (Comma-separated)'), 'board_columns') ?>
+ <?= Helper\form_text('board_columns', $values, $errors) ?><br/>
+ <p class="form-help"><?= t('Default values are "%s"', $default_columns) ?></p>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ </div>
+</form>
+</section> \ No newline at end of file
diff --git a/app/Template/config/layout.php b/app/Template/config/layout.php
new file mode 100644
index 00000000..e0ac2fa8
--- /dev/null
+++ b/app/Template/config/layout.php
@@ -0,0 +1,10 @@
+<section id="main">
+ <section class="sidebar-container" id="config-section">
+
+ <?= Helper\template('config/sidebar') ?>
+
+ <div class="sidebar-content">
+ <?= $config_content_for_layout ?>
+ </div>
+ </section>
+</section> \ No newline at end of file
diff --git a/app/Template/config/sidebar.php b/app/Template/config/sidebar.php
new file mode 100644
index 00000000..5870ca81
--- /dev/null
+++ b/app/Template/config/sidebar.php
@@ -0,0 +1,20 @@
+<div class="sidebar">
+ <h2><?= t('Actions') ?></h2>
+ <ul>
+ <li>
+ <?= Helper\a(t('About'), 'config', 'index') ?>
+ </li>
+ <li>
+ <?= Helper\a(t('Application settings'), 'config', 'application') ?>
+ </li>
+ <li>
+ <?= Helper\a(t('Board settings'), 'config', 'board') ?>
+ </li>
+ <li>
+ <?= Helper\a(t('Webhooks'), 'config', 'webhook') ?>
+ </li>
+ <li>
+ <?= Helper\a(t('API'), 'config', 'api') ?>
+ </li>
+ </ul>
+</div> \ No newline at end of file
diff --git a/app/Template/config/webhook.php b/app/Template/config/webhook.php
new file mode 100644
index 00000000..052a2a99
--- /dev/null
+++ b/app/Template/config/webhook.php
@@ -0,0 +1,38 @@
+<div class="page-header">
+ <h2><?= t('Webhook settings') ?></h2>
+</div>
+<section>
+<form method="post" action="<?= Helper\u('config', 'webhook') ?>" autocomplete="off">
+
+ <?= Helper\form_csrf() ?>
+
+ <?= Helper\form_label(t('Webhook URL for task creation'), 'webhook_url_task_creation') ?>
+ <?= Helper\form_text('webhook_url_task_creation', $values, $errors) ?><br/>
+
+ <?= Helper\form_label(t('Webhook URL for task modification'), 'webhook_url_task_modification') ?>
+ <?= Helper\form_text('webhook_url_task_modification', $values, $errors) ?><br/>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ </div>
+</form>
+</section>
+
+<div class="page-header">
+ <h2><?= t('URL and token') ?></h2>
+</div>
+<section class="listing">
+ <ul>
+ <li>
+ <?= t('Webhook token:') ?>
+ <strong><?= Helper\escape($values['webhook_token']) ?></strong>
+ </li>
+ <li>
+ <?= t('URL for task creation:') ?>
+ <input type="text" readonly="readonly" value="<?= Helper\get_current_base_url().Helper\u('webhook', 'task', array('token' => $values['webhook_token'])) ?>">
+ </li>
+ <li>
+ <?= Helper\a(t('Reset token'), 'config', 'token', array('type' => 'webhook'), true) ?>
+ </li>
+ </ul>
+</section> \ No newline at end of file