diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2013-12-19 14:09:59 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2013-12-19 14:09:59 +0100 |
commit | 28d28d8c9eb5ed9f184b572cfd16994c024e4227 (patch) | |
tree | 18899de14c93e01a64d28823577836d69038256a /controller | |
parent | 11e170fc19b6dd64e77a7b7b2d53ab6d17018aed (diff) |
add serverside infrastructure for setting and remembering compact view
Diffstat (limited to 'controller')
-rw-r--r-- | controller/usersettingscontroller.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/controller/usersettingscontroller.php b/controller/usersettingscontroller.php index fdbb69b88..9dd14fbf2 100644 --- a/controller/usersettingscontroller.php +++ b/controller/usersettingscontroller.php @@ -92,5 +92,31 @@ class UserSettingsController extends Controller { } + /** + * @IsAdminExemption + * @IsSubAdminExemption + * @Ajax + */ + public function isCompactView(){ + $compact = $this->api->getUserValue('compact'); + $params = array( + 'compact' => $compact === '1' + ); + return $this->renderJSON($params); + } + + + /** + * @IsAdminExemption + * @IsSubAdminExemption + * @Ajax + */ + public function setCompactView(){ + $isCompact = $this->params('compact'); + $this->api->setUserValue('compact', $isCompact); + + return $this->renderJSON(); + } + }
\ No newline at end of file |