Merge pull request #2165 from dpalou/MOBILE-3211
MOBILE-3211 siteplugins: Use current page title if not definedmain
commit
659539c8a2
|
@ -9,4 +9,4 @@
|
|||
</core-context-menu>
|
||||
</core-navbar-buttons>
|
||||
|
||||
<core-site-plugins-plugin-content *ngIf="component && method" [component]="component" [method]="method" [args]="args" [initResult]="initResult" [data]="jsData" (onContentLoaded)="contentLoaded($event)" (onLoadingContent)="contentLoading($event)"></core-site-plugins-plugin-content>
|
||||
<core-site-plugins-plugin-content *ngIf="component && method" [component]="component" [method]="method" [args]="args" [initResult]="initResult" [data]="jsData" [pageTitle]="pageTitle" (onContentLoaded)="contentLoaded($event)" (onLoadingContent)="contentLoading($event)"></core-site-plugins-plugin-content>
|
||||
|
|
|
@ -32,6 +32,7 @@ import { CoreSitePluginsPluginContentComponent } from '../plugin-content/plugin-
|
|||
export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, CoreCourseModuleMainComponent {
|
||||
@Input() module: any; // The module.
|
||||
@Input() courseId: number; // Course ID the module belongs to.
|
||||
@Input() pageTitle: string; // Current page title. It can be used by the "new-content" directives.
|
||||
|
||||
@ViewChild(CoreSitePluginsPluginContentComponent) content: CoreSitePluginsPluginContentComponent;
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ export class CoreSitePluginsPluginContentComponent implements OnInit, DoCheck {
|
|||
@Input() initResult: any; // Result of the init WS call of the handler.
|
||||
@Input() data: any; // Data to pass to the component.
|
||||
@Input() preSets: any; // The preSets for the WS call.
|
||||
@Input() pageTitle: string; // Current page title. It can be used by the "new-content" directives.
|
||||
@Output() onContentLoaded?: EventEmitter<boolean>; // Emits an event when the content is loaded.
|
||||
@Output() onLoadingContent?: EventEmitter<boolean>; // Emits an event when starts to load the content.
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ export class CoreSitePluginsCallWSNewContentDirective extends CoreSitePluginsCal
|
|||
}
|
||||
|
||||
this.navCtrl.push('CoreSitePluginsPluginPage', {
|
||||
title: this.title,
|
||||
title: this.title || (this.parentContent && this.parentContent.pageTitle),
|
||||
component: this.component || (this.parentContent && this.parentContent.component),
|
||||
method: this.method || (this.parentContent && this.parentContent.method),
|
||||
args: args,
|
||||
|
|
|
@ -93,7 +93,7 @@ export class CoreSitePluginsNewContentDirective implements OnInit {
|
|||
}
|
||||
|
||||
this.navCtrl.push('CoreSitePluginsPluginPage', {
|
||||
title: this.title,
|
||||
title: this.title || (this.parentContent && this.parentContent.pageTitle),
|
||||
component: this.component || (this.parentContent && this.parentContent.component),
|
||||
method: this.method || (this.parentContent && this.parentContent.method),
|
||||
args: args,
|
||||
|
|
|
@ -11,5 +11,5 @@
|
|||
<ion-refresher [enabled]="content && content.content && content.content.dataLoaded" (ionRefresh)="refreshData($event)">
|
||||
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<core-site-plugins-module-index [module]="module" [courseId]="courseId"></core-site-plugins-module-index>
|
||||
<core-site-plugins-module-index [module]="module" [courseId]="courseId" [pageTitle]="title"></core-site-plugins-module-index>
|
||||
</ion-content>
|
||||
|
|
|
@ -11,5 +11,5 @@
|
|||
<ion-refresher [enabled]="content && content.dataLoaded" (ionRefresh)="refreshData($event)">
|
||||
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<core-site-plugins-plugin-content [component]="component" [method]="method" [args]="args" [preSets]="preSets" [initResult]="initResult" [data]="jsData"></core-site-plugins-plugin-content>
|
||||
<core-site-plugins-plugin-content [component]="component" [method]="method" [args]="args" [preSets]="preSets" [initResult]="initResult" [data]="jsData" [pageTitle]="title"></core-site-plugins-plugin-content>
|
||||
</ion-content>
|
||||
|
|
Loading…
Reference in New Issue