MOBILE-2963 message: Show only one message when no results found
parent
791d9b4afa
commit
af25634bd2
|
@ -216,9 +216,6 @@
|
||||||
"addon.messages.requests": "moodle",
|
"addon.messages.requests": "moodle",
|
||||||
"addon.messages.requirecontacttomessage": "message",
|
"addon.messages.requirecontacttomessage": "message",
|
||||||
"addon.messages.searchcombined": "message",
|
"addon.messages.searchcombined": "message",
|
||||||
"addon.messages.searchnocontactsfound": "message",
|
|
||||||
"addon.messages.searchnomessagesfound": "message",
|
|
||||||
"addon.messages.searchnononcontactsfound": "message",
|
|
||||||
"addon.messages.selfconversation": "message",
|
"addon.messages.selfconversation": "message",
|
||||||
"addon.messages.selfconversationdefaultmessage": "message",
|
"addon.messages.selfconversationdefaultmessage": "message",
|
||||||
"addon.messages.sendcontactrequest": "message",
|
"addon.messages.sendcontactrequest": "message",
|
||||||
|
|
|
@ -55,9 +55,6 @@
|
||||||
"requests": "Requests",
|
"requests": "Requests",
|
||||||
"requirecontacttomessage": "You need to request {{$a}} to add you as a contact to be able to message them.",
|
"requirecontacttomessage": "You need to request {{$a}} to add you as a contact to be able to message them.",
|
||||||
"searchcombined": "Search people and messages",
|
"searchcombined": "Search people and messages",
|
||||||
"searchnocontactsfound": "No contacts found",
|
|
||||||
"searchnomessagesfound": "No messages found",
|
|
||||||
"searchnononcontactsfound": "No non contacts found",
|
|
||||||
"selfconversation": "Personal space",
|
"selfconversation": "Personal space",
|
||||||
"selfconversationdefaultmessage": "Save draft messages, links, notes etc. to access later.",
|
"selfconversationdefaultmessage": "Save draft messages, links, notes etc. to access later.",
|
||||||
"sendcontactrequest": "Send contact request",
|
"sendcontactrequest": "Send contact request",
|
||||||
|
|
|
@ -18,16 +18,16 @@
|
||||||
<!-- The infinite loading cannot be inside the ng-template, it fails because it doesn't find ion-content. -->
|
<!-- The infinite loading cannot be inside the ng-template, it fails because it doesn't find ion-content. -->
|
||||||
<core-infinite-loading [enabled]="messages.canLoadMore" (action)="search(query, 'messages', $event)" [error]="messages.loadMoreError"></core-infinite-loading>
|
<core-infinite-loading [enabled]="messages.canLoadMore" (action)="search(query, 'messages', $event)" [error]="messages.loadMoreError"></core-infinite-loading>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
|
|
||||||
|
<core-empty-box *ngIf="displayResults && !contacts.results.length && !nonContacts.results.length && !messages.results.length" icon="search" [message]="'core.noresults' | translate"></core-empty-box>
|
||||||
</core-loading>
|
</core-loading>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
</core-split-view>
|
</core-split-view>
|
||||||
|
|
||||||
<!-- Template to render a list of results -->
|
<!-- Template to render a list of results -->
|
||||||
<ng-template #resultsTemplate let-item="item">
|
<ng-template #resultsTemplate let-item="item">
|
||||||
|
<ng-container *ngIf="item.results.length > 0">
|
||||||
<ion-item-divider text-wrap>{{ item.titleString | translate }}</ion-item-divider>
|
<ion-item-divider text-wrap>{{ item.titleString | translate }}</ion-item-divider>
|
||||||
<ion-item text-wrap *ngIf="item.results.length == 0">
|
|
||||||
{{ item.emptyString | translate }}
|
|
||||||
</ion-item>
|
|
||||||
|
|
||||||
<!-- List of results -->
|
<!-- List of results -->
|
||||||
<a ion-item text-wrap *ngFor="let result of item.results" [title]="result.fullname" (click)="openConversation(result)" [class.core-split-item-selected]="result == selectedResult" class="addon-message-discussion">
|
<a ion-item text-wrap *ngFor="let result of item.results" [title]="result.fullname" (click)="openConversation(result)" [class.core-split-item-selected]="result == selectedResult" class="addon-message-discussion">
|
||||||
|
@ -56,4 +56,5 @@
|
||||||
<ion-spinner></ion-spinner>
|
<ion-spinner></ion-spinner>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
</ng-template>
|
</ng-template>
|
|
@ -38,7 +38,6 @@ export class AddonMessagesSearchPage implements OnDestroy {
|
||||||
contacts = {
|
contacts = {
|
||||||
type: 'contacts',
|
type: 'contacts',
|
||||||
titleString: 'addon.messages.contacts',
|
titleString: 'addon.messages.contacts',
|
||||||
emptyString: 'addon.messages.searchnocontactsfound',
|
|
||||||
results: [],
|
results: [],
|
||||||
canLoadMore: false,
|
canLoadMore: false,
|
||||||
loadingMore: false
|
loadingMore: false
|
||||||
|
@ -46,7 +45,6 @@ export class AddonMessagesSearchPage implements OnDestroy {
|
||||||
nonContacts = {
|
nonContacts = {
|
||||||
type: 'noncontacts',
|
type: 'noncontacts',
|
||||||
titleString: 'addon.messages.noncontacts',
|
titleString: 'addon.messages.noncontacts',
|
||||||
emptyString: 'addon.messages.searchnononcontactsfound',
|
|
||||||
results: [],
|
results: [],
|
||||||
canLoadMore: false,
|
canLoadMore: false,
|
||||||
loadingMore: false
|
loadingMore: false
|
||||||
|
@ -54,7 +52,6 @@ export class AddonMessagesSearchPage implements OnDestroy {
|
||||||
messages = {
|
messages = {
|
||||||
type: 'messages',
|
type: 'messages',
|
||||||
titleString: 'addon.messages.messages',
|
titleString: 'addon.messages.messages',
|
||||||
emptyString: 'addon.messages.searchnomessagesfound',
|
|
||||||
results: [],
|
results: [],
|
||||||
canLoadMore: false,
|
canLoadMore: false,
|
||||||
loadingMore: false,
|
loadingMore: false,
|
||||||
|
|
|
@ -216,9 +216,6 @@
|
||||||
"addon.messages.requests": "Requests",
|
"addon.messages.requests": "Requests",
|
||||||
"addon.messages.requirecontacttomessage": "You need to request {{$a}} to add you as a contact to be able to message them.",
|
"addon.messages.requirecontacttomessage": "You need to request {{$a}} to add you as a contact to be able to message them.",
|
||||||
"addon.messages.searchcombined": "Search people and messages",
|
"addon.messages.searchcombined": "Search people and messages",
|
||||||
"addon.messages.searchnocontactsfound": "No contacts found",
|
|
||||||
"addon.messages.searchnomessagesfound": "No messages found",
|
|
||||||
"addon.messages.searchnononcontactsfound": "No non contacts found",
|
|
||||||
"addon.messages.selfconversation": "Personal space",
|
"addon.messages.selfconversation": "Personal space",
|
||||||
"addon.messages.selfconversationdefaultmessage": "Save draft messages, links, notes etc. to access later.",
|
"addon.messages.selfconversationdefaultmessage": "Save draft messages, links, notes etc. to access later.",
|
||||||
"addon.messages.sendcontactrequest": "Send contact request",
|
"addon.messages.sendcontactrequest": "Send contact request",
|
||||||
|
|
Loading…
Reference in New Issue