Template helpers refactoring
This commit is contained in:
@@ -21,19 +21,19 @@
|
||||
<ul>
|
||||
<li>
|
||||
<?= t('Database driver:') ?>
|
||||
<strong><?= Helper\escape(DB_DRIVER) ?></strong>
|
||||
<strong><?= $this->e(DB_DRIVER) ?></strong>
|
||||
</li>
|
||||
<?php if (DB_DRIVER === 'sqlite'): ?>
|
||||
<li>
|
||||
<?= t('Database size:') ?>
|
||||
<strong><?= Helper\format_bytes($db_size) ?></strong>
|
||||
<strong><?= $this->formatBytes($db_size) ?></strong>
|
||||
</li>
|
||||
<li>
|
||||
<?= Helper\a(t('Download the database'), 'config', 'downloadDb', array(), true) ?>
|
||||
<?= $this->a(t('Download the database'), 'config', 'downloadDb', array(), true) ?>
|
||||
<?= t('(Gzip compressed Sqlite file)') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= Helper\a(t('Optimize the database'), 'config', 'optimizeDb', array(), true) ?>
|
||||
<?= $this->a(t('Optimize the database'), 'config', 'optimizeDb', array(), true) ?>
|
||||
<?= t('(VACUUM command)') ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
<ul>
|
||||
<li>
|
||||
<?= t('API token:') ?>
|
||||
<strong><?= Helper\escape($values['api_token']) ?></strong>
|
||||
<strong><?= $this->e($values['api_token']) ?></strong>
|
||||
</li>
|
||||
<li>
|
||||
<?= t('API endpoint:') ?>
|
||||
<input type="text" class="auto-select" readonly="readonly" value="<?= Helper\get_current_base_url().'jsonrpc.php' ?>">
|
||||
<input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().'jsonrpc.php' ?>">
|
||||
</li>
|
||||
<li>
|
||||
<?= Helper\a(t('Reset token'), 'config', 'token', array('type' => 'api'), true) ?>
|
||||
<?= $this->a(t('Reset token'), 'config', 'token', array('type' => 'api'), true) ?>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
@@ -2,22 +2,22 @@
|
||||
<h2><?= t('Application settings') ?></h2>
|
||||
</div>
|
||||
<section>
|
||||
<form method="post" action="<?= Helper\u('config', 'application') ?>" autocomplete="off">
|
||||
<form method="post" action="<?= $this->u('config', 'application') ?>" autocomplete="off">
|
||||
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= $this->formCsrf() ?>
|
||||
|
||||
<?= Helper\form_label(t('Application URL'), 'application_url') ?>
|
||||
<?= Helper\form_text('application_url', $values, $errors, array('placeholder="http://example.kanboard.net/"')) ?><br/>
|
||||
<?= $this->formLabel(t('Application URL'), 'application_url') ?>
|
||||
<?= $this->formText('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/>
|
||||
<?= $this->formLabel(t('Language'), 'application_language') ?>
|
||||
<?= $this->formSelect('application_language', $languages, $values, $errors) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Timezone'), 'application_timezone') ?>
|
||||
<?= Helper\form_select('application_timezone', $timezones, $values, $errors) ?><br/>
|
||||
<?= $this->formLabel(t('Timezone'), 'application_timezone') ?>
|
||||
<?= $this->formSelect('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/>
|
||||
<?= $this->formLabel(t('Date format'), 'application_date_format') ?>
|
||||
<?= $this->formSelect('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">
|
||||
|
||||
@@ -2,24 +2,24 @@
|
||||
<h2><?= t('Board settings') ?></h2>
|
||||
</div>
|
||||
<section>
|
||||
<form method="post" action="<?= Helper\u('config', 'board') ?>" autocomplete="off">
|
||||
<form method="post" action="<?= $this->u('config', 'board') ?>" autocomplete="off">
|
||||
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= $this->formCsrf() ?>
|
||||
|
||||
<?= Helper\form_label(t('Task highlight period'), 'board_highlight_period') ?>
|
||||
<?= Helper\form_number('board_highlight_period', $values, $errors) ?><br/>
|
||||
<?= $this->formLabel(t('Task highlight period'), 'board_highlight_period') ?>
|
||||
<?= $this->formNumber('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/>
|
||||
<?= $this->formLabel(t('Refresh interval for public board'), 'board_public_refresh_interval') ?>
|
||||
<?= $this->formNumber('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/>
|
||||
<?= $this->formLabel(t('Refresh interval for private board'), 'board_private_refresh_interval') ?>
|
||||
<?= $this->formNumber('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/>
|
||||
<?= $this->formLabel(t('Default columns for new projects (Comma-separated)'), 'board_columns') ?>
|
||||
<?= $this->formText('board_columns', $values, $errors) ?><br/>
|
||||
<p class="form-help"><?= t('Default values are "%s"', $default_columns) ?></p>
|
||||
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<section id="main">
|
||||
<section class="sidebar-container" id="config-section">
|
||||
|
||||
<?= Helper\template('config/sidebar') ?>
|
||||
<?= $this->render('config/sidebar') ?>
|
||||
|
||||
<div class="sidebar-content">
|
||||
<?= $config_content_for_layout ?>
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<h2><?= t('Actions') ?></h2>
|
||||
<ul>
|
||||
<li>
|
||||
<?= Helper\a(t('About'), 'config', 'index') ?>
|
||||
<?= $this->a(t('About'), 'config', 'index') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= Helper\a(t('Application settings'), 'config', 'application') ?>
|
||||
<?= $this->a(t('Application settings'), 'config', 'application') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= Helper\a(t('Board settings'), 'config', 'board') ?>
|
||||
<?= $this->a(t('Board settings'), 'config', 'board') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= Helper\a(t('Webhooks'), 'config', 'webhook') ?>
|
||||
<?= $this->a(t('Webhooks'), 'config', 'webhook') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= Helper\a(t('API'), 'config', 'api') ?>
|
||||
<?= $this->a(t('API'), 'config', 'api') ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -2,15 +2,15 @@
|
||||
<h2><?= t('Webhook settings') ?></h2>
|
||||
</div>
|
||||
<section>
|
||||
<form method="post" action="<?= Helper\u('config', 'webhook') ?>" autocomplete="off">
|
||||
<form method="post" action="<?= $this->u('config', 'webhook') ?>" autocomplete="off">
|
||||
|
||||
<?= Helper\form_csrf() ?>
|
||||
<?= $this->formCsrf() ?>
|
||||
|
||||
<?= Helper\form_label(t('Webhook URL for task creation'), 'webhook_url_task_creation') ?>
|
||||
<?= Helper\form_text('webhook_url_task_creation', $values, $errors) ?><br/>
|
||||
<?= $this->formLabel(t('Webhook URL for task creation'), 'webhook_url_task_creation') ?>
|
||||
<?= $this->formText('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/>
|
||||
<?= $this->formLabel(t('Webhook URL for task modification'), 'webhook_url_task_modification') ?>
|
||||
<?= $this->formText('webhook_url_task_modification', $values, $errors) ?><br/>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
@@ -25,14 +25,14 @@
|
||||
<ul>
|
||||
<li>
|
||||
<?= t('Webhook token:') ?>
|
||||
<strong><?= Helper\escape($values['webhook_token']) ?></strong>
|
||||
<strong><?= $this->e($values['webhook_token']) ?></strong>
|
||||
</li>
|
||||
<li>
|
||||
<?= t('URL for task creation:') ?>
|
||||
<input type="text" class="auto-select" readonly="readonly" value="<?= Helper\get_current_base_url().Helper\u('webhook', 'task', array('token' => $values['webhook_token'])) ?>">
|
||||
<input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'task', array('token' => $values['webhook_token'])) ?>">
|
||||
</li>
|
||||
<li>
|
||||
<?= Helper\a(t('Reset token'), 'config', 'token', array('type' => 'webhook'), true) ?>
|
||||
<?= $this->a(t('Reset token'), 'config', 'token', array('type' => 'webhook'), true) ?>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
Reference in New Issue
Block a user