diff options
| author | 2013-08-07 11:46:55 +0200 | |
|---|---|---|
| committer | 2013-08-07 11:46:55 +0200 | |
| commit | abb25a58dc8668c6716c419c99b215536861057a (patch) | |
| tree | 37be666df9383f447e84cfc29fa840e60678bebb /app/controllers/configureController.php | |
| parent | f6d730f9d1ce7957001bd981f04b32d67ebb44e6 (diff) | |
Fix issue #86 : possibilité de changer de thème
Désormais il est possible de créer des thèmes. Le thème peut être changé
sur la page de configuration. Les thèmes sont détectés grâce à un
fichier metadata.json détaillant le nom du thème, son auteur, une petite
description et une version.
Un nouveau thème "Flat design" a été ajouté et est pleinement
fonctionnel
Diffstat (limited to 'app/controllers/configureController.php')
| -rwxr-xr-x | app/controllers/configureController.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/configureController.php b/app/controllers/configureController.php index abd546504..6b582fde6 100755 --- a/app/controllers/configureController.php +++ b/app/controllers/configureController.php @@ -137,6 +137,8 @@ class configureController extends ActionController { } public function displayAction () { + RSSThemes::init(); + if (Request::isPost ()) { $language = Request::param ('language', 'en'); $nb = Request::param ('posts_per_page', 10); @@ -152,6 +154,7 @@ class configureController extends ActionController { $openSite = Request::param ('mark_open_site', 'no'); $scroll = Request::param ('mark_scroll', 'no'); $urlShaarli = Request::param ('shaarli', ''); + $theme = Request::param ('theme', 'default'); $this->view->conf->_language ($language); $this->view->conf->_postsPerPage (intval ($nb)); @@ -169,6 +172,7 @@ class configureController extends ActionController { 'scroll' => $scroll, )); $this->view->conf->_urlShaarli ($urlShaarli); + $this->view->conf->_theme ($theme); $values = array ( 'language' => $this->view->conf->language (), @@ -183,6 +187,7 @@ class configureController extends ActionController { 'anon_access' => $this->view->conf->anonAccess (), 'mark_when' => $this->view->conf->markWhen (), 'url_shaarli' => $this->view->conf->urlShaarli (), + 'theme' => $this->view->conf->theme () ); $confDAO = new RSSConfigurationDAO (); @@ -203,6 +208,8 @@ class configureController extends ActionController { Request::forward (array ('c' => 'configure', 'a' => 'display'), true); } + $this->view->themes = RSSThemes::get(); + View::prependTitle (Translate::t ('general_and_reading_management') . ' - '); } |
