Skip to content

Commit 1ba90d2

Browse files
authored
BC-11125 Info banner lernstore (#3742)
- Info-Banner zur Abschaltung Lernstore - help-page link differ depending on theme/env
1 parent 0a501e4 commit 1ba90d2

File tree

6 files changed

+83
-14
lines changed

6 files changed

+83
-14
lines changed

controllers/dashboard.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const api = require('../api');
1212
const timesHelper = require('../helpers/timesHelper');
1313

1414
const recurringEventsHelper = require('../helpers/recurringEvents');
15+
const { SC_THEME } = require('../config/global');
1516

1617
// secure routes
1718
router.use(authHelper.authChecker);
@@ -360,6 +361,19 @@ router.get('/', (req, res, next) => {
360361
);
361362
}
362363

364+
const translateKeyInfobanner = () => {
365+
switch (SC_THEME) {
366+
case 'n21':
367+
return 'dashboard.text.lernStoreBannerItem0_n21';
368+
case 'thr':
369+
return 'dashboard.text.lernStoreBannerItem0_thr';
370+
case 'brb':
371+
return 'dashboard.text.lernStoreBannerItem0_brb';
372+
default:
373+
return 'dashboard.text.lernStoreBannerItem0_dbc';
374+
}
375+
};
376+
363377
res.render('dashboard/dashboard', {
364378
title: res.$t('dashboard.headline.title'),
365379
events: events.reverse(),
@@ -380,6 +394,7 @@ router.get('/', (req, res, next) => {
380394
news,
381395
hours,
382396
currentTimePercentage,
397+
translateKeyInfoBanner: translateKeyInfobanner(),
383398
showNewReleaseModal: newRelease,
384399
currentTime: timesHelper.fromUTC(currentTime).format('HH:mm'),
385400
isTeacher: hasRole(teacher),

locales/de.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,13 @@
10141014
"noDueDate": "Kein Abgabedatum festgelegt",
10151015
"noMaterialsYetLookAtOthers": "Sie haben noch keine eigenen Materialien erstellt. Sie können sich aber auch Inspiration in Materialien Ihrer Kolleg:innen holen. Schauen Sie doch im <a href=\"/my-material\">\"Meine Materialien\"-Abschnitt</a> vorbei.",
10161016
"noNews": "Keine Neuigkeiten",
1017-
"notFound": "Keine aktuellen Einträge vorhanden."
1017+
"notFound": "Keine aktuellen Einträge vorhanden.",
1018+
"lernStoreBannerTitle": "Die Medien sind künftig über das Medienregal erreichbar",
1019+
"lernStoreBannerItem0_dbc": "Ab sofort sind die Mediatheken aus dem Lern-Store (Mundo und Wir lernen online) über das Medienregal verfügbar und die Inhalte können in Bereichen als Tool eingebunden werden. Weitere Infos zu den erweiterten Such- und Filtermöglichkeiten sowie der Einbindung von Inhalten via Deeplink sind auf den <a href=\"https://dbildungscloud.de/help/confluence/44073000\">Hilfeseiten</a> zu finden.",
1020+
"lernStoreBannerItem0_n21": "Ab sofort sind die Mediatheken aus dem Lern-Store (Mundo und Wir lernen online) über das Medienregal verfügbar und die Inhalte können in Bereichen als Tool eingebunden werden. Weitere Infos zu den erweiterten Such- und Filtermöglichkeiten sowie der Einbindung von Inhalten via Deeplink sind auf den <a href=\"https://niedersachsen.cloud/help/confluence/44073000\">Hilfeseiten</a> zu finden.",
1021+
"lernStoreBannerItem0_brb": "Ab sofort sind die Mediatheken aus dem Lern-Store (Mundo, Wir lernen online und FWU-Medien) über das Medienregal verfügbar und die Inhalte können in Bereichen als Tool eingebunden werden. Weitere Infos zu den erweiterten Such- und Filtermöglichkeiten sowie der Einbindung von Inhalten via Deeplink sind auf den <a href=\"https://brandenburg.cloud/help/confluence/44073000\">Hilfeseiten</a> zu finden.",
1022+
"lernStoreBannerItem0_thr": "Ab sofort sind die Mediatheken aus dem Lern-Store (Mundo, Wir lernen online und Mediothek/Pixiothek) über das Medienregal verfügbar und die Inhalte können in Bereichen als Tool eingebunden werden. Weitere Infos zu den erweiterten Such- und Filtermöglichkeiten sowie der Einbindung von Inhalten via Deeplink sind auf den <a href=\"https://schulcloud-thueringen.de/help/confluence/44073000\">Hilfeseiten</a> zu finden.",
1023+
"lernStoreBannerItem1": "Der Lern-Store wird daher in KW 10 (04.03.2026) abgeschaltet. In den Themen bereits eingebundene Lern-Store-Inhalte sind weiterhin verfügbar."
10181024
}
10191025
},
10201026
"dataprivacy": {

locales/en.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,13 @@
10141014
"noDueDate": "No submission date set",
10151015
"noMaterialsYetLookAtOthers": "You have not yet created your own materials. But you can also get inspiration from your colleagues' materials. Check out the <a href=\"/my-material\">\"My Materials\" section</a> .",
10161016
"noNews": "No news",
1017-
"notFound": "No active entries found."
1017+
"notFound": "No active entries found.",
1018+
"lernStoreBannerTitle": "In the future, the media will be accessible via the media shelf",
1019+
"lernStoreBannerItem0_dbc": "From now on, the media libraries from Learning Store (Mundo and Wir lernen online) are available via the media shelf, and the contents can be integrated into areas as a tool. Further information on the extended search and filter options as well as the integration of content via deep links can be found on the <a href=\"https://dbildungscloud.de/help/confluence/44073000\">help pages</a>.",
1020+
"lernStoreBannerItem0_n21": "From now on, the media libraries from Learning Store (Mundo and Wir lernen online) are available via the media shelf, and the contents can be integrated into areas as a tool. Further information on the extended search and filter options as well as the integration of content via deep links can be found on the <a href=\"https://niedersachsen.cloud/help/confluence/44073000\">help pages</a>.",
1021+
"lernStoreBannerItem0_brb": "From now on, the media libraries from Learning Store (Mundo, Wir lernen online and FWU-Media) are available via the media shelf, and the contents can be integrated into areas as a tool. Further information on the extended search and filter options as well as the integration of content via deep links can be found on the <a href=\"https://brandenburg.cloud/help/confluence/44073000\">help pages</a>.",
1022+
"lernStoreBannerItem0_thr": "From now on, the media libraries from Learning Store (Mundo, Wir lernen online and Mediothek/Pixiothek) are available via the media shelf, and the contents can be integrated into areas as a tool. Further information on the extended search and filter options as well as the integration of content via deep links can be found on the <a href=\"https://schulcloud-thueringen.de/help/confluence/44073000\">help pages</a>.",
1023+
"lernStoreBannerItem1": "The Learning Store will therefore be shut down in week 10 (03/04/2026). Learning Store content already integrated into topics will remain available."
10181024
}
10191025
},
10201026
"dataprivacy": {

locales/es.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,13 @@
10141014
"noDueDate": "No se ha fijado una fecha de envío",
10151015
"noMaterialsYetLookAtOthers": "Aún no has creado tus propios materiales. También puedes inspirarte en los materiales de tus compañeros. Consulta la <a href=\"/my-material\">sección \"Mis materiales\"</a>.",
10161016
"noNews": "No hay noticias",
1017-
"notFound": "No se han encontrado entradas activas."
1017+
"notFound": "No se han encontrado entradas activas.",
1018+
"lernStoreBannerTitle": "En el futuro, los medios estarán disponibles a través del estante de medios",
1019+
"lernStoreBannerItem0_dbc": "A partir de ahora, las mediatecas del Lern-store (Mundo y Wir lernen online) están disponibles a través del estante de medios y los contenidos pueden integrarse en áreas como herramienta. Más información sobre las opciones avanzadas de búsqueda y filtrado, así como la integración de contenidos mediante enlaces profundos, se encuentra en las <a href=\"https://dbildungscloud.de/help/confluence/44073000\">páginas de ayuda</a>.",
1020+
"lernStoreBannerItem0_n21": "A partir de ahora, las mediatecas del Lern-store (Mundo y Wir lernen online) están disponibles a través del estante de medios y los contenidos pueden integrarse en áreas como herramienta. Más información sobre las opciones avanzadas de búsqueda y filtrado, así como la integración de contenidos mediante enlaces profundos, se encuentra en las <a href=\"https://niedersachsen.cloud/help/confluence/44073000\">páginas de ayuda</a>.",
1021+
"lernStoreBannerItem0_brb": "A partir de ahora, las mediatecas del Lern-store (Mundo, Wir lernen online y FWU-Medios) están disponibles a través del estante de medios y los contenidos pueden integrarse en áreas como herramienta. Más información sobre las opciones avanzadas de búsqueda y filtrado, así como la integración de contenidos mediante enlaces profundos, se encuentra en las <a href=\"https://brandenburg.cloud/help/confluence/44073000\">páginas de ayuda</a>.",
1022+
"lernStoreBannerItem0_thr": "A partir de ahora, las mediatecas del Lern-store (Mundo, Wir lernen online y Mediothek/Pixiothek) están disponibles a través del estante de medios y los contenidos pueden integrarse en áreas como herramienta. Más información sobre las opciones avanzadas de búsqueda y filtrado, así como la integración de contenidos mediante enlaces profundos, se encuentra en las <a href=\"https://schulcloud-thueringen.de/help/confluence/44073000\">páginas de ayuda</a>.",
1023+
"lernStoreBannerItem1": "Por lo tanto, el Lern-store se desconectará en la semana 10 (04.03.2026). Los contenidos del Lern-store ya integrados en los temas seguirán estando disponibles."
10181024
}
10191025
},
10201026
"dataprivacy": {

locales/uk.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@
1717
"noDueDate": "Дата подання не встановлена",
1818
"noMaterialsYetLookAtOthers": "Ви ще не створили власні матеріали. Але ви також можете черпати натхнення з матеріалів своїх колег. Перевірте <a href=\"/my-material\">Розділ «Мої матеріали»</a>.",
1919
"graded": "Оцінено",
20-
"handedIn": "Подані"
20+
"handedIn": "Подані",
21+
"lernStoreBannerTitle": "У майбутньому медіа будуть доступні через медіаполицю",
22+
"lernStoreBannerItem0_dbc": "З цього моменту медіатеки з Навчальний магазин (Mundo і Wir lernen online) доступні через медіаполицю, а вміст можна інтегрувати в розділи як інструмент. Додаткову інформацію про розширені можливості пошуку та фільтрації, а також інтеграцію вмісту через глибокі посилання можна знайти на <a href=\"https://dbildungscloud.de/help/confluence/44073000\">сторінках допомоги</a>.",
23+
"lernStoreBannerItem0_n21": "З цього моменту медіатеки з Навчальний магазин (Mundo і Wir lernen online) доступні через медіаполицю, а вміст можна інтегрувати в розділи як інструмент. Додаткову інформацію про розширені можливості пошуку та фільтрації, а також інтеграцію вмісту через глибокі посилання можна знайти на <a href=\"https://niedersachsen.cloud/help/confluence/44073000\">сторінках допомоги</a>.",
24+
"lernStoreBannerItem0_brb": "З цього моменту медіатеки з Навчальний магазин (Mundo, Wir lernen online та FWU-Медіа) доступні через медіаполицю, а вміст можна інтегрувати в розділи як інструмент. Додаткову інформацію про розширені можливості пошуку та фільтрації, а також інтеграцію вмісту через глибокі посилання можна знайти на <a href=\"https://brandenburg.cloud/help/confluence/44073000\">сторінках допомоги</a>.",
25+
"lernStoreBannerItem0_thr": "З цього моменту медіатеки з Навчальний магазин (Mundo, Wir lernen online та Mediothek/Pixiothek) доступні через медіаполицю, а вміст можна інтегрувати в розділи як інструмент. Додаткову інформацію про розширені можливості пошуку та фільтрації, а також інтеграцію вмісту через глибокі посилання можна знайти на <a href=\"https://schulcloud-thueringen.de/help/confluence/44073000\">сторінках допомоги</a>.",
26+
"lernStoreBannerItem1" : "Тому Навчальний магазин буде вимкнено в 10-му тижні (04.03.2026). Вміст Навчальний магазин, вже інтегрований у теми, залишиться доступним."
2127
},
2228
"img_alt": {
2329
"showAppointmentInTeam": "Показати призначення в команді",

views/dashboard/dashboard.hbs

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,49 @@
7575
</div>
7676
{{/if}}
7777

78-
{{#hasConfig "DASHBOARD_ANNOUNCEMENT_TEXT"}}
79-
{{#hasConfig "DASHBOARD_ANNOUNCEMENT_ROLES"}}
80-
{{#ifneq (getConfig "DASHBOARD_ANNOUNCEMENT_TEXT") ""}}
81-
{{#ifneq (getConfig "DASHBOARD_ANNOUNCEMENT_ROLES") ""}}
82-
{{#if (userHasRoleFromArray (getConfig "DASHBOARD_ANNOUNCEMENT_ROLES") ../currentUser)}}
83-
<div class="alert dashboard-notification" role="alert">
84-
<i class="fa fa-fw fa-lightbulb-o fa-lg" style="margin: 6px 0.5rem 0 0.5rem" aria-hidden="true"></i><p class="dashboard-notification-text">{{{$t (getConfig "DASHBOARD_ANNOUNCEMENT_TEXT") }}}</p>
85-
</div>
86-
{{/if}}
78+
79+
{{!-- Announcement template for single text from config mapping to given translation key. Uncomment and fill in config to reactivate.
80+
{{#hasConfig "DASHBOARD_ANNOUNCEMENT_TEXT"}}
81+
{{#hasConfig "DASHBOARD_ANNOUNCEMENT_ROLES"}}
82+
{{#ifneq (getConfig "DASHBOARD_ANNOUNCEMENT_TEXT") ""}}
83+
{{#ifneq (getConfig "DASHBOARD_ANNOUNCEMENT_ROLES") ""}}
84+
{{#if (userHasRoleFromArray (getConfig "DASHBOARD_ANNOUNCEMENT_ROLES") ../currentUser)}}
85+
<div class="alert dashboard-notification" role="alert">
86+
<i class="fa fa-fw fa-lightbulb-o fa-lg" style="margin: 6px 0.5rem 0 0.5rem" aria-hidden="true"></i><p class="dashboard-notification-text">{{{$t (getConfig "DASHBOARD_ANNOUNCEMENT_TEXT") }}}</p>
87+
</div>
88+
{{/if}}
89+
{{/ifneq}}
8790
{{/ifneq}}
88-
{{/ifneq}}
91+
{{/hasConfig}}
8992
{{/hasConfig}}
93+
--}}
94+
95+
{{#hasConfig "DASHBOARD_ANNOUNCEMENT_ROLES"}}
96+
{{#ifneq (getConfig "DASHBOARD_ANNOUNCEMENT_ROLES") ""}}
97+
{{#if (userHasRoleFromArray (getConfig "DASHBOARD_ANNOUNCEMENT_ROLES") ../currentUser)}}
98+
<div style="position: relative; display: flex; padding: 16px; margin-bottom: 0; margin-top: 48px; border-radius: 4px; font-family: Roboto, sans-serif; font-size: 14px; line-height: 1.5; background-color: rgb(227, 242, 253); color: rgb(1, 87, 155);" role="alert">
99+
<div style="display: flex; align-items: flex-start; padding-right: 16px; flex-shrink: 0;">
100+
<svg style="width: 24px; height: 24px; fill: currentColor;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true">
101+
<path d="M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"></path>
102+
</svg>
103+
</div>
104+
<div style="flex: 1; align-self: center; font-family: 'PT Sans',serif">
105+
<div style="font-weight: 700; margin-bottom: 4px; font-size: 19px;">
106+
<span style="color: rgba(58,66,75);">{{{$t "dashboard.text.lernStoreBannerTitle"}}}</span>
107+
</div>
108+
<div style="color: rgba(58,66,75); font-size: 16px;">
109+
<ul style="margin-top: 4px; padding-left: 20px; margin-bottom: 0;">
110+
<li>{{{$t ../translateKeyInfoBanner}}}</li>
111+
<li>{{{$t "dashboard.text.lernStoreBannerItem1"}}}</li>
112+
</ul>
113+
</div>
114+
</div>
115+
</div>
116+
{{/if}}
117+
{{/ifneq}}
90118
{{/hasConfig}}
119+
120+
91121
</section>
92122

93123
{{#if (getConfig "FEATURE_DASHBOARD_NEWS_ON_TOP_ENABLED")}}

0 commit comments

Comments
 (0)