diff --git a/api/resources/translations/messages-en.properties b/api/resources/translations/messages-en.properties index cb04a0a6e72..aff81bccdd9 100644 --- a/api/resources/translations/messages-en.properties +++ b/api/resources/translations/messages-en.properties @@ -1265,6 +1265,10 @@ training_cards.error.loading = Error loading training. Please contact your super training_cards.error.save = Error saving training. training_cards.form.saved = Training completed. training_cards.modal.title = Important changes +training_materials.page.no_more_trainings = No more trainings +training_materials.page.no_selected = No training material selected +training_materials.page.no_trainings = No trainings found +training_materials.page.title = Training Materials translation.add = Add new translation key translation.key = Translation key unique.id = Unique ID diff --git a/api/resources/translations/messages-es.properties b/api/resources/translations/messages-es.properties index 2bb18b9bcf7..b5c0ba9fa44 100644 --- a/api/resources/translations/messages-es.properties +++ b/api/resources/translations/messages-es.properties @@ -1265,6 +1265,10 @@ training_cards.error.loading = Hubo un error al cargar el entrenamiento. Por fav training_cards.error.save = Hubo un error al guardar el entrenamiento. training_cards.form.saved = Entrenamiento completado. training_cards.modal.title = Cambios importantes +training_materials.page.no_more_trainings = No hay más entrenamientos +training_materials.page.no_selected = Ningún material de entrenamiento seleccionado +training_materials.page.no_trainings = No se encontraron entrenamientos +training_materials.page.title = Materiales de entrenamiento translation.add = Agregar Traducción translation.key = Clave de traducción unique.id = Identificación única diff --git a/api/resources/translations/messages-fr.properties b/api/resources/translations/messages-fr.properties index a82b00af6de..e0875528c1a 100644 --- a/api/resources/translations/messages-fr.properties +++ b/api/resources/translations/messages-fr.properties @@ -1265,6 +1265,10 @@ training_cards.error.loading = Erreur lors du chargement de la formation. Veuill training_cards.error.save = Erreur lors de l'enregistrement de la formation. training_cards.form.saved = Formation terminée. training_cards.modal.title = Changements importants +training_materials.page.no_more_trainings = Plus de formations +training_materials.page.no_selected = Aucun matériel de formation sélectionné +training_materials.page.no_trainings = Aucune formation trouvée +training_materials.page.title = Matériel de formation translation.add = Ajouter une traduction translation.key = Clé de traduction unique.id = ID unique diff --git a/api/resources/translations/messages-hi.properties b/api/resources/translations/messages-hi.properties index 9b012194aff..b171764bfd3 100644 --- a/api/resources/translations/messages-hi.properties +++ b/api/resources/translations/messages-hi.properties @@ -1168,6 +1168,10 @@ training_cards.confirm.exit = यह प्रशिक्षण समाप् training_cards.confirm.button.no = रद्द करें training_cards.confirm.button.yes = बाहर निकलें training_cards.confirm.title = प्रशिक्षण छोड़ें? +training_materials.page.no_more_trainings = और कोई प्रशिक्षण नहीं है +training_materials.page.no_selected = कोई प्रशिक्षण सामग्री नहीं चुनी गई। +training_materials.page.no_trainings = कोई प्रशिक्षण नहीं मिला +training_materials.page.title = प्रशिक्षण सामग्री translation.add = अनुवाद दर्ज करें translation.key = अनुवाद का गाइड unique.id = diff --git a/api/resources/translations/messages-id.properties b/api/resources/translations/messages-id.properties index 53a0b392f54..b906185a58e 100644 --- a/api/resources/translations/messages-id.properties +++ b/api/resources/translations/messages-id.properties @@ -1175,6 +1175,10 @@ training_cards.confirm.exit = Pelatihan ini belum selesai. Jika Anda keluar seka training_cards.confirm.button.no = Batalkan training_cards.confirm.button.yes = Keluar training_cards.confirm.title = Keluar dari pelatihan? +training_materials.page.no_more_trainings = Tidak ada lagi pelatihan +training_materials.page.no_selected = Tidak ada materi pelatihan yang dipilih +training_materials.page.no_trainings = Tidak ditemukan pelatihan +training_materials.page.title = Materi Pelatihan translation.add = Tambah terjemahan translation.key = Kunci terjemahan unique.id = diff --git a/api/resources/translations/messages-ne.properties b/api/resources/translations/messages-ne.properties index ab858cbc35b..46fa5c302b4 100644 --- a/api/resources/translations/messages-ne.properties +++ b/api/resources/translations/messages-ne.properties @@ -1265,6 +1265,10 @@ training_cards.error.loading = तालिम लोड गर्दा त् training_cards.error.save = तालिम सेभ गर्न त्रुटि। training_cards.form.saved = तालिम सम्पन्न भयो। training_cards.modal.title = महत्वपुर्ण परिवर्तनहरु +training_materials.page.no_more_trainings = अब कुनै तालिम छैन +training_materials.page.no_selected = कुनै तालिम सामग्री छनोट गरिएको छैन। +training_materials.page.no_trainings = कुनै तालिम फेला परेन +training_materials.page.title = प्रशिक्षण सामग्री translation.add = नयाँ अनुवाद कुञ्जी थप्नुहोस् translation.key = अनुवाद कुञ्जी unique.id = आईडी diff --git a/api/resources/translations/messages-sw.properties b/api/resources/translations/messages-sw.properties index b7e0f9dae7e..114b1d04ee5 100644 --- a/api/resources/translations/messages-sw.properties +++ b/api/resources/translations/messages-sw.properties @@ -1265,6 +1265,10 @@ training_cards.error.loading = Hitilafu katika kupakia mafunzo. Tafadhali wasili training_cards.error.save = Hitilafu katika kuhifadhi mafunzo. training_cards.form.saved = Mafunzo yamekamilika. training_cards.modal.title = Mabadiliko muhimu +training_materials.page.no_more_trainings = Hakuna mafunzo mengine +training_materials.page.no_selected = Hakuna nyenzo za mafunzo zilizochaguliwa +training_materials.page.no_trainings = Hakuna mafunzo yaliyopatikana +training_materials.page.title = Vifaa vya Mafunzo translation.add = Ongeza tafsiri translation.key = Ufunguo wa tafsiri unique.id = Kitambulisho cha kipekee diff --git a/webapp/src/css/inbox.less b/webapp/src/css/inbox.less index 758447e2528..e968c7dd5ba 100644 --- a/webapp/src/css/inbox.less +++ b/webapp/src/css/inbox.less @@ -1368,6 +1368,11 @@ mm-sidebar-menu .mat-sidenav-container { margin-right: 15px; flex-shrink: 0; } + + mat-icon.fa-graduation-cap:before { + font-size: @font-medium; + vertical-align: middle; + } } .nav-item:not(:not(.hidden) ~ .nav-item) { // The first element without .hidden class, compatible with Chrome +90 diff --git a/webapp/src/ts/actions/global.ts b/webapp/src/ts/actions/global.ts index c058d2e395f..1ce4eb59b4e 100644 --- a/webapp/src/ts/actions/global.ts +++ b/webapp/src/ts/actions/global.ts @@ -11,6 +11,7 @@ export const Actions = { setLoadingContent: createSingleValueAction('SET_LOADING_CONTENT', 'loadingContent'), setShowContent: createSingleValueAction('SET_SHOW_CONTENT', 'showContent'), setForms: createSingleValueAction('SET_FORMS', 'forms'), + setTrainingMaterials: createSingleValueAction('SET_TRAINING_MATERIALS', 'trainingMaterials'), clearFilters: createSingleValueAction('CLEAR_FILTERS', 'skip'), setFilter: createSingleValueAction('SET_FILTER', 'filter'), setSidebarFilter: createSingleValueAction('SET_SIDEBAR_FILTER', 'sidebarFilter'), @@ -71,6 +72,10 @@ export class GlobalActions { return this.store.dispatch(Actions.setForms(forms)); } + setTrainingMaterials(trainingMaterials) { + return this.store.dispatch(Actions.setTrainingMaterials(trainingMaterials)); + } + setShowContent(showContent) { return this.store.dispatch(Actions.setShowContent(showContent)); } diff --git a/webapp/src/ts/app-routing.module.ts b/webapp/src/ts/app-routing.module.ts index 3ecbaafc0cd..9ba91864672 100644 --- a/webapp/src/ts/app-routing.module.ts +++ b/webapp/src/ts/app-routing.module.ts @@ -11,6 +11,7 @@ import { routes as messagesRoutes } from '@mm-modules/messages/messages.routes'; import { routes as contactsRoutes } from '@mm-modules/contacts/contacts.routes'; import { routes as privacyPolicyRoutes } from '@mm-modules/privacy-policy/privacy-policy.routes'; import { routes as tasksRoutes } from '@mm-modules/tasks/tasks.routes'; +import { routes as trainingRoutes } from '@mm-modules/trainings/trainings.routes'; import { routes as testingRoutes } from '@mm-modules/testing/testing.routes'; const routes: Routes = [ @@ -23,6 +24,7 @@ const routes: Routes = [ ...contactsRoutes, ...privacyPolicyRoutes, ...tasksRoutes, + ...trainingRoutes, ...testingRoutes, ...errorRoutes, ]; diff --git a/webapp/src/ts/components/header/header.component.html b/webapp/src/ts/components/header/header.component.html index be5bd14f2f2..cd347ff4880 100644 --- a/webapp/src/ts/components/header/header.component.html +++ b/webapp/src/ts/components/header/header.component.html @@ -75,6 +75,12 @@ +
  • + + + {{'training_materials.page.title' | translate}} + +
  • diff --git a/webapp/src/ts/components/sidebar-menu/sidebar-menu.component.ts b/webapp/src/ts/components/sidebar-menu/sidebar-menu.component.ts index 3cee129ba70..bf2ddbe6b8e 100644 --- a/webapp/src/ts/components/sidebar-menu/sidebar-menu.component.ts +++ b/webapp/src/ts/components/sidebar-menu/sidebar-menu.component.ts @@ -129,6 +129,12 @@ export class SidebarMenuComponent implements OnInit, OnDestroy { private setSecondaryOptions(showPrivacyPolicy = false) { this.secondaryOptions = [ + { + routerLink: 'trainings', + icon: 'fa-graduation-cap', + translationKey: 'training_materials.page.title', + canDisplay: true, + }, { routerLink: 'about', icon: 'fa-question', diff --git a/webapp/src/ts/modals/training-cards/training-cards.component.html b/webapp/src/ts/modals/training-cards/training-cards.component.html index b702c2234f7..81a5e7e4e0a 100644 --- a/webapp/src/ts/modals/training-cards/training-cards.component.html +++ b/webapp/src/ts/modals/training-cards/training-cards.component.html @@ -3,8 +3,7 @@ [titleKey]="showConfirmExit ? 'training_cards.confirm.title' : modalTitleKey | translate" (onCancel)="confirmExit(true)" [hideFooter]="hideModalFooter" - [hasEnketoForm]="true" -> + [hasEnketoForm]="true">
    diff --git a/webapp/src/ts/modules/modules.module.ts b/webapp/src/ts/modules/modules.module.ts index 38705b91c54..01d64ff0dd9 100644 --- a/webapp/src/ts/modules/modules.module.ts +++ b/webapp/src/ts/modules/modules.module.ts @@ -41,6 +41,8 @@ import { AnalyticsTargetAggregatesSidebarFilterComponent } import { AnalyticsTargetAggregatesDetailComponent } from '@mm-modules/analytics/analytics-target-aggregates-detail.component'; +import { TrainingsComponent } from '@mm-modules/trainings/trainings.component'; +import { TrainingsContentComponent } from '@mm-modules/trainings/training-content.component'; import { TasksComponent } from '@mm-modules/tasks/tasks.component'; import { TasksContentComponent } from '@mm-modules/tasks/tasks-content.component'; import { TasksGroupComponent } from '@mm-modules/tasks/tasks-group.component'; @@ -74,6 +76,8 @@ import { DirectivesModule } from '@mm-directives/directives.module'; AnalyticsTargetAggregatesComponent, AnalyticsTargetAggregatesDetailComponent, AnalyticsTargetAggregatesSidebarFilterComponent, + TrainingsComponent, + TrainingsContentComponent, TasksComponent, TasksContentComponent, TasksGroupComponent, @@ -104,6 +108,8 @@ import { DirectivesModule } from '@mm-directives/directives.module'; ReportsComponent, MessagesComponent, ContactsComponent, + TrainingsComponent, + TrainingsContentComponent, PrivacyPolicyComponent, TasksComponent, ] diff --git a/webapp/src/ts/modules/tasks/tasks.component.html b/webapp/src/ts/modules/tasks/tasks.component.html index bad7260cce7..faea4ce565b 100644 --- a/webapp/src/ts/modules/tasks/tasks.component.html +++ b/webapp/src/ts/modules/tasks/tasks.component.html @@ -6,10 +6,10 @@