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

@@ -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>