summaryrefslogtreecommitdiffstats
path: root/controller
diff options
context:
space:
mode:
Diffstat (limited to 'controller')
-rw-r--r--controller/usersettingscontroller.php26
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