MOBILE-4077 ReportBuilder: Sort reports list and update lang strings
parent
7b37a907a9
commit
fc98bf5796
|
@ -1653,9 +1653,9 @@
|
||||||
"core.currentdevice": "local_moodlemobileapp",
|
"core.currentdevice": "local_moodlemobileapp",
|
||||||
"core.custom": "form",
|
"core.custom": "form",
|
||||||
"core.reportbuilder.modifiedby": "tool_reportbuilder",
|
"core.reportbuilder.modifiedby": "tool_reportbuilder",
|
||||||
"core.reportbuilder.reportstab": "tool_reportbuilder",
|
"core.reportbuilder.reports": "moodle",
|
||||||
"core.reportbuilder.reportsource": "tool_reportbuilder",
|
"core.reportbuilder.reportsource": "moodle",
|
||||||
"core.reportbuilder.timecreated": "tool_reportbuilder",
|
"core.reportbuilder.timecreated": "moodle",
|
||||||
"core.reportbuilder.showcolumns": "local_moodlemobileapp",
|
"core.reportbuilder.showcolumns": "local_moodlemobileapp",
|
||||||
"core.reportbuilder.hidecolumns": "local_moodlemobileapp",
|
"core.reportbuilder.hidecolumns": "local_moodlemobileapp",
|
||||||
"core.datastoredoffline": "local_moodlemobileapp",
|
"core.datastoredoffline": "local_moodlemobileapp",
|
||||||
|
|
|
@ -41,7 +41,7 @@ export class CoreReportBuilderReportsSource extends CoreRoutedItemsManagerSource
|
||||||
*/
|
*/
|
||||||
protected setItems(reports: CoreReportBuilderReport[], hasMoreItems: boolean): void {
|
protected setItems(reports: CoreReportBuilderReport[], hasMoreItems: boolean): void {
|
||||||
const sortedReports = reports.slice(0);
|
const sortedReports = reports.slice(0);
|
||||||
reports.sort((a, b) => a.timecreated < b.timecreated ? 1 : -1);
|
sortedReports.sort((a, b) => a.timemodified < b.timemodified ? 1 : -1);
|
||||||
super.setItems(sortedReports, hasMoreItems);
|
super.setItems(sortedReports, hasMoreItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"modifiedby": "Modified by",
|
"modifiedby": "Modified by",
|
||||||
"reportstab": "Reports",
|
"reports": "Reports",
|
||||||
"reportsource": "Report source",
|
"reportsource": "Report source",
|
||||||
"timecreated": "Time created",
|
"timecreated": "Time created",
|
||||||
"showcolumns": "Show columns",
|
"showcolumns": "Show columns",
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<ion-back-button [text]="'core.back' | translate"></ion-back-button>
|
<ion-back-button [text]="'core.back' | translate"></ion-back-button>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>{{ 'core.reportbuilder.reportstab' | translate }}</h1>
|
<h1>{{ 'core.reportbuilder.reports' | translate }}</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
|
@ -45,11 +45,11 @@ export class CoreReportBuilderHandlerService implements CoreUserProfileHandler {
|
||||||
return {
|
return {
|
||||||
class: 'core-report-builder',
|
class: 'core-report-builder',
|
||||||
icon: 'fa-list-alt',
|
icon: 'fa-list-alt',
|
||||||
title: 'core.reportbuilder.reportstab',
|
title: 'core.reportbuilder.reports',
|
||||||
action: async (event): Promise<void> => {
|
action: async (event): Promise<void> => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
await CoreNavigator.navigate(`/${CoreReportBuilderHandlerService.PAGE_NAME}`);
|
await CoreNavigator.navigateToSitePath(CoreReportBuilderHandlerService.PAGE_NAME);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue