MOBILE-2201 data: Display message in pages where tags are not supported
parent
c07eb58568
commit
c00cbb9b8d
|
@ -431,6 +431,7 @@
|
|||
"addon.mod_data.confirmdeleterecord": "data",
|
||||
"addon.mod_data.descending": "data",
|
||||
"addon.mod_data.disapprove": "data",
|
||||
"addon.mod_data.edittagsnotsupported": "local_moodlemobileapp",
|
||||
"addon.mod_data.emptyaddform": "data",
|
||||
"addon.mod_data.entrieslefttoadd": "data",
|
||||
"addon.mod_data.entrieslefttoaddtoview": "data",
|
||||
|
@ -455,6 +456,7 @@
|
|||
"addon.mod_data.recorddisapproved": "data",
|
||||
"addon.mod_data.resetsettings": "data",
|
||||
"addon.mod_data.search": "data",
|
||||
"addon.mod_data.searchbytagsnotsupported": "local_moodlemobileapp",
|
||||
"addon.mod_data.selectedrequired": "data",
|
||||
"addon.mod_data.single": "data",
|
||||
"addon.mod_data.timeadded": "data",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"confirmdeleterecord": "Are you sure you want to delete this entry?",
|
||||
"descending": "Descending",
|
||||
"disapprove": "Undo approval",
|
||||
"edittagsnotsupported": "Sorry, editing tags is not supported by the app.",
|
||||
"emptyaddform": "You did not fill out any fields!",
|
||||
"entrieslefttoadd": "You must add {{$a.entriesleft}} more entry/entries in order to complete this activity",
|
||||
"entrieslefttoaddtoview": "You must add {{$a.entrieslefttoview}} more entry/entries before you can view other participants' entries.",
|
||||
|
@ -34,6 +35,7 @@
|
|||
"recorddisapproved": "Entry unapproved",
|
||||
"resetsettings": "Reset filters",
|
||||
"search": "Search",
|
||||
"searchbytagsnotsupported": "Sorry, searching by tags is not supported by the app.",
|
||||
"selectedrequired": "All selected required",
|
||||
"single": "View single",
|
||||
"timeadded": "Time added",
|
||||
|
|
|
@ -28,6 +28,7 @@ import { AddonModDataHelperProvider } from '../../providers/helper';
|
|||
import { AddonModDataOfflineProvider } from '../../providers/offline';
|
||||
import { AddonModDataFieldsDelegate } from '../../providers/fields-delegate';
|
||||
import { AddonModDataComponentsModule } from '../../components/components.module';
|
||||
import { CoreTagProvider } from '@core/tag/providers/tag';
|
||||
|
||||
/**
|
||||
* Page that displays the view edit page.
|
||||
|
@ -68,7 +69,8 @@ export class AddonModDataEditPage {
|
|||
protected courseProvider: CoreCourseProvider, protected dataProvider: AddonModDataProvider,
|
||||
protected dataOffline: AddonModDataOfflineProvider, protected dataHelper: AddonModDataHelperProvider,
|
||||
sitesProvider: CoreSitesProvider, protected navCtrl: NavController, protected translate: TranslateService,
|
||||
protected eventsProvider: CoreEventsProvider, protected fileUploaderProvider: CoreFileUploaderProvider) {
|
||||
protected eventsProvider: CoreEventsProvider, protected fileUploaderProvider: CoreFileUploaderProvider,
|
||||
private tagProvider: CoreTagProvider) {
|
||||
this.module = params.get('module') || {};
|
||||
this.entryId = params.get('entryId') || null;
|
||||
this.courseId = params.get('courseId');
|
||||
|
@ -309,6 +311,11 @@ export class AddonModDataEditPage {
|
|||
template = template.replace(replace, 'field_' + field.id);
|
||||
});
|
||||
|
||||
// Editing tags is not supported.
|
||||
replace = new RegExp('##tags##', 'gi');
|
||||
const message = '<p class="item-dimmed">{{ \'addon.mod_data.edittagsnotsupported\' | translate }}</p>';
|
||||
template = template.replace(replace, this.tagProvider.areTagsAvailableInSite() ? message : '');
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ import { CoreTextUtilsProvider } from '@providers/utils/text';
|
|||
import { AddonModDataComponentsModule } from '../../components/components.module';
|
||||
import { AddonModDataFieldsDelegate } from '../../providers/fields-delegate';
|
||||
import { AddonModDataHelperProvider } from '../../providers/helper';
|
||||
import { CoreTagProvider } from '@core/tag/providers/tag';
|
||||
|
||||
/**
|
||||
* Page that displays the search modal.
|
||||
|
@ -42,7 +43,8 @@ export class AddonModDataSearchPage {
|
|||
|
||||
constructor(params: NavParams, private viewCtrl: ViewController, fb: FormBuilder, protected utils: CoreUtilsProvider,
|
||||
protected domUtils: CoreDomUtilsProvider, protected fieldsDelegate: AddonModDataFieldsDelegate,
|
||||
protected textUtils: CoreTextUtilsProvider, protected dataHelper: AddonModDataHelperProvider) {
|
||||
protected textUtils: CoreTextUtilsProvider, protected dataHelper: AddonModDataHelperProvider,
|
||||
private tagProvider: CoreTagProvider) {
|
||||
this.search = params.get('search');
|
||||
this.fields = params.get('fields');
|
||||
this.data = params.get('data');
|
||||
|
@ -117,9 +119,10 @@ export class AddonModDataSearchPage {
|
|||
[placeholder]="\'addon.mod_data.authorlastname\' | translate" formControlName="lastname"></ion-input></span>';
|
||||
template = template.replace(replace, render);
|
||||
|
||||
// Tags are unsupported right now.
|
||||
// Searching by tags is not supported.
|
||||
replace = new RegExp('##tags##', 'gi');
|
||||
template = template.replace(replace, '');
|
||||
const message = '<p class="item-dimmed">{{ \'addon.mod_data.searchbytagsnotsupported\' | translate }}</p>';
|
||||
template = template.replace(replace, this.tagProvider.areTagsAvailableInSite() ? message : '');
|
||||
|
||||
return template;
|
||||
}
|
||||
|
|
|
@ -431,6 +431,7 @@
|
|||
"addon.mod_data.confirmdeleterecord": "Are you sure you want to delete this entry?",
|
||||
"addon.mod_data.descending": "Descending",
|
||||
"addon.mod_data.disapprove": "Undo approval",
|
||||
"addon.mod_data.edittagsnotsupported": "Sorry, editing tags is not supported by the app.",
|
||||
"addon.mod_data.emptyaddform": "You did not fill out any fields!",
|
||||
"addon.mod_data.entrieslefttoadd": "You must add {{$a.entriesleft}} more entry/entries in order to complete this activity",
|
||||
"addon.mod_data.entrieslefttoaddtoview": "You must add {{$a.entrieslefttoview}} more entry/entries before you can view other participants' entries.",
|
||||
|
@ -455,6 +456,7 @@
|
|||
"addon.mod_data.recorddisapproved": "Entry unapproved",
|
||||
"addon.mod_data.resetsettings": "Reset filters",
|
||||
"addon.mod_data.search": "Search",
|
||||
"addon.mod_data.searchbytagsnotsupported": "Sorry, searching by tags is not supported by the app.",
|
||||
"addon.mod_data.selectedrequired": "All selected required",
|
||||
"addon.mod_data.single": "View single",
|
||||
"addon.mod_data.timeadded": "Time added",
|
||||
|
|
Loading…
Reference in New Issue