diff options
Diffstat (limited to 'app/Template/config')
-rw-r--r-- | app/Template/config/about.php | 57 | ||||
-rw-r--r-- | app/Template/config/api.php | 18 | ||||
-rw-r--r-- | app/Template/config/application.php | 30 | ||||
-rw-r--r-- | app/Template/config/board.php | 25 | ||||
-rw-r--r-- | app/Template/config/calendar.php | 33 | ||||
-rw-r--r-- | app/Template/config/integrations.php | 87 | ||||
-rw-r--r-- | app/Template/config/layout.php | 10 | ||||
-rw-r--r-- | app/Template/config/project.php | 24 | ||||
-rw-r--r-- | app/Template/config/sidebar.php | 35 | ||||
-rw-r--r-- | app/Template/config/webhook.php | 35 |
10 files changed, 354 insertions, 0 deletions
diff --git a/app/Template/config/about.php b/app/Template/config/about.php new file mode 100644 index 00000000..a7098c1b --- /dev/null +++ b/app/Template/config/about.php @@ -0,0 +1,57 @@ +<div class="page-header"> + <h2><?= t('About') ?></h2> +</div> +<div 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> +</div> +<div class="page-header"> + <h2><?= t('Database') ?></h2> +</div> +<div class="listing"> + <ul> + <li> + <?= t('Database driver:') ?> + <strong><?= $this->e(DB_DRIVER) ?></strong> + </li> + <?php if (DB_DRIVER === 'sqlite'): ?> + <li> + <?= t('Database size:') ?> + <strong><?= $this->text->bytes($db_size) ?></strong> + </li> + <li> + <?= $this->url->link(t('Download the database'), 'config', 'downloadDb', array(), true) ?> + <?= t('(Gzip compressed Sqlite file)') ?> + </li> + <li> + <?= $this->url->link(t('Optimize the database'), 'config', 'optimizeDb', array(), true) ?> + <?= t('(VACUUM command)') ?> + </li> + <?php endif ?> + </ul> +</div> +<div class="page-header"> + <h2><?= t('Keyboard shortcuts') ?></h2> +</div> +<div class="listing"> + <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('Application') ?></h3> + <ul> + <li><?= t('Open board switcher') ?> = <strong>b</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>
\ 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..489f1968 --- /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><?= $this->e($values['api_token']) ?></strong> + </li> + <li> + <?= t('API endpoint:') ?> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().'jsonrpc.php' ?>"> + </li> + <li> + <?= $this->url->link(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..7d4c811d --- /dev/null +++ b/app/Template/config/application.php @@ -0,0 +1,30 @@ +<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->label(t('Language'), 'application_language') ?> + <?= $this->form->select('application_language', $languages, $values, $errors) ?><br/> + + <?= $this->form->label(t('Timezone'), 'application_timezone') ?> + <?= $this->form->select('application_timezone', $timezones, $values, $errors) ?><br/> + + <?= $this->form->label(t('Date format'), 'application_date_format') ?> + <?= $this->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> + + <?= $this->form->label(t('Custom Stylesheet'), 'application_stylesheet') ?> + <?= $this->form->textarea('application_stylesheet', $values, $errors) ?><br/> + + <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..19a4bcd7 --- /dev/null +++ b/app/Template/config/board.php @@ -0,0 +1,25 @@ +<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/> + <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/> + <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/> + <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"/> + </div> +</form> +</section>
\ No newline at end of file diff --git a/app/Template/config/calendar.php b/app/Template/config/calendar.php new file mode 100644 index 00000000..1cc985c8 --- /dev/null +++ b/app/Template/config/calendar.php @@ -0,0 +1,33 @@ +<div class="page-header"> + <h2><?= t('Calendar settings') ?></h2> +</div> +<section> +<form method="post" action="<?= $this->url->href('config', 'calendar') ?>" autocomplete="off"> + + <?= $this->form->csrf() ?> + + <h3><?= t('Project calendar view') ?></h3> + <div class="listing"> + <?= $this->form->radios('calendar_project_tasks', array( + 'date_creation' => t('Show tasks based on the creation date'), + 'date_started' => t('Show tasks based on the start date'), + ), $values) ?> + </div> + + <h3><?= t('User calendar view') ?></h3> + <div class="listing"> + <?= $this->form->radios('calendar_user_tasks', array( + 'date_creation' => t('Show tasks based on the creation date'), + 'date_started' => t('Show tasks based on the start date'), + ), $values) ?> + + <h4><?= t('Subtasks time tracking') ?></h4> + <?= $this->form->checkbox('calendar_user_subtasks_time_tracking', t('Show subtasks based on the time tracking'), 1, $values['calendar_user_subtasks_time_tracking'] == 1) ?> + <?= $this->form->checkbox('calendar_user_subtasks_forecast', t('Show subtask estimates (forecast of future work)'), 1, $values['calendar_user_subtasks_forecast'] == 1) ?> + </div> + + <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/integrations.php b/app/Template/config/integrations.php new file mode 100644 index 00000000..a1299806 --- /dev/null +++ b/app/Template/config/integrations.php @@ -0,0 +1,87 @@ +<div class="page-header"> + <h2><?= t('Integration with third-party services') ?></h2> +</div> + +<form method="post" action="<?= $this->url->href('config', 'integrations') ?>" autocomplete="off"> + + <?= $this->form->csrf() ?> + + <h3><img src="assets/img/mailgun-icon.png"/> <?= t('Mailgun (incoming emails)') ?></h3> + <div class="listing"> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'mailgun', array('token' => $values['webhook_token'])) ?>"/><br/> + <p class="form-help"><a href="http://kanboard.net/documentation/mailgun" target="_blank"><?= t('Help on Mailgun integration') ?></a></p> + </div> + + <h3><img src="assets/img/sendgrid-icon.png"/> <?= t('Sendgrid (incoming emails)') ?></h3> + <div class="listing"> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'sendgrid', array('token' => $values['webhook_token'])) ?>"/><br/> + <p class="form-help"><a href="http://kanboard.net/documentation/sendgrid" target="_blank"><?= t('Help on Sendgrid integration') ?></a></p> + </div> + + <h3><img src="assets/img/postmark-icon.png"/> <?= t('Postmark (incoming emails)') ?></h3> + <div class="listing"> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'postmark', array('token' => $values['webhook_token'])) ?>"/><br/> + <p class="form-help"><a href="http://kanboard.net/documentation/postmark" target="_blank"><?= t('Help on Postmark integration') ?></a></p> + </div> + + <h3><img src="assets/img/gravatar-icon.png"/> <?= t('Gravatar') ?></h3> + <div class="listing"> + <?= $this->form->checkbox('integration_gravatar', t('Enable Gravatar images'), 1, $values['integration_gravatar'] == 1) ?> + </div> + + <h3><img src="assets/img/jabber-icon.png"/> <?= t('Jabber (XMPP)') ?></h3> + <div class="listing"> + <?= $this->form->checkbox('integration_jabber', t('Send notifications to Jabber'), 1, $values['integration_jabber'] == 1) ?> + + <?= $this->form->label(t('XMPP server address'), 'integration_jabber_server') ?> + <?= $this->form->text('integration_jabber_server', $values, $errors, array('placeholder="tcp://myserver:5222"')) ?> + <p class="form-help"><?= t('The server address must use this format: "tcp://hostname:5222"') ?></p> + + <?= $this->form->label(t('Jabber domain'), 'integration_jabber_domain') ?> + <?= $this->form->text('integration_jabber_domain', $values, $errors, array('placeholder="example.com"')) ?> + + <?= $this->form->label(t('Username'), 'integration_jabber_username') ?> + <?= $this->form->text('integration_jabber_username', $values, $errors) ?> + + <?= $this->form->label(t('Password'), 'integration_jabber_password') ?> + <?= $this->form->password('integration_jabber_password', $values, $errors) ?> + + <?= $this->form->label(t('Jabber nickname'), 'integration_jabber_nickname') ?> + <?= $this->form->text('integration_jabber_nickname', $values, $errors) ?> + + <?= $this->form->label(t('Multi-user chat room'), 'integration_jabber_room') ?> + <?= $this->form->text('integration_jabber_room', $values, $errors, array('placeholder="myroom@conference.example.com"')) ?> + + <p class="form-help"><a href="http://kanboard.net/documentation/jabber" target="_blank"><?= t('Help on Jabber integration') ?></a></p> + </div> + + <h3><img src="assets/img/hipchat-icon.png"/> <?= t('Hipchat') ?></h3> + <div class="listing"> + <?= $this->form->checkbox('integration_hipchat', t('Send notifications to Hipchat'), 1, $values['integration_hipchat'] == 1) ?> + + <?= $this->form->label(t('API URL'), 'integration_hipchat_api_url') ?> + <?= $this->form->text('integration_hipchat_api_url', $values, $errors) ?> + + <?= $this->form->label(t('Room API ID or name'), 'integration_hipchat_room_id') ?> + <?= $this->form->text('integration_hipchat_room_id', $values, $errors) ?> + + <?= $this->form->label(t('Room notification token'), 'integration_hipchat_room_token') ?> + <?= $this->form->text('integration_hipchat_room_token', $values, $errors) ?> + + <p class="form-help"><a href="http://kanboard.net/documentation/hipchat" target="_blank"><?= t('Help on Hipchat integration') ?></a></p> + </div> + + <h3><i class="fa fa-slack fa-fw"></i> <?= t('Slack') ?></h3> + <div class="listing"> + <?= $this->form->checkbox('integration_slack_webhook', t('Send notifications to a Slack channel'), 1, $values['integration_slack_webhook'] == 1) ?> + + <?= $this->form->label(t('Webhook URL'), 'integration_slack_webhook_url') ?> + <?= $this->form->text('integration_slack_webhook_url', $values, $errors) ?> + + <p class="form-help"><a href="http://kanboard.net/documentation/slack" target="_blank"><?= t('Help on Slack integration') ?></a></p> + </div> + + <div class="form-actions"> + <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + </div> +</form>
\ 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..028f138c --- /dev/null +++ b/app/Template/config/layout.php @@ -0,0 +1,10 @@ +<section id="main"> + <section class="sidebar-container" id="config-section"> + + <?= $this->render('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/project.php b/app/Template/config/project.php new file mode 100644 index 00000000..90dd9c8e --- /dev/null +++ b/app/Template/config/project.php @@ -0,0 +1,24 @@ +<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() ?> + + <?= $this->form->label(t('Default columns for new projects (Comma-separated)'), 'board_columns') ?> + <?= $this->form->text('board_columns', $values, $errors) ?><br/> + <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/> + <p class="form-help"><?= t('Example: "Bug, Feature Request, Improvement"') ?></p> + + <?= $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('Enable time tracking for subtasks'), 1, $values['subtask_time_tracking'] == 1) ?> + + <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/sidebar.php b/app/Template/config/sidebar.php new file mode 100644 index 00000000..7f946dee --- /dev/null +++ b/app/Template/config/sidebar.php @@ -0,0 +1,35 @@ +<div class="sidebar"> + <h2><?= t('Actions') ?></h2> + <ul> + <li> + <?= $this->url->link(t('About'), 'config', 'index') ?> + </li> + <li> + <?= $this->url->link(t('Application settings'), 'config', 'application') ?> + </li> + <li> + <?= $this->url->link(t('Project settings'), 'config', 'project') ?> + </li> + <li> + <?= $this->url->link(t('Board settings'), 'config', 'board') ?> + </li> + <li> + <?= $this->url->link(t('Calendar settings'), 'config', 'calendar') ?> + </li> + <li> + <?= $this->url->link(t('Link settings'), 'link', 'index') ?> + </li> + <li> + <?= $this->url->link(t('Currency rates'), 'currency', 'index') ?> + </li> + <li> + <?= $this->url->link(t('Integrations'), 'config', 'integrations') ?> + </li> + <li> + <?= $this->url->link(t('Webhooks'), 'config', 'webhook') ?> + </li> + <li> + <?= $this->url->link(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..73ca3598 --- /dev/null +++ b/app/Template/config/webhook.php @@ -0,0 +1,35 @@ +<div class="page-header"> + <h2><?= t('Webhook settings') ?></h2> +</div> +<section> +<form method="post" action="<?= $this->url->href('config', '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"> + <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><?= $this->e($values['webhook_token']) ?></strong> + </li> + <li> + <?= t('URL for task creation:') ?> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'task', array('token' => $values['webhook_token'])) ?>"> + </li> + <li> + <?= $this->url->link(t('Reset token'), 'config', 'token', array('type' => 'webhook'), true) ?> + </li> + </ul> +</section>
\ No newline at end of file |