diff --git a/config/default.schema.json b/config/default.schema.json index 1d3831afe5..c8c1c304f9 100644 --- a/config/default.schema.json +++ b/config/default.schema.json @@ -615,6 +615,11 @@ "type": "boolean", "default": false, "description": "Enables the media shelf feature" + }, + "FEATURE_ROOMS_ENABLED": { + "type": "boolean", + "default": false, + "description": "Enables the rooms feature" } }, "allOf": [ diff --git a/config/development.json b/config/development.json index e0c4253c75..bcb67ea313 100644 --- a/config/development.json +++ b/config/development.json @@ -10,5 +10,6 @@ "FEATURE_LOG_REQUEST": true, "FEATURE_PROMETHEUS_ENABLED": true, "FEATURE_ALERTS_ENABLED": true, - "PUBLIC_BACKEND_URL": "http://localhost:3030/api" + "PUBLIC_BACKEND_URL": "http://localhost:3030/api", + "FEATURE_ROOMS_ENABLED": true } diff --git a/helpers/handlebars/middleware.js b/helpers/handlebars/middleware.js index b917a61de2..cd8d9636e2 100644 --- a/helpers/handlebars/middleware.js +++ b/helpers/handlebars/middleware.js @@ -173,6 +173,17 @@ module.exports = (req, res, next) => { }); } + // Rooms Feature Toggle + const roomsEnabled = Configuration.get('FEATURE_ROOMS_ENABLED'); + if (roomsEnabled) { + res.locals.sidebarItems.splice(1, 0, { + name: res.$t('global.sidebar.link.rooms'), + testId: 'Rooms', + icon: 'account-supervisor-circle-outline', + link: '/rooms', + }); + } + // teacher views const newClassViewEnabled = Configuration.get('FEATURE_SHOW_NEW_CLASS_VIEW_ENABLED'); const teacherChildren = [ @@ -339,7 +350,7 @@ module.exports = (req, res, next) => { // team feature toggle const teamsEnabled = FEATURE_TEAMS_ENABLED === 'true'; if (teamsEnabled) { - res.locals.sidebarItems.splice(2, 0, { + res.locals.sidebarItems.splice(roomsEnabled ? 3 : 2, 0, { name: res.$t('global.link.teams'), testId: 'Teams', icon: 'account-group-outline', diff --git a/locales/de.json b/locales/de.json index 0e66a3532b..19dc6ae5ce 100644 --- a/locales/de.json +++ b/locales/de.json @@ -1749,6 +1749,7 @@ "administration": "Administration", "administrationClasses": "Klassen", "administrationCourses": "Kurse", + "rooms": "Räume", "system": "System", "accessibility": "Barrierefreiheit", "mediaShelf": "Medienregal" diff --git a/locales/en.json b/locales/en.json index 095e32ff2e..60af047684 100644 --- a/locales/en.json +++ b/locales/en.json @@ -1749,6 +1749,7 @@ "administration": "Administration", "administrationClasses": "Classes", "administrationCourses": "Courses", + "rooms": "Rooms", "system": "System", "accessibility": "Accessibility", "mediaShelf": "Media shelf" diff --git a/locales/es.json b/locales/es.json index 426853e244..e947a42597 100644 --- a/locales/es.json +++ b/locales/es.json @@ -1749,6 +1749,7 @@ "administration": "Administración", "administrationClasses": "Clases", "administrationCourses": "Cursos", + "rooms": "Salas", "system": "Sistema", "accessibility": "Accesibilidad", "mediaShelf": "Estante multimedia" diff --git a/locales/uk.json b/locales/uk.json index 4677938967..fdad221c3c 100644 --- a/locales/uk.json +++ b/locales/uk.json @@ -255,6 +255,7 @@ "administrationClasses": "Класи", "administrationCourses": "Курси", "administration": "Адміністрація", + "rooms": "Номери", "system": "Cистема", "accessibility": "Доступність", "mediaShelf": "Полиця для медіа"