MOBILE-3814 mod: Add module name to module info box
parent
46dada14cb
commit
4a83b2b29f
|
@ -41,7 +41,7 @@
|
||||||
<core-course-module-info [module]="module" (completionChanged)="onCompletionChange()"
|
<core-course-module-info [module]="module" (completionChanged)="onCompletionChange()"
|
||||||
[description]="forum && forum.type != 'single' && description" [component]="component" [componentId]="componentId"
|
[description]="forum && forum.type != 'single' && description" [component]="component" [componentId]="componentId"
|
||||||
[courseId]="courseId" [hasDataToSync]="hasOffline || hasOfflineRatings">
|
[courseId]="courseId" [hasDataToSync]="hasOffline || hasOfflineRatings">
|
||||||
<ion-item>
|
<ion-item lines="none" class="ion-text-wrap">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
{{descriptionNote}}
|
{{descriptionNote}}
|
||||||
</ion-label>
|
</ion-label>
|
||||||
|
|
|
@ -50,7 +50,6 @@
|
||||||
<!-- Activity info. -->
|
<!-- Activity info. -->
|
||||||
<core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
|
<core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
|
||||||
[component]="component" [componentId]="componentId" [courseId]="courseId">
|
[component]="component" [componentId]="componentId" [courseId]="courseId">
|
||||||
<h2 *ngIf="pageTitle" title>{{pageTitle}}</h2>
|
|
||||||
</core-course-module-info>
|
</core-course-module-info>
|
||||||
|
|
||||||
<div *ngIf="pageIsOffline || hasOffline || pageWarning">
|
<div *ngIf="pageIsOffline || hasOffline || pageWarning">
|
||||||
|
@ -74,6 +73,7 @@
|
||||||
</ion-card>
|
</ion-card>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-padding addon-mod_wiki-page-content">
|
<div class="ion-padding addon-mod_wiki-page-content">
|
||||||
|
<h2 *ngIf="pageTitle">{{pageTitle}}</h2>
|
||||||
<article [ngClass]="{'addon-mod_wiki-noedit': !canEdit}">
|
<article [ngClass]="{'addon-mod_wiki-noedit': !canEdit}">
|
||||||
<core-format-text *ngIf="pageContent" [component]="component" [componentId]="componentId" [text]="pageContent"
|
<core-format-text *ngIf="pageContent" [component]="component" [componentId]="componentId" [text]="pageContent"
|
||||||
contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
|
|
|
@ -427,7 +427,6 @@ export class AddonModWikiIndexComponent extends CoreCourseModuleMainActivityComp
|
||||||
const pageContents = await this.fetchPageContents(this.currentPage);
|
const pageContents = await this.fetchPageContents(this.currentPage);
|
||||||
|
|
||||||
if (pageContents) {
|
if (pageContents) {
|
||||||
this.dataRetrieved.emit(pageContents.title);
|
|
||||||
this.setSelectedWiki(pageContents.subwikiid, pageContents.userid, pageContents.groupid);
|
this.setSelectedWiki(pageContents.subwikiid, pageContents.userid, pageContents.groupid);
|
||||||
|
|
||||||
this.pageTitle = pageContents.title;
|
this.pageTitle = pageContents.title;
|
||||||
|
|
|
@ -8,10 +8,6 @@
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
<h2>
|
|
||||||
<core-format-text [text]="pageTitle" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
|
||||||
</core-format-text>
|
|
||||||
</h2>
|
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
||||||
<ion-buttons slot="end">
|
<ion-buttons slot="end">
|
||||||
|
|
|
@ -49,18 +49,6 @@ export class AddonModWikiIndexPage extends CoreCourseModuleMainActivityPage<Addo
|
||||||
this.groupId = CoreNavigator.getRouteNumberParam('groupId');
|
this.groupId = CoreNavigator.getRouteNumberParam('groupId');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritdoc
|
|
||||||
*/
|
|
||||||
updateData(data: { name: string } | string): void {
|
|
||||||
if (typeof data == 'string') {
|
|
||||||
// We received the title to display.
|
|
||||||
this.pageTitle = data;
|
|
||||||
} else {
|
|
||||||
super.updateData(data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User entered the page.
|
* User entered the page.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<core-mod-icon slot="start" [modicon]="modicon" [modname]="module.modname" [componentId]="module.instance">
|
<core-mod-icon slot="start" [modicon]="modicon" [modname]="module.modname" [componentId]="module.instance">
|
||||||
</core-mod-icon>
|
</core-mod-icon>
|
||||||
<ion-label>
|
<ion-label>
|
||||||
|
<p class="core-modulename" *ngIf="moduleNameTranslated">{{moduleNameTranslated}}</p>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="module.name" contextLevel="module" [component]="component" [componentId]="componentId"
|
<core-format-text [text]="module.name" contextLevel="module" [component]="component" [componentId]="componentId"
|
||||||
[contextInstanceId]="module.id" [courseId]="courseId">
|
[contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
|
|
|
@ -6,6 +6,14 @@
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
padding-bottom: 1px; // To allow margins inside.
|
padding-bottom: 1px; // To allow margins inside.
|
||||||
background-color: var(--contrast-background);
|
background-color: var(--contrast-background);
|
||||||
|
|
||||||
@include padding-horizontal(var(--ion-safe-area-left), var(--ion-safe-area-right));
|
@include padding-horizontal(var(--ion-safe-area-left), var(--ion-safe-area-right));
|
||||||
|
|
||||||
|
.core-modulename {
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
core-mod-icon {
|
||||||
|
align-self: flex-start;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue