mirror of https://github.com/nextcloud/contacts
Add number of displayed contacts to the bottom of the contact list
This commit is contained in:
parent
1e61b1bba4
commit
35160f520f
|
@ -472,6 +472,16 @@ ul.addressBook-share-list li {
|
|||
opacity: 1;
|
||||
}
|
||||
|
||||
/* styling for contact count in contact list */
|
||||
.contacts-list-count {
|
||||
text-align:center;
|
||||
color: #333;
|
||||
padding:25px;
|
||||
position: relative;
|
||||
height: 68px;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
/* SELECT2 styling - MOVE TO CORE FOR 9.1! */
|
||||
|
||||
detailsitem .select2-container {
|
||||
|
|
|
@ -14,6 +14,9 @@ angular.module('contactsApp')
|
|||
emptySearch : t('contacts', 'No search result for {query}', {query: ctrl.searchTerm})
|
||||
};
|
||||
|
||||
$scope.getCountString = function(contacts) {
|
||||
return n('contacts', '%n contact', '%n contacts', contacts.length);
|
||||
};
|
||||
|
||||
$scope.query = function(contact) {
|
||||
return contact.matches(SearchService.getSearchTerm());
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<button ng-show="!ctrl.loading && !ctrl.invalid" class="app-content-list-button" id="new-contact-button"
|
||||
type="button" name="button" ng-click="ctrl.createContact()">{{ctrl.t.addContact}}</button>
|
||||
<div class="app-content-list-item"
|
||||
ng-repeat="contact in ctrl.contactList = (ctrl.contacts | contactGroupFilter:ctrl.routeParams.gid | localeOrderBy:'displayName' | filter:query) track by contact.uid()"
|
||||
ng-repeat="contact in ctrl.contactList = (ctrl.contacts | contactGroupFilter:ctrl.routeParams.gid | localeOrderBy:'displayName' | filter:query) as filtered track by contact.uid()"
|
||||
contact data="contact"
|
||||
ng-click="setSelected(contact.uid())"
|
||||
ng-class="{active: contact.uid() === ctrl.getSelectedId()}">
|
||||
|
@ -13,4 +13,7 @@
|
|||
<h2>{{ctrl.t.emptySearch}}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="filtered.length>0" class="contacts-list-count">
|
||||
{{ getCountString(filtered) }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue