commit
953c5ab0a4
|
@ -54,9 +54,16 @@
|
|||
{{ 'addon.mod_data.entrieslefttoadd' | translate:{$a: {entriesleft: access.entrieslefttoadd} } }}
|
||||
</div>
|
||||
|
||||
<ion-item class="item" *ngIf="search.searching && !isEmpty">
|
||||
<a (click)="searchReset()">{{ 'addon.mod_data.resetsettings' | translate}}</a>
|
||||
</ion-item>
|
||||
<!-- Reset search. -->
|
||||
<ng-container *ngIf="search.searching && !isEmpty">
|
||||
<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">
|
||||
<style *ngIf="cssTemplate">
|
||||
|
|
|
@ -67,6 +67,7 @@ export class AddonModDataIndexComponent extends CoreCourseModuleMainActivityComp
|
|||
cssTemplate = '';
|
||||
extraImports = [AddonModDataComponentsModule];
|
||||
jsData;
|
||||
foundRecordsData;
|
||||
|
||||
protected syncEventName = AddonModDataSyncProvider.AUTO_SYNCED;
|
||||
protected entryChangedObserver: any;
|
||||
|
@ -263,6 +264,16 @@ export class AddonModDataIndexComponent extends CoreCourseModuleMainActivityComp
|
|||
AddonModDataProvider.PER_PAGE) < entries.totalcount;
|
||||
this.entriesRendered = '';
|
||||
|
||||
if (typeof entries.maxcount != 'undefined') {
|
||||
this.foundRecordsData = {
|
||||
num: entries.totalcount,
|
||||
max: entries.maxcount,
|
||||
reseturl: '#'
|
||||
};
|
||||
} else {
|
||||
this.foundRecordsData = undefined;
|
||||
}
|
||||
|
||||
if (!this.isEmpty) {
|
||||
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.",
|
||||
"expired": "Sorry, this activity closed on {{$a}} and is no longer available",
|
||||
"fields": "Fields",
|
||||
"foundrecords": "Found records: {{$a.num}}/{{$a.max}} (<a href=\"{{$a.reseturl}}\">Reset filters</a>)",
|
||||
"latlongboth": "Both latitude and longitude are required.",
|
||||
"menuchoose": "Choose...",
|
||||
"modulenameplural": "Databases",
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</ion-item>
|
||||
<ion-item text-wrap>
|
||||
<ion-label stacked>{{ 'core.sortby' | translate }}</ion-label>
|
||||
<ion-select interface="action-sheet" name="sortBy" formControlName="sortBy">
|
||||
<ion-select interface="action-sheet" name="sortBy" formControlName="sortBy" [placeholder]="'core.sortby' | translate">
|
||||
<optgroup *ngIf="fieldsArray.length" label="{{ 'addon.mod_data.fields' | translate }}">
|
||||
<ion-option *ngFor="let field of fieldsArray" [value]="field.id">{{field.name}}</ion-option>
|
||||
</optgroup>
|
||||
|
|
|
@ -391,6 +391,7 @@
|
|||
"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.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.menuchoose": "Choose...",
|
||||
"addon.mod_data.modulenameplural": "Databases",
|
||||
|
|
Loading…
Reference in New Issue