diff --git a/controllers/BaseController.php b/controllers/BaseController.php index 87ac9af0..6d7eef6f 100644 --- a/controllers/BaseController.php +++ b/controllers/BaseController.php @@ -125,21 +125,26 @@ class BaseController }); $this->View->set('GettextPo', $localizationService->GetPoAsJsonString()); + // TODO: Better handle this generically based on the current language (header in .po file?) + $dir = 'ltr'; + if (GROCY_LOCALE == 'he_IL') + { + $dir = 'rtl'; + } + $this->View->set('dir', $dir); + $this->View->set('U', function ($relativePath, $isResource = false) use ($container) { return $container->get('UrlManager')->ConstructUrl($relativePath, $isResource); }); $embedded = false; - if (isset($_GET['embedded'])) { $embedded = true; } - $this->View->set('embedded', $embedded); $constants = get_defined_constants(); - foreach ($constants as $constant => $value) { if (substr($constant, 0, 19) !== 'GROCY_FEATURE_FLAG_') @@ -149,7 +154,6 @@ class BaseController } $this->View->set('featureFlags', $constants); - if (GROCY_AUTHENTICATED) { $this->View->set('permissions', User::PermissionList()); diff --git a/package.json b/package.json index 27d28b1d..def59616 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "bootbox": "^5.3.2", "bootstrap": "^4.5.2", "bootstrap-select": "^1.13.18", + "bootstrap-v4-rtl": "^4.5.2-1", "chart.js": "^2.8.0", "datatables.net": "^1.10.22", "datatables.net-bs4": "^1.10.22", diff --git a/views/layout/default.blade.php b/views/layout/default.blade.php index ca03ee6e..173b20f8 100644 --- a/views/layout/default.blade.php +++ b/views/layout/default.blade.php @@ -1,5 +1,6 @@ - +
@@ -47,8 +48,13 @@