MOBILE-2795 database: Display found results number
parent
fee1dde1dc
commit
076b1a8be9
|
@ -54,9 +54,16 @@
|
||||||
{{ 'addon.mod_data.entrieslefttoadd' | translate:{$a: {entriesleft: access.entrieslefttoadd} } }}
|
{{ 'addon.mod_data.entrieslefttoadd' | translate:{$a: {entriesleft: access.entrieslefttoadd} } }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ion-item class="item" *ngIf="search.searching && !isEmpty">
|
<!-- Reset search. -->
|
||||||
<a (click)="searchReset()">{{ 'addon.mod_data.resetsettings' | translate}}</a>
|
<ng-container *ngIf="search.searching && !isEmpty">
|
||||||
</ion-item>
|
<ion-item class="item" *ngIf="!foundRecordsData">
|
||||||
|
<a (click)="searchReset()">{{ 'addon.mod_data.resetsettings' | translate}}</a>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<div class="core-success-card" *ngIf="foundRecordsData" (click)="searchReset()">
|
||||||
|
<p [innerHTML]="'addon.mod_data.foundrecords' | translate:{$a: foundRecordsData}"></p>
|
||||||
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
<div class="addon-data-contents addon-data-entries-{{data.id}}" *ngIf="!isEmpty">
|
<div class="addon-data-contents addon-data-entries-{{data.id}}" *ngIf="!isEmpty">
|
||||||
<style *ngIf="cssTemplate">
|
<style *ngIf="cssTemplate">
|
||||||
|
|
|
@ -67,6 +67,7 @@ export class AddonModDataIndexComponent extends CoreCourseModuleMainActivityComp
|
||||||
cssTemplate = '';
|
cssTemplate = '';
|
||||||
extraImports = [AddonModDataComponentsModule];
|
extraImports = [AddonModDataComponentsModule];
|
||||||
jsData;
|
jsData;
|
||||||
|
foundRecordsData;
|
||||||
|
|
||||||
protected syncEventName = AddonModDataSyncProvider.AUTO_SYNCED;
|
protected syncEventName = AddonModDataSyncProvider.AUTO_SYNCED;
|
||||||
protected entryChangedObserver: any;
|
protected entryChangedObserver: any;
|
||||||
|
@ -263,6 +264,16 @@ export class AddonModDataIndexComponent extends CoreCourseModuleMainActivityComp
|
||||||
AddonModDataProvider.PER_PAGE) < entries.totalcount;
|
AddonModDataProvider.PER_PAGE) < entries.totalcount;
|
||||||
this.entriesRendered = '';
|
this.entriesRendered = '';
|
||||||
|
|
||||||
|
if (typeof entries.maxcount != 'undefined') {
|
||||||
|
this.foundRecordsData = {
|
||||||
|
num: entries.totalcount,
|
||||||
|
max: entries.maxcount,
|
||||||
|
reseturl: '#'
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
this.foundRecordsData = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.isEmpty) {
|
if (!this.isEmpty) {
|
||||||
this.cssTemplate = this.dataHelper.prefixCSS(this.data.csstemplate, '.addon-data-entries-' + this.data.id);
|
this.cssTemplate = this.dataHelper.prefixCSS(this.data.csstemplate, '.addon-data-entries-' + this.data.id);
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
"errormustsupplyvalue": "You must supply a value here.",
|
"errormustsupplyvalue": "You must supply a value here.",
|
||||||
"expired": "Sorry, this activity closed on {{$a}} and is no longer available",
|
"expired": "Sorry, this activity closed on {{$a}} and is no longer available",
|
||||||
"fields": "Fields",
|
"fields": "Fields",
|
||||||
|
"foundrecords": "Found records: {{$a.num}}/{{$a.max}} (<a href=\"{{$a.reseturl}}\">Reset filters</a>)",
|
||||||
"latlongboth": "Both latitude and longitude are required.",
|
"latlongboth": "Both latitude and longitude are required.",
|
||||||
"menuchoose": "Choose...",
|
"menuchoose": "Choose...",
|
||||||
"modulenameplural": "Databases",
|
"modulenameplural": "Databases",
|
||||||
|
|
|
@ -391,6 +391,7 @@
|
||||||
"addon.mod_data.errormustsupplyvalue": "You must supply a value here.",
|
"addon.mod_data.errormustsupplyvalue": "You must supply a value here.",
|
||||||
"addon.mod_data.expired": "Sorry, this activity closed on {{$a}} and is no longer available",
|
"addon.mod_data.expired": "Sorry, this activity closed on {{$a}} and is no longer available",
|
||||||
"addon.mod_data.fields": "Fields",
|
"addon.mod_data.fields": "Fields",
|
||||||
|
"addon.mod_data.foundrecords": "Found records: {{$a.num}}/{{$a.max}} (<a href=\"{{$a.reseturl}}\">Reset filters</a>)",
|
||||||
"addon.mod_data.latlongboth": "Both latitude and longitude are required.",
|
"addon.mod_data.latlongboth": "Both latitude and longitude are required.",
|
||||||
"addon.mod_data.menuchoose": "Choose...",
|
"addon.mod_data.menuchoose": "Choose...",
|
||||||
"addon.mod_data.modulenameplural": "Databases",
|
"addon.mod_data.modulenameplural": "Databases",
|
||||||
|
|
Loading…
Reference in New Issue