Skip to content

Commit de60a89

Browse files
authored
Merge pull request #3542 from alfonso-salces/MOBILE-4077
Mobile 4077
2 parents dab503b + cbbc5d0 commit de60a89

File tree

9 files changed

+45
-14
lines changed

9 files changed

+45
-14
lines changed

scripts/langindex.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,9 +1653,10 @@
16531653
"core.currentdevice": "local_moodlemobileapp",
16541654
"core.custom": "form",
16551655
"core.reportbuilder.modifiedby": "tool_reportbuilder",
1656-
"core.reportbuilder.reportstab": "tool_reportbuilder",
1657-
"core.reportbuilder.reportsource": "tool_reportbuilder",
1658-
"core.reportbuilder.timecreated": "tool_reportbuilder",
1656+
"core.reportbuilder.reports": "moodle",
1657+
"core.reportbuilder.reportsource": "moodle",
1658+
"core.reportbuilder.timecreated": "moodle",
1659+
"core.reportbuilder.filtersapplied": "local_moodlemobileapp",
16591660
"core.reportbuilder.showcolumns": "local_moodlemobileapp",
16601661
"core.reportbuilder.hidecolumns": "local_moodlemobileapp",
16611662
"core.datastoredoffline": "local_moodlemobileapp",

src/core/features/reportbuilder/classes/reports-source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class CoreReportBuilderReportsSource extends CoreRoutedItemsManagerSource
4141
*/
4242
protected setItems(reports: CoreReportBuilderReport[], hasMoreItems: boolean): void {
4343
const sortedReports = reports.slice(0);
44-
reports.sort((a, b) => a.timecreated < b.timecreated ? 1 : -1);
44+
sortedReports.sort((a, b) => a.timemodified < b.timemodified ? 1 : -1);
4545
super.setItems(sortedReports, hasMoreItems);
4646
}
4747

src/core/features/reportbuilder/components/report-summary/report-summary.html

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ <h1>
2222
</core-format-text>
2323
</h1>
2424
</ion-label>
25-
<ion-button fill="clear" [href]="reportUrl" core-link [showBrowserWarning]="false"
26-
[attr.aria-label]="'core.openinbrowser' | translate" slot="end">
27-
<ion-icon name="fas-external-link-alt" slot="icon-only" aria-hidden="true"></ion-icon>
28-
</ion-button>
2925
</ion-item>
3026

3127
<ion-item class="ion-text-wrap" [detail]="false" *ngFor="let item of reportDetailToDisplay">
@@ -37,3 +33,16 @@ <h1>
3733
</ion-item>
3834
</div>
3935
</ion-content>
36+
37+
<ion-footer class="ion-no-border">
38+
<ion-item class="ion-text-wrap filters-info">
39+
<ion-label>
40+
<p>
41+
<ion-icon name="fas-info-circle" aria-hidden="true"></ion-icon>
42+
<core-format-text [text]="'core.reportbuilder.filtersapplied' | translate: { $a: reportUrl }" contextLevel="report"
43+
[contextInstanceId]="reportDetail.id">
44+
</core-format-text>
45+
</p>
46+
</ion-label>
47+
</ion-item>
48+
</ion-footer>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@import "~theme/globals";
2+
3+
.filters-info {
4+
padding-bottom: 1rem;
5+
}
6+
7+
ion-footer {
8+
ion-icon {
9+
font-size: 16px;
10+
color: $blue;
11+
margin-right: .3rem;
12+
vertical-align: middle;
13+
}
14+
}

src/core/features/reportbuilder/components/report-summary/report-summary.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { ModalController } from '@singletons';
2121
@Component({
2222
selector: 'core-report-builder-report-summary',
2323
templateUrl: './report-summary.html',
24+
styleUrls: ['./report-summary.scss'],
2425
changeDetection: ChangeDetectionStrategy.OnPush,
2526
})
2627
export class CoreReportBuilderReportSummaryComponent implements OnInit {

src/core/features/reportbuilder/lang.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"modifiedby": "Modified by",
3-
"reportstab": "Reports",
3+
"reports": "Reports",
4+
"filtersapplied": "There may be filters applied to this view. To edit filters or change the sorting order, <a href=\"{{$a}}\">open this report on your browser.</a>",
45
"reportsource": "Report source",
56
"timecreated": "Time created",
67
"showcolumns": "Show columns",

src/core/features/reportbuilder/pages/list/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<ion-back-button [text]="'core.back' | translate"></ion-back-button>
55
</ion-buttons>
66
<ion-title>
7-
<h1>{{ 'core.reportbuilder.reportstab' | translate }}</h1>
7+
<h1>{{ 'core.reportbuilder.reports' | translate }}</h1>
88
</ion-title>
99
</ion-toolbar>
1010
</ion-header>

src/core/features/reportbuilder/reportbuilder.module.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
// limitations under the License.
1414

1515
import { APP_INITIALIZER, NgModule } from '@angular/core';
16-
import { RouterModule, Routes } from '@angular/router';
16+
import { Routes } from '@angular/router';
17+
import { CoreMainMenuRoutingModule } from '@features/mainmenu/mainmenu-routing.module';
18+
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
1719
import { CoreUserDelegate } from '@features/user/services/user-delegate';
1820
import { CoreReportBuilderHandler, CoreReportBuilderHandlerService } from './services/handlers/reportbuilder';
1921

@@ -25,7 +27,10 @@ const routes: Routes = [
2527
];
2628

2729
@NgModule({
28-
imports: [RouterModule.forChild(routes)],
30+
imports: [
31+
CoreMainMenuTabRoutingModule.forChild(routes),
32+
],
33+
exports: [CoreMainMenuRoutingModule],
2934
providers: [
3035
{
3136
provide: APP_INITIALIZER,

src/core/features/reportbuilder/services/handlers/reportbuilder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ export class CoreReportBuilderHandlerService implements CoreUserProfileHandler {
4545
return {
4646
class: 'core-report-builder',
4747
icon: 'fa-list-alt',
48-
title: 'core.reportbuilder.reportstab',
48+
title: 'core.reportbuilder.reports',
4949
action: async (event): Promise<void> => {
5050
event.preventDefault();
5151
event.stopPropagation();
52-
await CoreNavigator.navigate(`/${CoreReportBuilderHandlerService.PAGE_NAME}`);
52+
await CoreNavigator.navigateToSitePath(CoreReportBuilderHandlerService.PAGE_NAME);
5353
},
5454
};
5555
}

0 commit comments

Comments
 (0)