MOBILE-2058 course: Add open in browser on course preview

main
Pau Ferrer Ocaña 2018-09-17 09:05:24 +02:00
parent a6b6d28d40
commit 1bf74fe8b3
2 changed files with 5 additions and 1 deletions

View File

@ -58,6 +58,10 @@
<ion-icon name="briefcase" item-start></ion-icon> <ion-icon name="briefcase" item-start></ion-icon>
<h2>{{ 'core.course.contents' | translate }}</h2> <h2>{{ 'core.course.contents' | translate }}</h2>
</a> </a>
<a ion-item [href]="courseUrl" core-link [title]="course.fullname">
<ion-icon name="open" item-start></ion-icon>
<h2>{{ 'core.openinbrowser' | translate }}</h2>
</a>
</ion-list> </ion-list>
</core-loading> </core-loading>
</ion-content> </ion-content>

View File

@ -48,6 +48,7 @@ export class CoreCoursesCoursePreviewPage implements OnDestroy {
title: 'core.course.downloadcourse' title: 'core.course.downloadcourse'
}; };
downloadCourseEnabled: boolean; downloadCourseEnabled: boolean;
courseUrl: string;
protected guestWSAvailable: boolean; protected guestWSAvailable: boolean;
protected isGuestEnabled = false; protected isGuestEnabled = false;
@ -55,7 +56,6 @@ export class CoreCoursesCoursePreviewPage implements OnDestroy {
protected enrollmentMethods: any[]; protected enrollmentMethods: any[];
protected waitStart = 0; protected waitStart = 0;
protected enrolUrl: string; protected enrolUrl: string;
protected courseUrl: string;
protected paypalReturnUrl: string; protected paypalReturnUrl: string;
protected isMobile: boolean; protected isMobile: boolean;
protected isDesktop: boolean; protected isDesktop: boolean;