Improve timezone pull-request and settings page
This commit is contained in:
parent
e374a6fd64
commit
64e2e07229
|
|
@ -16,7 +16,7 @@ class Config extends Base
|
|||
'errors' => array(),
|
||||
'menu' => 'config',
|
||||
'title' => t('Settings'),
|
||||
'timezones' => array_combine(timezone_identifiers_list(), timezone_identifiers_list())
|
||||
'timezones' => $this->config->getTimezones()
|
||||
)));
|
||||
}
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ class Config extends Base
|
|||
'errors' => $errors,
|
||||
'menu' => 'config',
|
||||
'title' => t('Settings'),
|
||||
'timezones' => array_combine(timezone_identifiers_list(), timezone_identifiers_list())
|
||||
'timezones' => $this->config->getTimezones()
|
||||
)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ return array(
|
|||
'settings' => 'préférences',
|
||||
'Application Settings' => 'Paramètres de l\'application',
|
||||
'Language' => 'Langue',
|
||||
'Webhooks token' => 'Jeton de securité pour les webhooks',
|
||||
'Webhooks token:' => 'Jeton de securité pour les webhooks :',
|
||||
'More information' => 'Plus d\'informations',
|
||||
'Database size:' => 'Taille de la base de données :',
|
||||
'Download the database' => 'Télécharger la base de données',
|
||||
|
|
@ -183,7 +183,5 @@ return array(
|
|||
'There is no column in your project!' => 'Il n\'y a aucune colonne dans votre projet !',
|
||||
'Change assignee' => 'Changer la personne assignée',
|
||||
'Change assignee for the task "%s"' => 'Changer la personne assignée pour la tâche « %s »',
|
||||
/* missing
|
||||
'Timezone' => ''
|
||||
*/
|
||||
'Timezone' => 'Fuseau horaire',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ return array(
|
|||
'settings' => 'ustawienia',
|
||||
'Application Settings' => 'Ustawienia aplikacji',
|
||||
'Language' => 'Język',
|
||||
'Webhooks token' => 'Token',
|
||||
'Webhooks token:' => 'Token :',
|
||||
'More information' => 'Więcej informacji',
|
||||
'Database size:' => 'Rozmiar bazy danych :',
|
||||
'Download the database' => 'Pobierz bazę danych',
|
||||
|
|
|
|||
|
|
@ -9,6 +9,12 @@ class Config extends Base
|
|||
{
|
||||
const TABLE = 'config';
|
||||
|
||||
public function getTimezones()
|
||||
{
|
||||
$timezones = \timezone_identifiers_list();
|
||||
return array_combine(array_values($timezones), $timezones);
|
||||
}
|
||||
|
||||
public function getLanguages()
|
||||
{
|
||||
$languages = array(
|
||||
|
|
|
|||
|
|
@ -4,10 +4,7 @@ namespace Schema;
|
|||
|
||||
function version_4($pdo)
|
||||
{
|
||||
$pdo->exec('ALTER TABLE config ADD column timezone TEXT');
|
||||
|
||||
//set default timezone to UTC
|
||||
$pdo->exec('UPDATE config SET timezone = \'UTC\'');
|
||||
$pdo->exec("ALTER TABLE config ADD column timezone TEXT DEFAULT 'UTC'");
|
||||
}
|
||||
|
||||
function version_3($pdo)
|
||||
|
|
|
|||
|
|
@ -10,11 +10,9 @@
|
|||
<?= Helper\form_label(t('Language'), 'language') ?>
|
||||
<?= Helper\form_select('language', $languages, $values, $errors) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Webhooks token'), 'webhooks_token') ?>
|
||||
<?= Helper\form_text('webhooks_token', $values, $errors, array('readonly')) ?><br/>
|
||||
|
||||
<?= Helper\form_label(t('Timezone'), 'timezone') ?>
|
||||
<?= Helper\form_select('timezone', $timezones, $values, $errors) ?><br/>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
|
|
@ -25,6 +23,10 @@
|
|||
</div>
|
||||
<section class="settings">
|
||||
<ul>
|
||||
<li>
|
||||
<?= t('Webhooks token:') ?>
|
||||
<strong><?= Helper\escape($values['webhooks_token']) ?></strong>
|
||||
</li>
|
||||
<li><?= t('Database size:') ?> <strong><?= Helper\format_bytes($db_size) ?></strong></li>
|
||||
<li>
|
||||
<a href="?controller=config&action=downloadDb"><?= t('Download the database') ?></a>
|
||||
|
|
|
|||
Loading…
Reference in New Issue