diff options
Diffstat (limited to 'app/Templates')
29 files changed, 215 insertions, 96 deletions
diff --git a/app/Templates/board_index.php b/app/Templates/board_index.php index da40468d..bff7dcc9 100644 --- a/app/Templates/board_index.php +++ b/app/Templates/board_index.php @@ -26,7 +26,13 @@ <?php if (empty($board)): ?> <p class="alert alert-error"><?= t('There is no column in your project!') ?></p> <?php else: ?> - <?= Helper\template('board_show', array('current_project_id' => $current_project_id, 'board' => $board, 'categories' => $categories)) ?> + <?= Helper\template('board_show', array( + 'current_project_id' => $current_project_id, + 'board' => $board, + 'categories' => $categories, + 'board_private_refresh_interval' => $board_private_refresh_interval, + 'board_highlight_period' => $board_highlight_period, + )) ?> <?php endif ?> </section> diff --git a/app/Templates/board_show.php b/app/Templates/board_show.php index e91ab4cf..e8c3c1ba 100644 --- a/app/Templates/board_show.php +++ b/app/Templates/board_show.php @@ -1,4 +1,4 @@ -<table id="board" data-project-id="<?= $current_project_id ?>" data-time="<?= time() ?>" data-check-interval="<?= BOARD_CHECK_INTERVAL ?>" data-csrf-token=<?= \Core\Security::getCSRFToken() ?>> +<table id="board" data-project-id="<?= $current_project_id ?>" data-time="<?= time() ?>" data-check-interval="<?= $board_private_refresh_interval ?>" data-csrf-token=<?= \Core\Security::getCSRFToken() ?>> <tr> <?php $column_with = round(100 / count($board), 2); ?> <?php foreach ($board as $column): ?> @@ -32,7 +32,7 @@ data-task-limit="<?= $column['task_limit'] ?>" > <?php foreach ($column['tasks'] as $task): ?> - <div class="task-board draggable-item task-<?= $task['color_id'] ?> <?= $task['date_modification'] > time() - RECENT_TASK_PERIOD ? 'task-board-recent' : '' ?>" + <div class="task-board draggable-item task-<?= $task['color_id'] ?> <?= $task['date_modification'] > time() - $board_highlight_period ? 'task-board-recent' : '' ?>" data-task-id="<?= $task['id'] ?>" data-owner-id="<?= $task['owner_id'] ?>" data-category-id="<?= $task['category_id'] ?>" diff --git a/app/Templates/config_about.php b/app/Templates/config_about.php new file mode 100644 index 00000000..3f34f802 --- /dev/null +++ b/app/Templates/config_about.php @@ -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) ?> + <?= t('(Gzip compressed Sqlite file)') ?> + </li> + <li> + <?= Helper\a(t('Optimize the database'), 'config', 'optimizeDb', array(), true) ?> + <?= t('(VACUUM command)') ?> + </li> + <?php endif ?> + </ul> +</section>
\ No newline at end of file diff --git a/app/Templates/config_api.php b/app/Templates/config_api.php new file mode 100644 index 00000000..037ea08d --- /dev/null +++ b/app/Templates/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><?= 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>
\ No newline at end of file diff --git a/app/Templates/config_application.php b/app/Templates/config_application.php new file mode 100644 index 00000000..251a45dc --- /dev/null +++ b/app/Templates/config_application.php @@ -0,0 +1,23 @@ +<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.kanboar.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/> + + <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/Templates/config_board.php b/app/Templates/config_board.php new file mode 100644 index 00000000..f260d084 --- /dev/null +++ b/app/Templates/config_board.php @@ -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>
\ No newline at end of file diff --git a/app/Templates/config_index.php b/app/Templates/config_index.php deleted file mode 100644 index 2d9ce116..00000000 --- a/app/Templates/config_index.php +++ /dev/null @@ -1,71 +0,0 @@ -<section id="main"> - - <div class="page-header"> - <h2><?= t('Application settings') ?></h2> - </div> - <section> - <form method="post" action="?controller=config&action=save" autocomplete="off"> - - <?= Helper\form_csrf() ?> - - <?= Helper\form_label(t('Language'), 'language') ?> - <?= Helper\form_select('language', $languages, $values, $errors) ?><br/> - - <?= Helper\form_label(t('Timezone'), 'timezone') ?> - <?= Helper\form_select('timezone', $timezones, $values, $errors) ?><br/> - - <?= Helper\form_label(t('Webhook URL for task creation'), 'webhooks_url_task_creation') ?> - <?= Helper\form_text('webhooks_url_task_creation', $values, $errors) ?><br/> - - <?= Helper\form_label(t('Webhook URL for task modification'), 'webhooks_url_task_modification') ?> - <?= Helper\form_text('webhooks_url_task_modification', $values, $errors) ?><br/> - - <?= Helper\form_label(t('Default columns for new projects (Comma-separated)'), 'default_columns') ?> - <?= Helper\form_text('default_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> - - <div class="page-header"> - <h2><?= t('More information') ?></h2> - </div> - <section class="settings"> - <ul> - <li><a href="?controller=config&action=tokens<?= Helper\param_csrf() ?>"><?= t('Reset all tokens') ?></a></li> - <li> - <?= t('Webhooks token:') ?> - <strong><?= Helper\escape($values['webhooks_token']) ?></strong> - </li> - <li> - <?= t('API token:') ?> - <strong><?= Helper\escape($values['api_token']) ?></strong> - </li> - <?php if (DB_DRIVER === 'sqlite'): ?> - <li> - <?= t('Database size:') ?> - <strong><?= Helper\format_bytes($db_size) ?></strong> - </li> - <li> - <a href="?controller=config&action=downloadDb<?= Helper\param_csrf() ?>"><?= t('Download the database') ?></a> - <?= t('(Gzip compressed Sqlite file)') ?> - </li> - <li> - <a href="?controller=config&action=optimizeDb <?= Helper\param_csrf() ?>"><?= t('Optimize the database') ?></a> - <?= t('(VACUUM command)') ?> - </li> - <?php endif ?> - <li> - <?= t('Official website:') ?> - <a href="http://kanboard.net/" target="_blank" rel="noreferer">http://kanboard.net/</a> - </li> - <li> - <?= t('Application version:') ?> - <?= APP_VERSION ?> - </li> - </ul> - </section> -</section> diff --git a/app/Templates/config_layout.php b/app/Templates/config_layout.php new file mode 100644 index 00000000..3aacb9b7 --- /dev/null +++ b/app/Templates/config_layout.php @@ -0,0 +1,13 @@ +<section id="main"> + <div class="page-header"> + <h2><?= t('Settings') ?></h2> + </div> + <section class="config-show" id="config-section"> + + <?= Helper\template('config_sidebar') ?> + + <div class="config-show-main"> + <?= $config_content_for_layout ?> + </div> + </section> +</section>
\ No newline at end of file diff --git a/app/Templates/config_sidebar.php b/app/Templates/config_sidebar.php new file mode 100644 index 00000000..d96159b8 --- /dev/null +++ b/app/Templates/config_sidebar.php @@ -0,0 +1,22 @@ +<div class="config-show-sidebar"> + <h2><?= t('Actions') ?></h2> + <div class="config-show-actions"> + <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> +</div>
\ No newline at end of file diff --git a/app/Templates/config_webhook.php b/app/Templates/config_webhook.php new file mode 100644 index 00000000..052a2a99 --- /dev/null +++ b/app/Templates/config_webhook.php @@ -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>
\ No newline at end of file diff --git a/app/Templates/layout.php b/app/Templates/layout.php index e0158dfb..434c5aca 100644 --- a/app/Templates/layout.php +++ b/app/Templates/layout.php @@ -6,8 +6,8 @@ <meta name="mobile-web-app-capable" content="yes"> <meta name="robots" content="noindex,nofollow"> - <?php if (isset($auto_refresh)): ?> - <meta http-equiv="refresh" content="<?= BOARD_PUBLIC_CHECK_INTERVAL ?>" > + <?php if (isset($board_public_refresh_interval)): ?> + <meta http-equiv="refresh" content="<?= $board_public_refresh_interval ?>" > <?php endif ?> <?php if (! isset($not_editable)): ?> diff --git a/app/Templates/notification_comment_creation.php b/app/Templates/notification_comment_creation.php index fac6ea25..5b334d76 100644 --- a/app/Templates/notification_comment_creation.php +++ b/app/Templates/notification_comment_creation.php @@ -4,4 +4,4 @@ <?= Helper\markdown($comment['comment']) ?> -<?= Helper\template('notification_footer', array('task' => $task)) ?>
\ No newline at end of file +<?= Helper\template('notification_footer', array('task' => $task, 'application_url' => $application_url)) ?>
\ No newline at end of file diff --git a/app/Templates/notification_comment_update.php b/app/Templates/notification_comment_update.php index 92c06ffb..04aafb85 100644 --- a/app/Templates/notification_comment_update.php +++ b/app/Templates/notification_comment_update.php @@ -4,4 +4,4 @@ <?= Helper\markdown($comment['comment']) ?> -<?= Helper\template('notification_footer', array('task' => $task)) ?>
\ No newline at end of file +<?= Helper\template('notification_footer', array('task' => $task, 'application_url' => $application_url)) ?>
\ No newline at end of file diff --git a/app/Templates/notification_file_creation.php b/app/Templates/notification_file_creation.php index 50f4a2d5..d8636820 100644 --- a/app/Templates/notification_file_creation.php +++ b/app/Templates/notification_file_creation.php @@ -2,4 +2,4 @@ <h3><?= t('New attachment added "%s"', $file['name']) ?></h3> -<?= Helper\template('notification_footer', array('task' => $task)) ?>
\ No newline at end of file +<?= Helper\template('notification_footer', array('task' => $task, 'application_url' => $application_url)) ?>
\ No newline at end of file diff --git a/app/Templates/notification_footer.php b/app/Templates/notification_footer.php index f0c9c0d4..533621f4 100644 --- a/app/Templates/notification_footer.php +++ b/app/Templates/notification_footer.php @@ -1,6 +1,6 @@ <hr/> Kanboard -<?php if (defined('KANBOARD_URL')): ?> - - <a href="<?= KANBOARD_URL.'?controller=task&action=show&task_id='.$task['id'] ?>"><?= t('view the task on Kanboard') ?></a>. +<?php if ($application_url): ?> + - <a href="<?= $application_url.'?controller=task&action=show&task_id='.$task['id'] ?>"><?= t('view the task on Kanboard') ?></a>. <?php endif ?> diff --git a/app/Templates/notification_subtask_creation.php b/app/Templates/notification_subtask_creation.php index c382355c..2ddfc649 100644 --- a/app/Templates/notification_subtask_creation.php +++ b/app/Templates/notification_subtask_creation.php @@ -14,4 +14,4 @@ </li> </ul> -<?= Helper\template('notification_footer', array('task' => $task)) ?>
\ No newline at end of file +<?= Helper\template('notification_footer', array('task' => $task, 'application_url' => $application_url)) ?>
\ No newline at end of file diff --git a/app/Templates/notification_subtask_update.php b/app/Templates/notification_subtask_update.php index ad6dfdc9..999edbf9 100644 --- a/app/Templates/notification_subtask_update.php +++ b/app/Templates/notification_subtask_update.php @@ -18,4 +18,4 @@ </li> </ul> -<?= Helper\template('notification_footer', array('task' => $task)) ?>
\ No newline at end of file +<?= Helper\template('notification_footer', array('task' => $task, 'application_url' => $application_url)) ?>
\ No newline at end of file diff --git a/app/Templates/notification_task_assignee_change.php b/app/Templates/notification_task_assignee_change.php index 65194f1e..d23f769e 100644 --- a/app/Templates/notification_task_assignee_change.php +++ b/app/Templates/notification_task_assignee_change.php @@ -17,4 +17,4 @@ <?= Helper\markdown($task['description']) ?: t('There is no description.') ?> <?php endif ?> -<?= Helper\template('notification_footer', array('task' => $task)) ?>
\ No newline at end of file +<?= Helper\template('notification_footer', array('task' => $task, 'application_url' => $application_url)) ?>
\ No newline at end of file diff --git a/app/Templates/notification_task_close.php b/app/Templates/notification_task_close.php index d9b2dce6..d56e71bb 100644 --- a/app/Templates/notification_task_close.php +++ b/app/Templates/notification_task_close.php @@ -2,4 +2,4 @@ <p><?= t('The task #%d have been closed.', $task['id']) ?></p> -<?= Helper\template('notification_footer', array('task' => $task)) ?>
\ No newline at end of file +<?= Helper\template('notification_footer', array('task' => $task, 'application_url' => $application_url)) ?>
\ No newline at end of file diff --git a/app/Templates/notification_task_creation.php b/app/Templates/notification_task_creation.php index 43b3b291..1b555096 100644 --- a/app/Templates/notification_task_creation.php +++ b/app/Templates/notification_task_creation.php @@ -40,4 +40,4 @@ <?= Helper\markdown($task['description']) ?> <?php endif ?> -<?= Helper\template('notification_footer', array('task' => $task)) ?>
\ No newline at end of file +<?= Helper\template('notification_footer', array('task' => $task, 'application_url' => $application_url)) ?>
\ No newline at end of file diff --git a/app/Templates/notification_task_due.php b/app/Templates/notification_task_due.php index 25ecc9f1..ae02f64e 100644 --- a/app/Templates/notification_task_due.php +++ b/app/Templates/notification_task_due.php @@ -12,4 +12,4 @@ <?php endforeach ?> </ul> -<?= Helper\template('notification_footer', array('task' => $task)) ?>
\ No newline at end of file +<?= Helper\template('notification_footer', array('task' => $task, 'application_url' => $application_url)) ?>
\ No newline at end of file diff --git a/app/Templates/notification_task_move_column.php b/app/Templates/notification_task_move_column.php index 026db776..c3f94df7 100644 --- a/app/Templates/notification_task_move_column.php +++ b/app/Templates/notification_task_move_column.php @@ -8,4 +8,4 @@ <li><?= t('Task position:').' '.Helper\escape($task['position']) ?></li> </ul> -<?= Helper\template('notification_footer', array('task' => $task)) ?>
\ No newline at end of file +<?= Helper\template('notification_footer', array('task' => $task, 'application_url' => $application_url)) ?>
\ No newline at end of file diff --git a/app/Templates/notification_task_move_position.php b/app/Templates/notification_task_move_position.php index 026db776..c3f94df7 100644 --- a/app/Templates/notification_task_move_position.php +++ b/app/Templates/notification_task_move_position.php @@ -8,4 +8,4 @@ <li><?= t('Task position:').' '.Helper\escape($task['position']) ?></li> </ul> -<?= Helper\template('notification_footer', array('task' => $task)) ?>
\ No newline at end of file +<?= Helper\template('notification_footer', array('task' => $task, 'application_url' => $application_url)) ?>
\ No newline at end of file diff --git a/app/Templates/notification_task_open.php b/app/Templates/notification_task_open.php index 7bf674cc..5d9f7d5b 100644 --- a/app/Templates/notification_task_open.php +++ b/app/Templates/notification_task_open.php @@ -2,4 +2,4 @@ <p><?= t('The task #%d have been opened.', $task['id']) ?></p> -<?= Helper\template('notification_footer', array('task' => $task)) ?>
\ No newline at end of file +<?= Helper\template('notification_footer', array('task' => $task, 'application_url' => $application_url)) ?>
\ No newline at end of file diff --git a/app/Templates/notification_task_update.php b/app/Templates/notification_task_update.php index 9fd61b57..b3c07911 100644 --- a/app/Templates/notification_task_update.php +++ b/app/Templates/notification_task_update.php @@ -40,4 +40,4 @@ <?= Helper\markdown($task['description']) ?: t('There is no description.') ?> <?php endif ?> -<?= Helper\template('notification_footer', array('task' => $task)) ?>
\ No newline at end of file +<?= Helper\template('notification_footer', array('task' => $task, 'application_url' => $application_url)) ?>
\ No newline at end of file diff --git a/app/Templates/project_share.php b/app/Templates/project_share.php index 6cfd85f6..f06d7671 100644 --- a/app/Templates/project_share.php +++ b/app/Templates/project_share.php @@ -4,7 +4,7 @@ <?php if ($project['is_public']): ?> - <div class="settings"> + <div class="listing"> <ul class="no-bullet"> <li><strong><i class="fa fa-share-alt"></i> <a href="?controller=board&action=readonly&token=<?= $project['token'] ?>" target="_blank"><?= t('Public link') ?></a></strong></li> <li><strong><i class="fa fa-rss-square"></i> <a href="?controller=project&action=feed&token=<?= $project['token'] ?>" target="_blank"><?= t('RSS feed') ?></a></strong></li> diff --git a/app/Templates/project_show.php b/app/Templates/project_show.php index 98ffb581..96b9e404 100644 --- a/app/Templates/project_show.php +++ b/app/Templates/project_show.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('Summary') ?></h2> </div> -<ul class="settings"> +<ul class="listing"> <li><strong><?= $project['is_active'] ? t('Active') : t('Inactive') ?></strong></li> <?php if ($project['is_public']): ?> diff --git a/app/Templates/user_external.php b/app/Templates/user_external.php index a67d886e..676b2c73 100644 --- a/app/Templates/user_external.php +++ b/app/Templates/user_external.php @@ -5,7 +5,7 @@ <?php if (GOOGLE_AUTH): ?> <h3><i class="fa fa-google"></i> <?= t('Google Account') ?></h3> - <p class="settings"> + <p class="listing"> <?php if (Helper\is_current_user($user['id'])): ?> <?php if (empty($user['google_id'])): ?> <a href="?controller=user&action=google<?= Helper\param_csrf() ?>"><?= t('Link my Google Account') ?></a> @@ -21,7 +21,7 @@ <?php if (GITHUB_AUTH): ?> <h3><i class="fa fa-github"></i> <?= t('Github Account') ?></h3> - <p class="settings"> + <p class="listing"> <?php if (Helper\is_current_user($user['id'])): ?> <?php if (empty($user['github_id'])): ?> <a href="?controller=user&action=gitHub<?= Helper\param_csrf() ?>"><?= t('Link my GitHub Account') ?></a> diff --git a/app/Templates/user_show.php b/app/Templates/user_show.php index 5d42d3cf..1c843751 100644 --- a/app/Templates/user_show.php +++ b/app/Templates/user_show.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('Summary') ?></h2> </div> -<ul class="settings"> +<ul class="listing"> <li><?= t('Username:') ?> <strong><?= Helper\escape($user['username']) ?></strong></li> <li><?= t('Name:') ?> <strong><?= Helper\escape($user['name']) ?></strong></li> <li><?= t('Email:') ?> <strong><?= Helper\escape($user['email']) ?></strong></li> |