Move and clean some templates to a subfolder

This commit is contained in:
Frédéric Guillot
2014-11-20 20:26:21 -05:00
parent b84edaaf13
commit 11b6381cc0
19 changed files with 59 additions and 58 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>