Add Themes: Dark, light and automatic mode

This commit is contained in:
Frédéric Guillot
2023-05-12 21:09:30 -07:00
committed by Frédéric Guillot
parent 65a5f0f47d
commit aade89c9ba
89 changed files with 1129 additions and 196 deletions

View File

@@ -30,7 +30,6 @@ class CssCommand extends BaseCommand
const CSS_DIST_PATH = 'assets/css/';
private $appFiles = [
'variables.css',
'base.css',
'links.css',
'titles.css',
@@ -105,7 +104,9 @@ class CssCommand extends BaseCommand
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->minifyFiles(self::CSS_SRC_PATH, $this->appFiles, 'app.min.css');
$this->minifyFiles(self::CSS_SRC_PATH, array_merge(['themes'.DIRECTORY_SEPARATOR.'light.css'], $this->appFiles), 'light.min.css');
$this->minifyFiles(self::CSS_SRC_PATH, array_merge(['themes'.DIRECTORY_SEPARATOR.'dark.css'], $this->appFiles), 'dark.min.css');
$this->minifyFiles(self::CSS_SRC_PATH, array_merge(['themes'.DIRECTORY_SEPARATOR.'auto.css'], $this->appFiles), 'auto.min.css');
$this->minifyFiles(self::CSS_SRC_PATH, $this->printFiles, 'print.min.css');
$vendorBundle = concat_files($this->vendorFiles);

View File

@@ -23,6 +23,7 @@ class UserCreationController extends BaseController
public function show(array $values = array(), array $errors = array())
{
$this->response->html($this->template->render('user_creation/show', array(
'themes' => $this->themeModel->getThemes(),
'timezones' => $this->timezoneModel->getTimezones(true),
'languages' => $this->languageModel->getLanguages(true),
'roles' => $this->role->getApplicationRoles(),

View File

@@ -46,6 +46,7 @@ class UserInviteController extends BaseController
'token' => $invite['token'],
'errors' => $errors,
'values' => $values + array('email' => $invite['email']),
'themes' => $this->themeModel->getThemes(),
'timezones' => $this->timezoneModel->getTimezones(true),
'languages' => $this->languageModel->getLanguages(true),
)));

View File

@@ -32,6 +32,7 @@ class UserModificationController extends BaseController
'values' => $values,
'errors' => $errors,
'user' => $user,
'themes' => $this->themeModel->getThemes(),
'timezones' => $this->timezoneModel->getTimezones(true),
'languages' => $this->languageModel->getLanguages(true),
'roles' => $this->role->getApplicationRoles(),
@@ -52,6 +53,7 @@ class UserModificationController extends BaseController
'username' => isset($values['username']) ? $values['username'] : '',
'name' => isset($values['name']) ? $values['name'] : '',
'email' => isset($values['email']) ? $values['email'] : '',
'theme' => isset($values['theme']) ? $values['theme'] : '',
'timezone' => isset($values['timezone']) ? $values['timezone'] : '',
'language' => isset($values['language']) ? $values['language'] : '',
'filter' => isset($values['filter']) ? $values['filter'] : '',

View File

@@ -43,6 +43,7 @@ class UserViewController extends BaseController
$user = $this->getUser();
$this->response->html($this->helper->layout->user('user_view/show', array(
'user' => $user,
'themes' => $this->themeModel->getThemes(),
'timezones' => $this->timezoneModel->getTimezones(true),
'languages' => $this->languageModel->getLanguages(true),
)));

View File

@@ -147,6 +147,7 @@ use Pimple\Container;
* @property \Kanboard\Model\TaskStatusModel $taskStatusModel
* @property \Kanboard\Model\TaskTagModel $taskTagModel
* @property \Kanboard\Model\TaskMetadataModel $taskMetadataModel
* @property \Kanboard\Model\ThemeModel $themeModel
* @property \Kanboard\Model\TimezoneModel $timezoneModel
* @property \Kanboard\Model\TransitionModel $transitionModel
* @property \Kanboard\Model\UserModel $userModel

View File

@@ -195,6 +195,21 @@ class UserSession extends Base
return session_get('user')['timezone'];
}
/**
* Get user theme
*
* @access public
* @return string
*/
public function getTheme()
{
if (! $this->isLogged()) {
return 'light';
}
return session_get('user')['theme'];
}
/**
* Return true if subtask list toggle is active
*

View File

@@ -12,6 +12,11 @@ use Kanboard\Core\Base;
*/
class UserHelper extends Base
{
public function getTheme()
{
return $this->userSession->getTheme();
}
/**
* Return subtask list toggle value
*

View File

@@ -1399,6 +1399,8 @@ return array(
// 'Reorder this column by assignee (Z-A)' => '',
// 'Reorder this column by due date (ASC)' => '',
// 'Reorder this column by due date (DESC)' => '',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
// '%s moved the task #%d "%s" to the project "%s"' => '',
// 'Task #%d "%s" has been moved to the project "%s"' => '',
// 'Move the task to another column when the due date is less than a certain number of days' => '',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
// 'Reorder this column by assignee (Z-A)' => '',
// 'Reorder this column by due date (ASC)' => '',
// 'Reorder this column by due date (DESC)' => '',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
// '%s moved the task #%d "%s" to the project "%s"' => '',
// 'Task #%d "%s" has been moved to the project "%s"' => '',
// 'Move the task to another column when the due date is less than a certain number of days' => '',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Změnit pořadí tohoto sloupce podle zadavatele (Z-A)',
'Reorder this column by due date (ASC)' => 'Změnit pořadí tohoto sloupce podle data vypršení platnosti (vzestupně)',
'Reorder this column by due date (DESC)' => 'Změnit pořadí tohoto sloupce podle data vypršení platnosti (sestupně)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s přesunul úkol #%d "%s" do projektu "%s"',
'Task #%d "%s" has been moved to the project "%s"' => 'Úkol #%d "%s" byl přesunut do projektu "%s"',
'Move the task to another column when the due date is less than a certain number of days' => 'Pokud je datum vypršení platnosti menší než určitý počet dní, přesuňte úlohu do jiného sloupce',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Sorter kolonne efter ansvarlig (Z-A)',
'Reorder this column by due date (ASC)' => 'Sorter kolonne efter udløbstid (ASC)',
'Reorder this column by due date (DESC)' => 'Sorter kolonne efter udløbstid (DESC)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s flyttet opgave #%d "%s" til projekt "%s"',
'Task #%d "%s" has been moved to the project "%s"' => 'Opgave #%d "%s" er flyttet til projekt "%s"',
'Move the task to another column when the due date is less than a certain number of days' => 'Flyt opgave til anden kolonne når afleveringsdato er mindre end et bestemt antal dage',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Spalte nach Zuständigem ordnen (Z-A)',
'Reorder this column by due date (ASC)' => 'Spalte nach Fälligkeitsdatum ordnen (aufsteigend)',
'Reorder this column by due date (DESC)' => 'Spalte nach Fälligkeitsdatum ordnen (absteigend)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s hat die Aufgabe #%d "%s" in das Projekt "%s" verschoben',
'Task #%d "%s" has been moved to the project "%s"' => 'Aufgabe #%d "%s" wurde in das Projekt "%s" verschoben',
'Move the task to another column when the due date is less than a certain number of days' => 'Verschieben der Aufgabe in eine andere Spalte, wenn die Fälligkeit kleiner als eine bestimmte Anzahl von Tagen ist',
@@ -1434,4 +1436,9 @@ return array(
'Copy' => 'Kopieren',
'Tasks copied successfully.' => 'Die Aufgaben wurden erfolgreich kopiert.',
'Unable to copy tasks.' => 'Die Aufgaben konnten nicht kopiert werden.',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Spalte nach Zuständigem ordnen (Z-A)',
'Reorder this column by due date (ASC)' => 'Spalte nach Fälligkeitsdatum ordnen (aufsteigend)',
'Reorder this column by due date (DESC)' => 'Spalte nach Fälligkeitsdatum ordnen (absteigend)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s hat die Aufgabe #%d "%s" in das Projekt "%s" verschoben',
'Task #%d "%s" has been moved to the project "%s"' => 'Aufgabe #%d "%s" wurde in das Projekt "%s" verschoben',
'Move the task to another column when the due date is less than a certain number of days' => 'Verschieben der Aufgabe in eine andere Spalte, wenn die Fälligkeit kleiner als eine bestimmte Anzahl von Tagen ist',
@@ -1434,4 +1436,9 @@ return array(
'Copy' => 'Kopieren',
'Tasks copied successfully.' => 'Die Aufgaben wurden erfolgreich kopiert.',
'Unable to copy tasks.' => 'Die Aufgaben konnten nicht kopiert werden.',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
// 'Reorder this column by assignee (Z-A)' => '',
// 'Reorder this column by due date (ASC)' => '',
// 'Reorder this column by due date (DESC)' => '',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
// '%s moved the task #%d "%s" to the project "%s"' => '',
// 'Task #%d "%s" has been moved to the project "%s"' => '',
// 'Move the task to another column when the due date is less than a certain number of days' => '',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Reordenar esta columna por persona asignada (Z-A)',
'Reorder this column by due date (ASC)' => 'Reordenar esta columna por fecha de vencimiento (ASC)',
'Reorder this column by due date (DESC)' => 'Reordenar esta columna por fecha de vencimiento (DESC)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s movió la tarea #%d "%s" al proyecto "%s',
'Task #%d "%s" has been moved to the project "%s"' => 'La tarea #%d "%s" se movió al proyecto "%s',
'Move the task to another column when the due date is less than a certain number of days' => 'Mueva la tarea a otra columna cuando la fecha de vencimiento sea inferior a un cierto número de días',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Reordenar esta columna por persona asignada (Z-A)',
'Reorder this column by due date (ASC)' => 'Reordenar esta columna por fecha de vencimiento (ASC)',
'Reorder this column by due date (DESC)' => 'Reordenar esta columna por fecha de vencimiento (DESC)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s movió la tarea #%d "%s" al proyecto "%s',
'Task #%d "%s" has been moved to the project "%s"' => 'La tarea #%d "%s" se movió al proyecto "%s',
'Move the task to another column when the due date is less than a certain number of days' => 'Mueva la tarea a otra columna cuando la fecha de vencimiento sea inferior a un cierto número de días',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'مرتب سازی این ستون بر اساس شخص محول شده (حروف الفبا نزولی)',
'Reorder this column by due date (ASC)' => 'مرتب سازی این ستون بر اساس تاریخ سررسید (صعودی)',
'Reorder this column by due date (DESC)' => 'مرتب سازی این ستون بر اساس تاریخ سررسید (نزولی)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => 'کاربر %s کار #%d "%s" را به پروژه "%s" منتقل کرد.',
'Task #%d "%s" has been moved to the project "%s"' => 'کار #%d "%s" به پروژه "%s" منتقل شد.',
'Move the task to another column when the due date is less than a certain number of days' => 'هنگامی که تاریخ سررسید کمتر از تعداد روز مشخصی شد، کار را به ستونی دیگر منتقل کن',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
// 'Reorder this column by assignee (Z-A)' => '',
// 'Reorder this column by due date (ASC)' => '',
// 'Reorder this column by due date (DESC)' => '',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
// '%s moved the task #%d "%s" to the project "%s"' => '',
// 'Task #%d "%s" has been moved to the project "%s"' => '',
// 'Move the task to another column when the due date is less than a certain number of days' => '',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Réorganiser cette colonne par assigné (Z-A)',
'Reorder this column by due date (ASC)' => 'Réorganiser cette colonne par date d\'échéance (ASC)',
'Reorder this column by due date (DESC)' => 'Réorganiser cette colonne par date d\'échéance (DESC)',
'Reorder this column by id (ASC)' => 'Réorganiser cette colonne par ID (ASC)',
'Reorder this column by id (DESC)' => 'Réorganiser cette colonne par ID (DESC)',
'%s moved the task #%d "%s" to the project "%s"' => '%s a déplacé la tâche #%d « %s » vers le projet « %s »',
'Task #%d "%s" has been moved to the project "%s"' => 'La tâche #%d « %s » a été déplacée vers le projet « %s »',
'Move the task to another column when the due date is less than a certain number of days' => 'Déplacer la tâche dans une autre colonne lorsque la date d\'échéance est inférieure à un certain nombre de jour',
@@ -1434,4 +1436,9 @@ return array(
'Copy' => 'Copier',
'Tasks copied successfully.' => 'Tâches copiées avec succès.',
'Unable to copy tasks.' => 'Impossible de copier les tâches.',
'Theme' => 'Thème',
'Theme:' => 'Thème :',
'Light theme' => 'Thème clair',
'Dark theme' => 'Thème sombre',
'Automatic theme - Sync with system' => 'Thème automatique - Se synchronize avec le système d\'exploitation',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Presloži ovaj stupac po izvršitelju (Ž-A)',
'Reorder this column by due date (ASC)' => 'Presloži ovaj stupac po roku završetka (UZLAZNO)',
'Reorder this column by due date (DESC)' => 'Presloži ovaj stupac po roku završetka (SILAZNO)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s je premjestio/la zadatak #%d "%s" u projekt "%s"',
'Task #%d "%s" has been moved to the project "%s"' => 'Zadatak #%d "%s" je premješten u projekt "%s"',
'Move the task to another column when the due date is less than a certain number of days' => 'Pomakni zadatak u drugi stupac kada je datum roka završetka kraći od određenog broja dana',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Oszlop átrendezése felelős szerint (Z-A)',
'Reorder this column by due date (ASC)' => 'Oszlop átrendezése határidő szerint (növekvő)',
'Reorder this column by due date (DESC)' => 'Oszlop átrendezése határidő szerint (csökkenő)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s áthelyezte a(z) #%d. „%s” feladatot ebbe a projektbe: „%s”',
'Task #%d "%s" has been moved to the project "%s"' => 'A(z) #%d. „%s” feladat áthelyezésre került ebbe a projektbe: „%s”',
'Move the task to another column when the due date is less than a certain number of days' => 'A feladat áthelyezése egy másik oszlopba, ha a határidő kevesebb egy bizonyos számú napnál',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Susun ulang kolom ini oleh penerima tugas (Z-A)',
'Reorder this column by due date (ASC)' => 'Susun ulang kolom ini sebelum tanggal jatuh tempo (ASC)',
'Reorder this column by due date (DESC)' => 'Susun ulang kolom ini berdasarkan tanggal jatuh tempo (DESC)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s memindahkan tugas #%d "%s" ke proyek "%s"',
'Task #%d "%s" has been moved to the project "%s"' => 'Task #%d "%s" telah dipindahkan ke proyek "%s"',
'Move the task to another column when the due date is less than a certain number of days' => 'Pindahkan tugas ke kolom lain ketika batas waktu kurang dari jumlah hari tertentu',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Ordina questa colonna per assegnatario (DESC)',
'Reorder this column by due date (ASC)' => 'Riordina questa colonna per dat di scadenza (ASCENDENTE)',
'Reorder this column by due date (DESC)' => 'Riordina questa colonna per dat di scadenza (DISCENDENTE)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s ha spostato il compito #%d "%s" al progetto "%s"',
'Task #%d "%s" has been moved to the project "%s"' => 'Il compito #%d "%s"è stato spostato al progetto "%s"',
'Move the task to another column when the due date is less than a certain number of days' => 'Sposta il compito ad un\'altra colonna se la dat di scadenza è più vicina di un certo numero di giorni',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => '担当者で並び替える(Z-A)',
'Reorder this column by due date (ASC)' => '期限で並び替える(昇順)',
'Reorder this column by due date (DESC)' => '期限で並び替える(降順)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s がタスク #%d "%s" をプロジェクト "%s" に移動しました',
'Task #%d "%s" has been moved to the project "%s"' => 'タスク#%d "%s" はプロジェクト "%s" へ移動されました ',
'Move the task to another column when the due date is less than a certain number of days' => '期限までの日数が規定値以下になったら、タスクを別のカラムに移動する',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
// 'Reorder this column by assignee (Z-A)' => '',
// 'Reorder this column by due date (ASC)' => '',
// 'Reorder this column by due date (DESC)' => '',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
// '%s moved the task #%d "%s" to the project "%s"' => '',
// 'Task #%d "%s" has been moved to the project "%s"' => '',
// 'Move the task to another column when the due date is less than a certain number of days' => '',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Променете го редоследот на оваа колона од извршител (Ш-A)',
'Reorder this column by due date (ASC)' => 'Променете го редоследот на оваа колона според рок за завршување (РАСТЕЧКИ)',
'Reorder this column by due date (DESC)' => 'Променете го редоследот на оваа колона според рок за завршување (ОПАЃАЧКИ)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s ја премести задачата #%d "%s" за да проектира "%s"',
'Task #%d "%s" has been moved to the project "%s"' => 'Задачата #%d "%s" е преместена во проектот "%s"',
'Move the task to another column when the due date is less than a certain number of days' => 'Поместете ја задачата во друга колона кога рок за завршување е пократок од одреден број денови',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
// 'Reorder this column by assignee (Z-A)' => '',
// 'Reorder this column by due date (ASC)' => '',
// 'Reorder this column by due date (DESC)' => '',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
// '%s moved the task #%d "%s" to the project "%s"' => '',
// 'Task #%d "%s" has been moved to the project "%s"' => '',
// 'Move the task to another column when the due date is less than a certain number of days' => '',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
// 'Reorder this column by assignee (Z-A)' => '',
// 'Reorder this column by due date (ASC)' => '',
// 'Reorder this column by due date (DESC)' => '',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
// '%s moved the task #%d "%s" to the project "%s"' => '',
// 'Task #%d "%s" has been moved to the project "%s"' => '',
// 'Move the task to another column when the due date is less than a certain number of days' => '',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
// 'Reorder this column by assignee (Z-A)' => '',
// 'Reorder this column by due date (ASC)' => '',
// 'Reorder this column by due date (DESC)' => '',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
// '%s moved the task #%d "%s" to the project "%s"' => '',
// 'Task #%d "%s" has been moved to the project "%s"' => '',
// 'Move the task to another column when the due date is less than a certain number of days' => '',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Sortuj kolumnę po osobie przydzielonej do zadania (malejąco)',
'Reorder this column by due date (ASC)' => 'Sortuj kolumnę po dacie zakończenia (rosnąco)',
'Reorder this column by due date (DESC)' => 'Sortuj kolumnę po dacie zakończenia (malejąco)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s przeniósł zadanie nr %d "%s" do projektu "%s"',
'Task #%d "%s" has been moved to the project "%s"' => 'Zadanie nr %d "%s" zostało przeniesione do projektu "%s"',
'Move the task to another column when the due date is less than a certain number of days' => 'Przenieś zadanie do innej kolumny, kiedy data zakończenia jest oddalona o określoną liczbę dni od aktualnej daty',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Reordenar esta coluna por designado (Z-A)',
'Reorder this column by due date (ASC)' => 'Reordenar esta coluna por data fim estimada (crescente)',
'Reorder this column by due date (DESC)' => 'Reordenar esta coluna por data fim estimada (decrescente)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s moveu a tarefa #%d "%s" para o projeto "%s"',
'Task #%d "%s" has been moved to the project "%s"' => 'Tarefa #%d "%s" foi movida para o projeto "%s"',
'Move the task to another column when the due date is less than a certain number of days' => 'Mover a tarefa para outra coluna quando a data fim estimada for menor que uma quantidade de dias',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Reordenar esta coluna por assignado (Z-A)',
'Reorder this column by due date (ASC)' => 'Reordenar esta coluna por data de vencimento (ASC)',
'Reorder this column by due date (DESC)' => 'Reordenar esta coluna por data de vencimento (DESC)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s moveu a tarefa #%d "%s" para o projeto "%s"',
'Task #%d "%s" has been moved to the project "%s"' => 'Tarefa #%d "%s" foi movida para o projeto "%s"',
'Move the task to another column when the due date is less than a certain number of days' => 'Mover a tarefa para outra coluna quando a data de vencimento é menos que um certo numero de dias',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
// 'Reorder this column by assignee (Z-A)' => '',
// 'Reorder this column by due date (ASC)' => '',
// 'Reorder this column by due date (DESC)' => '',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
// '%s moved the task #%d "%s" to the project "%s"' => '',
// 'Task #%d "%s" has been moved to the project "%s"' => '',
// 'Move the task to another column when the due date is less than a certain number of days' => '',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1391,8 +1391,6 @@ return array(
'Destination swimlane' => 'Целевая дорожка',
'Assign a category when the task is moved to a specific swimlane' => 'Присвоить категорию, если задача перемещена в определенную дорожку',
'Move the task to another swimlane when the category is changed' => 'Переместить задачу в другую дорожку, если категория изменена',
'Reorder this column by id (ASC)' => 'Упорядочить колонку по ID (ASC)',
'Reorder this column by id (DESC)' => 'Упорядочить колонку по ID (DESC)',
'Reorder this column by priority (ASC)' => 'Упорядочить колонку по приоритету (ASC)',
'Reorder this column by priority (DESC)' => 'Упорядочить колонку по приоритету (DESC)',
'Reorder this column by assignee and priority (ASC)' => 'Упорядочить колонку по назначенному пользователю и приоритету (ASC)',
@@ -1401,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Упорядочить колонку по назначенному пользователю (Я-А)',
'Reorder this column by due date (ASC)' => 'Упорядочить колонку по дате окончания (ASC)',
'Reorder this column by due date (DESC)' => 'Упорядочить колонку по дате окончания (DESC)',
'Reorder this column by id (ASC)' => 'Упорядочить колонку по ID (ASC)',
'Reorder this column by id (DESC)' => 'Упорядочить колонку по ID (DESC)',
'%s moved the task #%d "%s" to the project "%s"' => '%s переместил задачу #%d "%s" в проект "%s"',
'Task #%d "%s" has been moved to the project "%s"' => 'Задача #%d "%s" перемещена в проект "%s"',
'Move the task to another column when the due date is less than a certain number of days' => 'Переместить задачу в другую колонку, если дата окончания меньше заданного количества дней',
@@ -1436,4 +1436,9 @@ return array(
'Copy' => 'Копировать',
'Tasks copied successfully.' => 'Задачи успешно скопированы.',
'Unable to copy tasks.' => 'Не удалось скопировать задачи.',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Zoradiť stĺpec podľa pridelenia (Z-A)',
'Reorder this column by due date (ASC)' => 'Zoradiť stĺpec podľa termínu ukončenia (VZOST)',
'Reorder this column by due date (DESC)' => 'Zoradiť stĺpec podľa termínu ukončenia (ZOST)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s presunul/a úlohu č. %d „%s” do projektu „%s”',
'Task #%d "%s" has been moved to the project "%s"' => 'Úloha č. %d „%s” bola presunutá do projektu „%s”',
'Move the task to another column when the due date is less than a certain number of days' => 'Presunúť úlohu do iného stĺpca, keď je do termínu ukončenia menej ako zadaný počet dní',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Promenite redosled ove kolone prema izvršiocu (Ž-A)',
'Reorder this column by due date (ASC)' => 'Promenite redosled ove kolone prema roku završetka (UZLAZNO)',
'Reorder this column by due date (DESC)' => 'Promenite redosled ove kolone prema roku završetka (SILAZNO)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s je pomerio/la zadatak #%d "%s" u projekat "%s"',
'Task #%d "%s" has been moved to the project "%s"' => 'Zadatak #%d "%s" je premešten u projekat "%s"',
'Move the task to another column when the due date is less than a certain number of days' => 'Pomeri zadatak u neku drugu kolonu kada je datum roka završetka kraći od određenog broja dana',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Ändra ordning i denna kolumnen enligt tilldelning (Z-A)',
'Reorder this column by due date (ASC)' => 'Ändra ordning i denna kolumnen enligt förfallodatum (stigande)',
'Reorder this column by due date (DESC)' => 'Ändra ordning i denna kolumnen enligt förfallodatum (fallande)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s flyttade uppgift #%d "%s" till projektet "%s"',
'Task #%d "%s" has been moved to the project "%s"' => 'Uppgift #%d "%s" har flyttats till projektet "%s"',
'Move the task to another column when the due date is less than a certain number of days' => 'Flytta uppgiften till en annan kolumn när förfallodatum är närmare än ett visst antal dagar',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
// 'Reorder this column by assignee (Z-A)' => '',
// 'Reorder this column by due date (ASC)' => '',
// 'Reorder this column by due date (DESC)' => '',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
// '%s moved the task #%d "%s" to the project "%s"' => '',
// 'Task #%d "%s" has been moved to the project "%s"' => '',
// 'Move the task to another column when the due date is less than a certain number of days' => '',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Kolonu atanana göre azalan sırala (Z-A)',
'Reorder this column by due date (ASC)' => 'Kolonu hedef tarihe göre artan sırala',
'Reorder this column by due date (DESC)' => 'Kolonu hedef tarihe göre azalan sırala',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s görevi taşıdı #%d "%s" "%s" projesine',
'Task #%d "%s" has been moved to the project "%s"' => 'Görev #%d "%s" tarafından "%s" projesine taşındı',
'Move the task to another column when the due date is less than a certain number of days' => 'Hedef tarihe belirli bir gün sayısından az kaldığında görevi başka kolona taşı',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1391,8 +1391,6 @@ return array(
'Destination swimlane' => 'Доріжка призначення',
'Assign a category when the task is moved to a specific swimlane' => 'Призначити категорію, коли ця задача мереміщена на вказану доріжку',
'Move the task to another swimlane when the category is changed' => 'Перемістити цю задачу на іншу доріжку при зміні категорії',
'Reorder this column by id (ASC)' => 'Впорядкувати цю колонку за ID (ASC)',
'Reorder this column by id (DESC)' => 'Впорядкувати цю колонку за ID (DESC)',
'Reorder this column by priority (ASC)' => 'Впорядкувати цю колонку за зростанням пріоритету',
'Reorder this column by priority (DESC)' => 'Впорядкувати цю колонку за спаданням пріоритету',
'Reorder this column by assignee and priority (ASC)' => 'Впорядкувати цю колонку за відповідальним та зростанням пріоритету',
@@ -1401,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => 'Впорядкувати цю колонку за відповідальним (Я-А)',
'Reorder this column by due date (ASC)' => 'Впорядкувати цю колонку за зростанням терміну виконання',
'Reorder this column by due date (DESC)' => 'Впорядкувати цю колонку за спаданням терміну виконання',
'Reorder this column by id (ASC)' => 'Впорядкувати цю колонку за ID (ASC)',
'Reorder this column by id (DESC)' => 'Впорядкувати цю колонку за ID (DESC)',
'%s moved the task #%d "%s" to the project "%s"' => '%s перемістив задачу #%d "%s" до проєкту "%s"',
'Task #%d "%s" has been moved to the project "%s"' => 'Задача #%d "%s" переміщено до проєкту "%s"',
'Move the task to another column when the due date is less than a certain number of days' => 'Перемістити цю задачу до іншої колонки, коли до терміну виконання залишилося менше вказаного числа днів',
@@ -1436,4 +1436,9 @@ return array(
'Copy' => 'Копіювати',
'Tasks copied successfully.' => 'Завдання успішно скопійовано.',
'Unable to copy tasks.' => 'Не вдалося скопіювати завдання.',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
// 'Reorder this column by assignee (Z-A)' => '',
// 'Reorder this column by due date (ASC)' => '',
// 'Reorder this column by due date (DESC)' => '',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
// '%s moved the task #%d "%s" to the project "%s"' => '',
// 'Task #%d "%s" has been moved to the project "%s"' => '',
// 'Move the task to another column when the due date is less than a certain number of days' => '',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
'Reorder this column by assignee (Z-A)' => '按指派重排(Z-A)',
'Reorder this column by due date (ASC)' => '按逾期时间重排(升序)',
'Reorder this column by due date (DESC)' => '按逾期时间重排(降序)',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
'%s moved the task #%d "%s" to the project "%s"' => '%s 已将任务 #%d "%s" 移动到项目"%s" ',
'Task #%d "%s" has been moved to the project "%s"' => '任务 #%d "%s" 已被移动到项目 "%s"',
'Move the task to another column when the due date is less than a certain number of days' => '当任务即将在指定天数内超期时移动到另一栏',
@@ -1434,4 +1436,9 @@ return array(
'Copy' => '复制',
'Tasks copied successfully.' => '任务复制成功。',
'Unable to copy tasks.' => '无法复制任务。',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

View File

@@ -1399,6 +1399,8 @@ return array(
// 'Reorder this column by assignee (Z-A)' => '',
// 'Reorder this column by due date (ASC)' => '',
// 'Reorder this column by due date (DESC)' => '',
// 'Reorder this column by id (ASC)' => '',
// 'Reorder this column by id (DESC)' => '',
// '%s moved the task #%d "%s" to the project "%s"' => '',
// 'Task #%d "%s" has been moved to the project "%s"' => '',
// 'Move the task to another column when the due date is less than a certain number of days' => '',
@@ -1434,4 +1436,9 @@ return array(
// 'Copy' => '',
// 'Tasks copied successfully.' => '',
// 'Unable to copy tasks.' => '',
// 'Theme' => '',
// 'Theme:' => '',
// 'Light theme' => '',
// 'Dark theme' => '',
// 'Automatic theme - Sync with system' => '',
);

29
app/Model/ThemeModel.php Normal file
View File

@@ -0,0 +1,29 @@
<?php
namespace Kanboard\Model;
use Kanboard\Core\Base;
/**
* Class Theme
*
* @package Kanboard\Model
* @author Frederic Guillot
*/
class ThemeModel extends Base
{
/**
* Get available theme
*
* @access public
* @return array
*/
public function getThemes()
{
return [
'light' => t('Light theme'),
'dark' => t('Dark theme'),
'auto' => t('Automatic theme - Sync with system'),
];
}
}

View File

@@ -8,7 +8,12 @@ use PDO;
use Kanboard\Core\Security\Token;
use Kanboard\Core\Security\Role;
const VERSION = 1;
const VERSION = 2;
function version_2(PDO $pdo)
{
$pdo->exec("ALTER TABLE dbo.users ADD COLUMN theme nvarchar(50) DEFAULT N'light' NOT NULL");
}
function version_1(PDO $pdo)
{

View File

@@ -8,7 +8,12 @@ use PDO;
use Kanboard\Core\Security\Token;
use Kanboard\Core\Security\Role;
const VERSION = 137;
const VERSION = 138;
function version_138(PDO $pdo)
{
$pdo->exec("ALTER TABLE users ADD COLUMN theme VARCHAR(50) DEFAULT 'light' NOT NULL");
}
function version_137(PDO $pdo)
{

View File

@@ -8,7 +8,12 @@ use PDO;
use Kanboard\Core\Security\Token;
use Kanboard\Core\Security\Role;
const VERSION = 115;
const VERSION = 116;
function version_116(PDO $pdo)
{
$pdo->exec("ALTER TABLE users ADD COLUMN theme TEXT DEFAULT 'light' NOT NULL");
}
function version_115(PDO $pdo)
{

View File

@@ -8,9 +8,14 @@ use Kanboard\Core\Security\Token;
use Kanboard\Core\Security\Role;
use PDO;
const VERSION = 126;
const VERSION = 127;
function version_127(PDO $pdo)
{
$pdo->exec("ALTER TABLE users ADD COLUMN theme TEXT DEFAULT 'light' NOT NULL");
}
function version_126(PDO $pdo)
{
$pdo->exec('ALTER TABLE subtask_time_tracking RENAME TO subtask_time_tracking_old');

View File

@@ -90,6 +90,7 @@ class ClassProvider implements ServiceProviderInterface
'TaskStatusModel',
'TaskTagModel',
'TaskMetadataModel',
'ThemeModel',
'TimezoneModel',
'TransitionModel',
'UserModel',

View File

@@ -14,7 +14,11 @@
<?= $this->asset->colorCss() ?>
<?= $this->asset->css('assets/css/vendor.min.css') ?>
<?= $this->asset->css('assets/css/app.min.css') ?>
<?php if (! isset($not_editable)): ?>
<?= $this->asset->css('assets/css/'.$this->user->getTheme().'.min.css') ?>
<?php else: ?>
<?= $this->asset->css('assets/css/light.min.css') ?>
<?php endif ?>
<?= $this->asset->css('assets/css/print.min.css', true, 'print') ?>
<?= $this->asset->customCss() ?>

View File

@@ -19,6 +19,9 @@
<fieldset>
<legend><?= t('Preferences') ?></legend>
<?= $this->form->label(t('Theme'), 'theme') ?>
<?= $this->form->select('theme', $themes, $values, $errors, array($this->user->hasAccess('UserModificationController', 'show/edit_theme') ? '' : 'disabled')) ?>
<?= $this->form->label(t('Timezone'), 'timezone') ?>
<?= $this->form->select('timezone', $timezones, $values, $errors, array($this->user->hasAccess('UserModificationController', 'show/edit_timezone') ? '' : 'disabled')) ?>

View File

@@ -32,6 +32,7 @@
<h2><?= t('Preferences') ?></h2>
</div>
<ul class="panel">
<li><?= t('Theme:') ?> <strong><?= $this->text->in($user['theme'], $themes) ?></strong></li>
<li><?= t('Timezone:') ?> <strong><?= $this->text->in($user['timezone'], $timezones) ?></strong></li>
<li><?= t('Language:') ?> <strong><?= $this->text->in($user['language'], $languages) ?></strong></li>
<li><?= t('Custom Filter:') ?> <strong><?= $this->text->e($user['filter']) ?></strong></li>

View File

@@ -28,6 +28,7 @@ class UserValidator extends BaseValidator
new Validators\Unique('username', t('This username is already taken'), $this->db->getConnection(), UserModel::TABLE, 'id'),
new Validators\Email('email', t('Email address invalid')),
new Validators\Integer('is_ldap_user', t('This value must be an integer')),
new Validators\MaxLength('theme', t('The maximum length is %d characters', 50), 50),
);
}