MOBILE-3833 course: Move course shortname to course summary
parent
57ba1f9363
commit
8fab7a9121
|
@ -26,14 +26,23 @@
|
|||
<ng-container *ngIf="course">
|
||||
<ion-item class="ion-text-wrap">
|
||||
<ion-label>
|
||||
<p *ngIf="course.categoryname">
|
||||
<core-format-text [text]="course.categoryname" contextLevel="coursecat" [contextInstanceId]="course.categoryid">
|
||||
<p *ngIf="course.displayname && course.shortname && course.fullname != course.displayname"
|
||||
class="core-course-shortname">
|
||||
<core-format-text [text]="course.shortname" contextLevel="course" [contextInstanceId]="course.id">
|
||||
</core-format-text>
|
||||
</p>
|
||||
<h2>
|
||||
<span class="sr-only">{{ 'core.courses.aria:coursename' | translate }}</span>
|
||||
<core-format-text [text]="course.fullname" contextLevel="course" [contextInstanceId]="course.id">
|
||||
</core-format-text>
|
||||
</h2>
|
||||
<ion-chip color="brand" *ngIf="course.categoryname" class="core-course-category ion-text-nowrap">
|
||||
<span class="sr-only">{{ 'core.courses.aria:coursecategory' | translate }}</span>
|
||||
<ion-label>
|
||||
<core-format-text [text]="course.categoryname" contextLevel="coursecat" [contextInstanceId]="course.categoryid">
|
||||
</core-format-text>
|
||||
</ion-label>
|
||||
</ion-chip>
|
||||
|
||||
<div class="core-course-progress" *ngIf="progress !== undefined">
|
||||
<core-progress-bar [progress]="progress" a11yText="core.course.aria:sectionprogress">
|
||||
|
|
|
@ -21,10 +21,6 @@
|
|||
<img [src]="imageThumb" core-external-content alt="" />
|
||||
</ion-avatar>
|
||||
<ion-label>
|
||||
<p *ngIf="category">
|
||||
<core-format-text [text]="category" contextLevel="coursecat" [contextInstanceId]="course!.categoryid">
|
||||
</core-format-text>
|
||||
</p>
|
||||
<h1>{{ title }}</h1>
|
||||
<div class="core-course-progress" *ngIf="progress !== undefined">
|
||||
<core-progress-bar [progress]="progress" a11yText="core.course.aria:sectionprogress">
|
||||
|
|
|
@ -238,7 +238,6 @@ export class CoreCourseIndexPage implements OnInit, OnDestroy {
|
|||
|
||||
// Get the title to display initially.
|
||||
this.title = CoreCourseFormatDelegate.getCourseTitle(this.course);
|
||||
this.category = 'categoryname' in this.course ? this.course.categoryname : '';
|
||||
|
||||
if ('overviewfiles' in this.course) {
|
||||
this.imageThumb = this.course.overviewfiles?.[0]?.fileurl;
|
||||
|
|
|
@ -70,7 +70,8 @@
|
|||
class="core-course-category core-course-additional-info ion-text-nowrap">
|
||||
<span class="sr-only">{{ 'core.courses.aria:coursecategory' | translate }}</span>
|
||||
<ion-label>
|
||||
<core-format-text [text]="course.categoryname"></core-format-text>
|
||||
<core-format-text [text]="course.categoryname" contextLevel="coursecat" [contextInstanceId]="course.categoryid">
|
||||
</core-format-text>
|
||||
</ion-label>
|
||||
</ion-chip>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue