MOBILE-2795 course: Load course image from course section without showing it
parent
167d544949
commit
51b2c94cde
|
@ -23,8 +23,11 @@
|
|||
|
||||
<!-- Course summary. By default we only display the course progress. -->
|
||||
<core-dynamic-component [component]="courseSummaryComponent" [data]="data">
|
||||
<ion-list no-lines *ngIf="selectedSection && selectedSection.id == allSectionsId && course.progress != null && course.progress >= 0" class="core-format-progress-list">
|
||||
<ion-item class="core-course-progress">
|
||||
<ion-list no-lines *ngIf="course.imageThumb || (selectedSection && selectedSection.id == allSectionsId && course.progress != null && course.progress >= 0)" class="core-format-progress-list">
|
||||
<div *ngIf="course.imageThumb" class="core-course-thumb">
|
||||
<img [src]="course.imageThumb" core-external-content alt=""/>
|
||||
</div>
|
||||
<ion-item class="core-course-progress" *ngIf="selectedSection && selectedSection.id == allSectionsId && course.progress != null && course.progress >= 0">
|
||||
<core-progress-bar [progress]="course.progress"></core-progress-bar>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
|
|
@ -34,6 +34,7 @@ ion-app.app-root core-course-format {
|
|||
}
|
||||
|
||||
.core-course-thumb {
|
||||
display: none;
|
||||
height: 150px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -265,6 +265,11 @@ export class CoreCourseSectionPage implements OnDestroy {
|
|||
});
|
||||
}));
|
||||
|
||||
// Get the overview files.
|
||||
if (this.course.overviewfiles) {
|
||||
this.course.imageThumb = this.course.overviewfiles[0] && this.course.overviewfiles[0].fileurl;
|
||||
}
|
||||
|
||||
// Load the course handlers.
|
||||
promises.push(this.courseOptionsDelegate.getHandlersToDisplay(this.injector, this.course, refresh, false)
|
||||
.then((handlers) => {
|
||||
|
|
Loading…
Reference in New Issue