summaryrefslogtreecommitdiff
path: root/app/Template/config
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/config')
-rw-r--r--app/Template/config/about.php1
-rw-r--r--app/Template/config/application.php24
-rw-r--r--app/Template/config/board.php10
-rw-r--r--app/Template/config/integrations.php20
-rw-r--r--app/Template/config/layout.php4
-rw-r--r--app/Template/config/project.php9
-rw-r--r--app/Template/config/sidebar.php27
7 files changed, 37 insertions, 58 deletions
diff --git a/app/Template/config/about.php b/app/Template/config/about.php
index e0652a2f..f8534029 100644
--- a/app/Template/config/about.php
+++ b/app/Template/config/about.php
@@ -54,6 +54,7 @@
<div class="listing">
<h3><?= t('Board/Calendar/List view') ?></h3>
<ul>
+ <li><?= t('Switch to the project overview') ?> = <strong>v o</strong></li>
<li><?= t('Switch to the board view') ?> = <strong>v b</strong></li>
<li><?= t('Switch to the calendar view') ?> = <strong>v c</strong></li>
<li><?= t('Switch to the list view') ?> = <strong>v l</strong></li>
diff --git a/app/Template/config/application.php b/app/Template/config/application.php
index 7d4c811d..48fed7f0 100644
--- a/app/Template/config/application.php
+++ b/app/Template/config/application.php
@@ -1,30 +1,36 @@
<div class="page-header">
<h2><?= t('Application settings') ?></h2>
</div>
-<section>
<form method="post" action="<?= $this->url->href('config', 'application') ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->label(t('Application URL'), 'application_url') ?>
- <?= $this->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>
+ <?= $this->form->text('application_url', $values, $errors, array('placeholder="http://example.kanboard.net/"')) ?>
+ <p class="form-help"><?= t('Example: http://example.kanboard.net/ (used to generate absolute URLs)') ?></p>
<?= $this->form->label(t('Language'), 'application_language') ?>
- <?= $this->form->select('application_language', $languages, $values, $errors) ?><br/>
+ <?= $this->form->select('application_language', $languages, $values, $errors) ?>
<?= $this->form->label(t('Timezone'), 'application_timezone') ?>
- <?= $this->form->select('application_timezone', $timezones, $values, $errors) ?><br/>
+ <?= $this->form->select('application_timezone', $timezones, $values, $errors) ?>
<?= $this->form->label(t('Date format'), 'application_date_format') ?>
- <?= $this->form->select('application_date_format', $date_formats, $values, $errors) ?><br/>
+ <?= $this->form->select('application_date_format', $date_formats, $values, $errors) ?>
<p class="form-help"><?= t('ISO format is always accepted, example: "%s" and "%s"', date('Y-m-d'), date('Y_m_d')) ?></p>
+ <?= $this->form->label(t('Date and time format'), 'application_datetime_format') ?>
+ <?= $this->form->select('application_datetime_format', $datetime_formats, $values, $errors) ?>
+
+ <?= $this->form->label(t('Time format'), 'application_time_format') ?>
+ <?= $this->form->select('application_time_format', $time_formats, $values, $errors) ?>
+
+ <?= $this->form->checkbox('password_reset', t('Enable "Forget Password"'), 1, $values['password_reset'] == 1) ?>
+
<?= $this->form->label(t('Custom Stylesheet'), 'application_stylesheet') ?>
- <?= $this->form->textarea('application_stylesheet', $values, $errors) ?><br/>
+ <?= $this->form->textarea('application_stylesheet', $values, $errors) ?>
<div class="form-actions">
- <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <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
index 19a4bcd7..f787a931 100644
--- a/app/Template/config/board.php
+++ b/app/Template/config/board.php
@@ -1,25 +1,23 @@
<div class="page-header">
<h2><?= t('Board settings') ?></h2>
</div>
-<section>
<form method="post" action="<?= $this->url->href('config', 'board') ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->label(t('Task highlight period'), 'board_highlight_period') ?>
- <?= $this->form->number('board_highlight_period', $values, $errors) ?><br/>
+ <?= $this->form->number('board_highlight_period', $values, $errors) ?>
<p class="form-help"><?= t('Period (in second) to consider a task was modified recently (0 to disable, 2 days by default)') ?></p>
<?= $this->form->label(t('Refresh interval for public board'), 'board_public_refresh_interval') ?>
- <?= $this->form->number('board_public_refresh_interval', $values, $errors) ?><br/>
+ <?= $this->form->number('board_public_refresh_interval', $values, $errors) ?>
<p class="form-help"><?= t('Frequency in second (60 seconds by default)') ?></p>
<?= $this->form->label(t('Refresh interval for private board'), 'board_private_refresh_interval') ?>
- <?= $this->form->number('board_private_refresh_interval', $values, $errors) ?><br/>
+ <?= $this->form->number('board_private_refresh_interval', $values, $errors) ?>
<p class="form-help"><?= t('Frequency in second (0 to disable this feature, 10 seconds by default)') ?></p>
<div class="form-actions">
- <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <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/integrations.php b/app/Template/config/integrations.php
index bba85672..ced051f7 100644
--- a/app/Template/config/integrations.php
+++ b/app/Template/config/integrations.php
@@ -3,29 +3,9 @@
</div>
<form method="post" action="<?= $this->url->href('config', 'integrations') ?>" autocomplete="off">
-
<?= $this->form->csrf() ?>
-
<?= $this->hook->render('template:config:integrations', array('values' => $values)) ?>
- <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"><?= $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"><?= $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"><?= $this->url->doc(t('Help on Gitlab authentication'), 'gitlab-authentication') ?></p>
- </div>
-
<h3><img src="<?= $this->url->dir() ?>assets/img/gravatar-icon.png"/>&nbsp;<?= t('Gravatar') ?></h3>
<div class="listing">
<?= $this->form->checkbox('integration_gravatar', t('Enable Gravatar images'), 1, $values['integration_gravatar'] == 1) ?>
diff --git a/app/Template/config/layout.php b/app/Template/config/layout.php
index 028f138c..f34caaab 100644
--- a/app/Template/config/layout.php
+++ b/app/Template/config/layout.php
@@ -1,10 +1,10 @@
<section id="main">
<section class="sidebar-container" id="config-section">
- <?= $this->render('config/sidebar') ?>
+ <?= $this->render($sidebar_template) ?>
<div class="sidebar-content">
- <?= $config_content_for_layout ?>
+ <?= $content_for_sublayout ?>
</div>
</section>
</section> \ No newline at end of file
diff --git a/app/Template/config/project.php b/app/Template/config/project.php
index c58a7bac..1d32a14f 100644
--- a/app/Template/config/project.php
+++ b/app/Template/config/project.php
@@ -1,7 +1,6 @@
<div class="page-header">
<h2><?= t('Project settings') ?></h2>
</div>
-<section>
<form method="post" action="<?= $this->url->href('config', 'project') ?>" autocomplete="off">
<?= $this->form->csrf() ?>
@@ -10,19 +9,19 @@
<?= $this->form->select('default_color', $colors, $values, $errors) ?>
<?= $this->form->label(t('Default columns for new projects (Comma-separated)'), 'board_columns') ?>
- <?= $this->form->text('board_columns', $values, $errors) ?><br/>
+ <?= $this->form->text('board_columns', $values, $errors) ?>
<p class="form-help"><?= t('Default values are "%s"', $default_columns) ?></p>
<?= $this->form->label(t('Default categories for new projects (Comma-separated)'), 'project_categories') ?>
- <?= $this->form->text('project_categories', $values, $errors) ?><br/>
+ <?= $this->form->text('project_categories', $values, $errors) ?>
<p class="form-help"><?= t('Example: "Bug, Feature Request, Improvement"') ?></p>
+ <?= $this->form->checkbox('disable_private_project', t('Disable private projects'), 1, isset($values['disable_private_project']) && $values['disable_private_project'] == 1) ?>
<?= $this->form->checkbox('subtask_restriction', t('Allow only one subtask in progress at the same time for a user'), 1, $values['subtask_restriction'] == 1) ?>
<?= $this->form->checkbox('subtask_time_tracking', t('Trigger automatically subtask time tracking'), 1, $values['subtask_time_tracking'] == 1) ?>
<?= $this->form->checkbox('cfd_include_closed_tasks', t('Include closed tasks in the cumulative flow diagram'), 1, $values['cfd_include_closed_tasks'] == 1) ?>
<div class="form-actions">
- <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <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/sidebar.php b/app/Template/config/sidebar.php
index 4195cde1..dd51bc74 100644
--- a/app/Template/config/sidebar.php
+++ b/app/Template/config/sidebar.php
@@ -1,44 +1,39 @@
<div class="sidebar">
<h2><?= t('Actions') ?></h2>
<ul>
- <li <?= $this->app->getRouterAction() === 'index' ? 'class="active"' : '' ?>>
+ <li <?= $this->app->checkMenuSelection('config', 'index') ?>>
<?= $this->url->link(t('About'), 'config', 'index') ?>
</li>
- <li <?= $this->app->getRouterAction() === 'plugins' ? 'class="active"' : '' ?>>
+ <li <?= $this->app->checkMenuSelection('config', 'plugins') ?>>
<?= $this->url->link(t('Plugins'), 'config', 'plugins') ?>
</li>
- <li <?= $this->app->getRouterAction() === 'application' ? 'class="active"' : '' ?>>
+ <li <?= $this->app->checkMenuSelection('config', 'application') ?>>
<?= $this->url->link(t('Application settings'), 'config', 'application') ?>
</li>
- <li <?= $this->app->getRouterAction() === 'project' ? 'class="active"' : '' ?>>
+ <li <?= $this->app->checkMenuSelection('config', 'project') ?>>
<?= $this->url->link(t('Project settings'), 'config', 'project') ?>
</li>
- <li <?= $this->app->getRouterAction() === 'board' ? 'class="active"' : '' ?>>
+ <li <?= $this->app->checkMenuSelection('config', 'board') ?>>
<?= $this->url->link(t('Board settings'), 'config', 'board') ?>
</li>
- <li <?= $this->app->getRouterAction() === 'calendar' ? 'class="active"' : '' ?>>
+ <li <?= $this->app->checkMenuSelection('config', 'calendar') ?>>
<?= $this->url->link(t('Calendar settings'), 'config', 'calendar') ?>
</li>
- <li <?= $this->app->getRouterController() === 'link' && $this->app->getRouterAction() === 'index' ? 'class="active"' : '' ?>>
+ <li <?= $this->app->checkMenuSelection('link') ?>>
<?= $this->url->link(t('Link settings'), 'link', 'index') ?>
</li>
- <li <?= $this->app->getRouterController() === 'currency' && $this->app->getRouterAction() === 'index' ? 'class="active"' : '' ?>>
+ <li <?= $this->app->checkMenuSelection('currency', 'index') ?>>
<?= $this->url->link(t('Currency rates'), 'currency', 'index') ?>
</li>
- <li <?= $this->app->getRouterAction() === 'integrations' ? 'class="active"' : '' ?>>
+ <li <?= $this->app->checkMenuSelection('config', 'integrations') ?>>
<?= $this->url->link(t('Integrations'), 'config', 'integrations') ?>
</li>
- <li <?= $this->app->getRouterAction() === 'webhook' ? 'class="active"' : '' ?>>
+ <li <?= $this->app->checkMenuSelection('config', 'webhook') ?>>
<?= $this->url->link(t('Webhooks'), 'config', 'webhook') ?>
</li>
- <li <?= $this->app->getRouterAction() === 'api' ? 'class="active"' : '' ?>>
+ <li <?= $this->app->checkMenuSelection('config', 'api') ?>>
<?= $this->url->link(t('API'), 'config', 'api') ?>
</li>
- <li>
- <?= $this->url->link(t('Documentation'), 'doc', 'show') ?>
- </li>
<?= $this->hook->render('template:config:sidebar') ?>
</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>
</div> \ No newline at end of file