看板初始化提交

This commit is contained in:
zephyr
2026-06-01 21:23:12 -07:00
commit 54a842f4ab
2104 changed files with 241695 additions and 0 deletions
+94
View File
@@ -0,0 +1,94 @@
<div class="page-header">
<h2><?= t('About') ?></h2>
</div>
<div class="panel">
<ul>
<li>
<?= t('Official website:') ?>
<a href="https://kanboard.org/" target="_blank" rel="noopener noreferrer">https://kanboard.org/</a>
</li>
<li>
<?= t('Author:') ?>
<strong>Frédéric Guillot</strong> (<a href="https://github.com/kanboard/kanboard/graphs/contributors" target="_blank" rel="noopener noreferrer"><?= t('contributors') ?></a>)
</li>
<li>
<?= t('License:') ?>
<strong>MIT</strong>
</li>
</ul>
</div>
<div class="page-header">
<h2><?= t('Configuration') ?></h2>
</div>
<div class="panel">
<ul>
<li>
<?= t('Application version:') ?>
<strong><?= APP_VERSION ?></strong>
</li>
<li>
<?= t('PHP version:') ?>
<strong><?= PHP_VERSION ?></strong>
</li>
<li>
<?= t('PHP SAPI:') ?>
<strong><?= PHP_SAPI ?></strong>
</li>
<li>
<?= t('HTTP Client:') ?>
<strong><?= Kanboard\Core\Http\Client::backend() ?></strong>
</li>
<li>
<?= t('OS version:') ?>
<strong><?= @php_uname('s').' '.@php_uname('r') ?></strong>
</li>
<li>
<?= t('Database driver:') ?>
<strong><?= DB_DRIVER ?></strong>
</li>
<li>
<?= t('Database version:') ?>
<strong><?= $this->text->e($db_version) ?></strong>
</li>
<li>
<?= t('Browser:') ?>
<strong><?= $this->text->e($user_agent) ?></strong>
</li>
</ul>
</div>
<?php if (DB_DRIVER === 'sqlite'): ?>
<div class="page-header">
<h2><?= t('Database') ?></h2>
</div>
<div class="panel">
<ul>
<li>
<?= t('Database size:') ?>
<strong><?= $this->text->bytes($db_size) ?></strong>
</li>
<li>
<?= $this->url->link(t('Download the database'), 'ConfigController', 'downloadDb', array(), true) ?>&nbsp;
<?= t('(Gzip compressed Sqlite file)') ?>
</li>
<li>
<?= $this->url->link(t('Upload the database'), 'ConfigController', 'uploadDb', array(), false, 'js-modal-medium') ?>
</li>
<li>
<?= $this->url->link(t('Optimize the database'), 'ConfigController', 'optimizeDb', array(), true) ?>&nbsp;
<?= t('(VACUUM command)') ?>
</li>
<?php foreach ($db_options as $option => $value): ?>
<li><strong><?= $this->text->e($option) ?></strong> = <?= $this->text->e($value) ?></li>
<?php endforeach ?>
</ul>
</div>
<?php endif ?>
<div class="page-header">
<h2><?= t('License') ?></h2>
</div>
<div class="panel">
<?= nl2br(file_get_contents(ROOT_DIR.DIRECTORY_SEPARATOR.'LICENSE')) ?>
</div>
+17
View File
@@ -0,0 +1,17 @@
<div class="page-header">
<h2><?= t('API') ?></h2>
</div>
<div class="panel">
<ul>
<li>
<?= t('API token:') ?>
<strong><?= $this->text->e($values['api_token']) ?></strong>
</li>
<li>
<?= t('API endpoint:') ?>
<strong><?= $this->text->e($this->url->base()).'jsonrpc.php' ?></strong>
</li>
</ul>
</div>
<?= $this->url->link(t('Reset token'), 'ConfigController', 'token', array('type' => 'api'), true, 'btn btn-red') ?>
+44
View File
@@ -0,0 +1,44 @@
<div class="page-header">
<h2><?= t('Application settings') ?></h2>
</div>
<form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'application')) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<fieldset>
<?= $this->form->label(t('Application URL'), 'application_url') ?>
<?= $this->form->text('application_url', $values, $errors, array('placeholder="https://example.kanboard.org/"')) ?>
<p class="form-help"><?= t('Example: https://example.kanboard.org/ (used to generate absolute URLs)') ?></p>
<?= $this->form->label(t('Language'), 'application_language') ?>
<?= $this->form->select('application_language', $languages, $values, $errors) ?>
<?= $this->form->checkbox('password_reset', t('Enable "Forget Password"'), 1, $values['password_reset'] == 1) ?>
</fieldset>
<fieldset>
<?= $this->form->label(t('Timezone'), 'application_timezone') ?>
<?= $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) ?>
<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('Time format'), 'application_time_format') ?>
<?= $this->form->select('application_time_format', $time_formats, $values, $errors) ?>
</fieldset>
<fieldset>
<?= $this->form->checkbox('notifications_enabled', t('Enable notifications by default for all new users'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1) ?>
</fieldset>
<fieldset>
<?= $this->form->label(t('Custom Stylesheet'), 'application_stylesheet') ?>
<?= $this->form->textarea('application_stylesheet', $values, $errors) ?>
</fieldset>
<?= $this->hook->render('template:config:application', array('values' => $values, 'errors' => $errors)) ?>
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
</div>
</form>
+26
View File
@@ -0,0 +1,26 @@
<div class="page-header">
<h2><?= t('Board settings') ?></h2>
</div>
<form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'board')) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<fieldset>
<?= $this->form->label(t('Task highlight period'), 'board_highlight_period') ?>
<?= $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) ?>
<p class="form-help"><?= t('Frequency in second (60 seconds by default)') ?></p>
<?= $this->form->label(t('Refresh interval for personal board'), 'board_private_refresh_interval') ?>
<?= $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>
</fieldset>
<?= $this->hook->render('template:config:board', array('values' => $values, 'errors' => $errors)) ?>
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
</div>
</form>
+25
View File
@@ -0,0 +1,25 @@
<div class="page-header">
<h2><?= t('Email settings') ?></h2>
</div>
<form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'email')) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<fieldset>
<legend><?= t('Outgoing Emails') ?></legend>
<?php if (MAIL_CONFIGURATION): ?>
<?= $this->form->label(t('Email sender address'), 'mail_sender_address') ?>
<?= $this->form->text('mail_sender_address', $values, $errors, array('placeholder="'.MAIL_FROM.'"')) ?>
<?= $this->form->label(t('Email transport'), 'mail_transport') ?>
<?= $this->form->select('mail_transport', $mail_transports, $values, $errors) ?>
<?php else: ?>
<p class="alert"><?= t('The email configuration has been disabled by the administrator.') ?></p>
<?php endif ?>
</fieldset>
<?= $this->hook->render('template:config:email', array('values' => $values, 'errors' => $errors)) ?>
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
</div>
</form>
+14
View File
@@ -0,0 +1,14 @@
<div class="page-header">
<h2><?= t('Integration with third-party services') ?></h2>
</div>
<form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'integrations')) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?php $contents = $this->hook->render('template:config:integrations', array('values' => $values)) ?>
<?php if (empty($contents)): ?>
<p class="alert"><?= t('There is no external integration installed.') ?></p>
<?php else: ?>
<?= $contents ?>
<?php endif ?>
</form>
@@ -0,0 +1,33 @@
<div class="page-header">
<h2><?= t('Keyboard shortcuts') ?></h2>
</div>
<div class="panel">
<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 list view') ?> = <strong>v l</strong></li>
</ul>
<h3><?= t('Board view') ?></h3>
<ul>
<li><?= t('New task') ?> = <strong>n</strong></li>
<li><?= t('Expand/collapse tasks') ?> = <strong>s</strong></li>
<li><?= t('Compact/wide view') ?> = <strong>c</strong></li>
</ul>
<h3><?= t('Task view') ?></h3>
<ul>
<li><?= t('Edit task') ?> = <strong>e</strong></li>
<li><?= t('New subtask') ?> = <strong>s</strong></li>
<li><?= t('New comment') ?> = <strong>c</strong></li>
<li><?= t('New internal link') ?> = <strong>l</strong></li>
</ul>
<h3><?= t('Application') ?></h3>
<ul>
<li><?= t('Display list of keyboard shortcuts') ?> = <strong>?</strong></li>
<li><?= t('Open board switcher') ?> = <strong>b</strong></li>
<li><?= t('Go to the search/filter box') ?> = <strong>f</strong></li>
<li><?= t('Reset the search/filter box') ?> = <strong>r</strong></li>
<li><?= t('Close dialog box') ?> = <strong>ESC</strong></li>
<li><?= t('Submit a form') ?> = <strong>CTRL+ENTER</strong> <?= t('or') ?> <strong>⌘+ENTER</strong></li>
</ul>
</div>
+9
View File
@@ -0,0 +1,9 @@
<section id="main">
<section class="sidebar-container" id="config-section">
<?= $this->render($sidebar_template) ?>
<div class="sidebar-content">
<?= $content_for_sublayout ?>
</div>
</section>
</section>
+30
View File
@@ -0,0 +1,30 @@
<div class="page-header">
<h2><?= t('Project settings') ?></h2>
</div>
<form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'project')) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<fieldset>
<?= $this->form->label(t('Default task color'), 'default_color') ?>
<?= $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) ?>
<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) ?>
<p class="form-help"><?= t('Example: "Bug, Feature Request, Improvement"') ?></p>
</fieldset>
<fieldset>
<?= $this->form->checkbox('disable_private_project', t('Disable personal 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) ?>
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
</div>
</form>
+38
View File
@@ -0,0 +1,38 @@
<div class="sidebar">
<ul>
<li <?= $this->app->checkMenuSelection('ConfigController', 'index') ?>>
<?= $this->url->link(t('About'), 'ConfigController', 'index') ?>
</li>
<li <?= $this->app->checkMenuSelection('ConfigController', 'application') ?>>
<?= $this->url->link(t('Application settings'), 'ConfigController', 'application') ?>
</li>
<li <?= $this->app->checkMenuSelection('ConfigController', 'email') ?>>
<?= $this->url->link(t('Email settings'), 'ConfigController', 'email') ?>
</li>
<li <?= $this->app->checkMenuSelection('ConfigController', 'project') ?>>
<?= $this->url->link(t('Project settings'), 'ConfigController', 'project') ?>
</li>
<li <?= $this->app->checkMenuSelection('ConfigController', 'board') ?>>
<?= $this->url->link(t('Board settings'), 'ConfigController', 'board') ?>
</li>
<li <?= $this->app->checkMenuSelection('TagController', 'index') ?>>
<?= $this->url->link(t('Tags management'), 'TagController', 'index') ?>
</li>
<li <?= $this->app->checkMenuSelection('LinkController') ?>>
<?= $this->url->link(t('Link labels'), 'LinkController', 'show') ?>
</li>
<li <?= $this->app->checkMenuSelection('CurrencyController') ?>>
<?= $this->url->link(t('Currency rates'), 'CurrencyController', 'show') ?>
</li>
<li <?= $this->app->checkMenuSelection('ConfigController', 'integrations') ?>>
<?= $this->url->link(t('Integrations'), 'ConfigController', 'integrations') ?>
</li>
<li <?= $this->app->checkMenuSelection('ConfigController', 'webhook') ?>>
<?= $this->url->link(t('Webhooks'), 'ConfigController', 'webhook') ?>
</li>
<li <?= $this->app->checkMenuSelection('ConfigController', 'api') ?>>
<?= $this->url->link(t('API'), 'ConfigController', 'api') ?>
</li>
<?= $this->hook->render('template:config:sidebar') ?>
</ul>
</div>
+16
View File
@@ -0,0 +1,16 @@
<div class="page-header">
<h2><?= t('Upload the database') ?></h2>
</div>
<div class="alert">
<p>
<?= t('You could upload the previously downloaded Sqlite database (Gzip format).') ?>
</p>
</div>
<form action="<?= $this->url->href('ConfigController', 'saveUploadedDb', [], true) ?>" method="post" enctype="multipart/form-data">
<?= $this->form->label(t('Database file'), 'file') ?>
<?= $this->form->file('file') ?>
<?= $this->modal->submitButtons(array('submitLabel' => t('Upload'))) ?>
</form>
+23
View File
@@ -0,0 +1,23 @@
<div class="page-header">
<h2><?= t('Webhook settings') ?></h2>
</div>
<form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'webhook')) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->label(t('Webhook URL'), 'webhook_url') ?>
<?= $this->form->text('webhook_url', $values, $errors) ?>
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
</div>
</form>
<div class="page-header margin-top">
<h2><?= t('Webhook token') ?></h2>
</div>
<div class="panel">
<?= t('Webhook token:') ?>
<strong><?= $this->text->e($values['webhook_token']) ?></strong>
</div>
<?= $this->url->link(t('Reset token'), 'ConfigController', 'token', array('type' => 'webhook'), true, 'btn btn-red') ?>