MOBILE-3625 sitehome: Use core-module component when needed
parent
83a558f3ae
commit
12db2a63f7
|
@ -18,7 +18,7 @@ import { IonicModule } from '@ionic/angular';
|
|||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
// import { CoreCourseComponentsModule } from '@features/course/components/components.module';
|
||||
import { CoreCourseComponentsModule } from '@features/course/components/components.module';
|
||||
|
||||
import { AddonBlockSiteMainMenuComponent } from './sitemainmenu/sitemainmenu';
|
||||
|
||||
|
@ -32,7 +32,7 @@ import { AddonBlockSiteMainMenuComponent } from './sitemainmenu/sitemainmenu';
|
|||
IonicModule,
|
||||
TranslateModule.forChild(),
|
||||
CoreSharedModule,
|
||||
// CoreCourseComponentsModule,
|
||||
CoreCourseComponentsModule,
|
||||
],
|
||||
exports: [
|
||||
AddonBlockSiteMainMenuComponent,
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
<!--<core-course-module *ngFor="let module of mainMenuBlock.modules" [module]="module" [courseId]="siteHomeId"
|
||||
[downloadEnabled]="downloadEnabled" [section]="mainMenuBlock"></core-course-module>-->
|
||||
<core-course-module *ngFor="let module of mainMenuBlock.modules" [module]="module" [courseId]="siteHomeId"
|
||||
[downloadEnabled]="downloadEnabled" [section]="mainMenuBlock"></core-course-module>
|
||||
</ng-container>
|
||||
</core-loading>
|
||||
|
|
|
@ -91,7 +91,7 @@ export class AddonBlockSiteMainMenuComponent extends CoreBlockBaseComponent impl
|
|||
const items = config.frontpageloggedin.split(',');
|
||||
const hasNewsItem = items.find((item) => parseInt(item, 10) == FrontPageItemNames['NEWS_ITEMS']);
|
||||
|
||||
const result = await CoreCourseHelper.instance.addHandlerDataForModules(
|
||||
const result = CoreCourseHelper.instance.addHandlerDataForModules(
|
||||
[mainMenuBlock],
|
||||
this.siteHomeId,
|
||||
undefined,
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<core-loading [hideUntil]="dataLoaded">
|
||||
<ion-list>
|
||||
<!-- Site home main contents. -->
|
||||
<!-- @todo <ng-container *ngIf="section && section.hasContent">
|
||||
<ng-container *ngIf="section && section.hasContent">
|
||||
<ion-item class="ion-text-wrap" *ngIf="section.summary">
|
||||
<core-format-text [text]="section.summary" contextLevel="course" [contextInstanceId]="siteHomeId">
|
||||
</core-format-text>
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
<core-course-module *ngFor="let module of section.modules" [module]="module" [courseId]="siteHomeId"
|
||||
[downloadEnabled]="downloadEnabled" [section]="section"></core-course-module>
|
||||
</ng-container> -->
|
||||
</ng-container>
|
||||
|
||||
<!-- Site home items: news, categories, courses, etc. -->
|
||||
<ng-container *ngIf="items.length > 0">
|
||||
|
@ -71,11 +71,8 @@
|
|||
</ng-template>
|
||||
|
||||
<ng-template #news>
|
||||
<ion-item>
|
||||
<ion-label>News (TODO)</ion-label>
|
||||
</ion-item>
|
||||
<!-- @todo <core-course-module class="core-sitehome-news" *ngIf="newsForumModule" [module]="module" [courseId]="siteHomeId">
|
||||
</core-course-module> -->
|
||||
<core-course-module class="core-sitehome-news" *ngIf="newsForumModule" [module]="newsForumModule" [courseId]="siteHomeId">
|
||||
</core-course-module>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #categories>
|
||||
|
|
|
@ -20,6 +20,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||
|
||||
import { CoreSharedModule } from '@/core/shared.module';
|
||||
import { CoreBlockComponentsModule } from '@/core/features/block/components/components.module';
|
||||
import { CoreCourseComponentsModule } from '@features/course/components/components.module';
|
||||
|
||||
import { CoreSiteHomeIndexPage } from '.';
|
||||
|
||||
|
@ -38,6 +39,7 @@ const routes: Routes = [
|
|||
TranslateModule.forChild(),
|
||||
CoreSharedModule,
|
||||
CoreBlockComponentsModule,
|
||||
CoreCourseComponentsModule,
|
||||
],
|
||||
declarations: [
|
||||
CoreSiteHomeIndexPage,
|
||||
|
|
Loading…
Reference in New Issue