diff --git a/config/default.schema.json b/config/default.schema.json index af38ed0a71..2a8dfcabc2 100644 --- a/config/default.schema.json +++ b/config/default.schema.json @@ -611,11 +611,6 @@ "type": "boolean", "default": false, "description": "Enables the media shelf feature" - }, - "FEATURE_NEW_LAYOUT_ENABLED": { - "type": "boolean", - "default": false, - "description": "Enables the new layout feature" } }, "allOf": [ diff --git a/helpers/handlebars/middleware.js b/helpers/handlebars/middleware.js index 30dbec6dab..b66c53b0c1 100644 --- a/helpers/handlebars/middleware.js +++ b/helpers/handlebars/middleware.js @@ -384,67 +384,60 @@ module.exports = (req, res, next) => { ], }); + // system group + const systemLinks = []; - // new sidebar - - if (Configuration.get('FEATURE_NEW_LAYOUT_ENABLED')) { - // system group - const systemLinks = []; - - if (ALERT_STATUS_URL) { - systemLinks.push({ - link: ALERT_STATUS_URL, - name: res.$t('lib.global.link.status'), - testId: 'status', - isExternalLink: true, - }); - } - - if (SC_THEME !== 'default') { - systemLinks.push({ - link: res.locals.theme.documents.specificFiles.accessibilityStatement, - name: res.$t('lib.global.link.accessibilityStatement'), - testId: 'accessibility-statement', - isExternalLink: true, - }); - } + if (ALERT_STATUS_URL) { + systemLinks.push({ + link: ALERT_STATUS_URL, + name: res.$t('lib.global.link.status'), + testId: 'status', + isExternalLink: true, + }); + } + if (SC_THEME !== 'default') { systemLinks.push({ - name: res.$t('lib.help_menu.link.releaseNotes'), - link: '/system/releases', - testId: 'releases', + link: res.locals.theme.documents.specificFiles.accessibilityStatement, + name: res.$t('lib.global.link.accessibilityStatement'), + testId: 'accessibility-statement', + isExternalLink: true, }); + } - if (SC_THEME !== 'n21') { - systemLinks.push({ - name: res.$t('lib.global.link.github'), - link: 'https://github.com/hpi-schul-cloud', - testId: 'github', - isExternalLink: true, - }); - } + systemLinks.push({ + name: res.$t('lib.help_menu.link.releaseNotes'), + link: '/system/releases', + testId: 'releases', + }); - if (SC_THEME === 'default') { - systemLinks.push({ - link: '/system/security', - name: res.$t('lib.global.link.safety'), - testId: 'security', - }); - } + if (SC_THEME !== 'n21') { + systemLinks.push({ + name: res.$t('lib.global.link.github'), + link: 'https://github.com/hpi-schul-cloud', + testId: 'github', + isExternalLink: true, + }); + } - res.locals.sidebarItems.push( - { - name: res.$t('global.sidebar.link.system'), - icon: 'application-brackets-outline', - testId: 'system', - groupName: 'system', - link: '/system/', - children: systemLinks, - }, - ); + if (SC_THEME === 'default') { + systemLinks.push({ + link: '/system/security', + name: res.$t('lib.global.link.safety'), + testId: 'security', + }); } - // end new sidebar + res.locals.sidebarItems.push( + { + name: res.$t('global.sidebar.link.system'), + icon: 'application-brackets-outline', + testId: 'system', + groupName: 'system', + link: '/system/', + children: systemLinks, + }, + ); makeActive(res.locals.sidebarItems, url.parse(req.url).pathname); diff --git a/static/scripts/loggedin.js b/static/scripts/loggedin.js index 38a566d551..876f4a2cd8 100644 --- a/static/scripts/loggedin.js +++ b/static/scripts/loggedin.js @@ -22,7 +22,6 @@ function showHideGlobalAnnouncement() { } } -// new sidebar function toggleSidebarItemGroup(groupData) { const itemGroup = document.querySelector(`.${groupData.groupName}`); if (itemGroup) { @@ -210,7 +209,6 @@ $(document).ready(() => { }); $(document).ready(function () { - // new sidebar const groupToggleBtns = document.querySelectorAll('.group-toggle-btn'); if (groupToggleBtns) { groupToggleBtns.forEach((btn) => { diff --git a/static/styles/lib/loggedin.scss b/static/styles/lib/loggedin.scss index e51c821677..25393da53b 100644 --- a/static/styles/lib/loggedin.scss +++ b/static/styles/lib/loggedin.scss @@ -392,21 +392,10 @@ header { display: flex; flex-direction: column; transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); + padding-left: 255px; - &.new-sidebar { - padding-left: 255px; - - @media only screen and (max-width: 1279px) { - padding: 0; - } - } - - &.old-sidebar { - padding-left: 240px; - - @include media-breakpoint-down(md) { - padding-left: 60px; - } + @media only screen and (max-width: 1279px) { + padding: 0; } @include media-breakpoint-down(xs) { diff --git a/views/lib/loggedin.hbs b/views/lib/loggedin.hbs index 65a17a9b02..eb37ebf23d 100644 --- a/views/lib/loggedin.hbs +++ b/views/lib/loggedin.hbs @@ -45,59 +45,9 @@ {{/if}} - {{!-- new sidebar --}} - {{#if (getConfig "FEATURE_NEW_LAYOUT_ENABLED")}} - {{#embed "lib/sidebar"}}{{/embed}} - {{else}} - - - {{/if}} + {{#embed "lib/sidebar"}}{{/embed}} -
+
{{/content}} {{/extend}}