commit
e7fd119983
|
@ -19,7 +19,10 @@
|
||||||
|
|
||||||
<ion-card class="wholecourse">
|
<ion-card class="wholecourse">
|
||||||
<ion-card-header>
|
<ion-card-header>
|
||||||
<ion-card-title>{{ title }}</ion-card-title>
|
<ion-card-title>
|
||||||
|
<core-format-text [text]="title" contextLevel="course" [contextInstanceId]="courseId" [adaptImg]="false">
|
||||||
|
</core-format-text>
|
||||||
|
</ion-card-title>
|
||||||
<ion-item class="size ion-text-wrap ion-no-padding">
|
<ion-item class="size ion-text-wrap ion-no-padding">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<p class="item-heading ion-text-wrap">{{ 'addon.storagemanager.totaldownloads' | translate }}</p>
|
<p class="item-heading ion-text-wrap">{{ 'addon.storagemanager.totaldownloads' | translate }}</p>
|
||||||
|
|
|
@ -45,7 +45,10 @@
|
||||||
<ion-item *ngFor="let course of downloadedCourses" class="course" (click)="openCourse(course.id, course.title)" button
|
<ion-item *ngFor="let course of downloadedCourses" class="course" (click)="openCourse(course.id, course.title)" button
|
||||||
detail="true">
|
detail="true">
|
||||||
<ion-label class="ion-text-wrap">
|
<ion-label class="ion-text-wrap">
|
||||||
<p class="item-heading">{{ course.title }}</p>
|
<p class="item-heading">
|
||||||
|
<core-format-text [text]="course.title" contextLevel="course" [contextInstanceId]="course.id" [adaptImg]="false">
|
||||||
|
</core-format-text>
|
||||||
|
</p>
|
||||||
<p class="item-heading item-heading-secondary" *ngIf="course.isDownloading">
|
<p class="item-heading item-heading-secondary" *ngIf="course.isDownloading">
|
||||||
{{ 'core.downloading' | translate }}
|
{{ 'core.downloading' | translate }}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -22,6 +22,7 @@ import { CoreSitePlugins, CoreSitePluginsContent, CoreSitePluginsProvider } from
|
||||||
import { CoreNavigator } from '@services/navigator';
|
import { CoreNavigator } from '@services/navigator';
|
||||||
import { CoreDomUtils } from '@services/utils/dom';
|
import { CoreDomUtils } from '@services/utils/dom';
|
||||||
import { CoreEvents } from '@singletons/events';
|
import { CoreEvents } from '@singletons/events';
|
||||||
|
import { CoreSites, CoreSitesReadingStrategy } from '@services/sites';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component to render a site plugin content.
|
* Component to render a site plugin content.
|
||||||
|
@ -238,6 +239,19 @@ export class CoreSitePluginsPluginContentComponent implements OnInit, DoCheck {
|
||||||
CoreEvents.trigger(CoreSitePluginsProvider.UPDATE_COURSE_CONTENT, { cmId, alreadyFetched });
|
CoreEvents.trigger(CoreSitePluginsProvider.UPDATE_COURSE_CONTENT, { cmId, alreadyFetched });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update this content stored in the app's cache. This function will not reload the view, it will only update the data stored
|
||||||
|
* in the device so it's updated for the next usage. If you want to update the view, please use refreshContent.
|
||||||
|
*/
|
||||||
|
async updateCachedContent(): Promise<void> {
|
||||||
|
await CoreSitePlugins.getContent(
|
||||||
|
this.component,
|
||||||
|
this.method,
|
||||||
|
this.args,
|
||||||
|
CoreSites.getReadingStrategyPreSets(CoreSitesReadingStrategy.ONLY_NETWORK),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CoreSitePluginsPluginContentLoadedData = {
|
export type CoreSitePluginsPluginContentLoadedData = {
|
||||||
|
|
Loading…
Reference in New Issue