diff options
author | Hendrik Leppelsack <hendrik@leppelsack.de> | 2017-10-26 15:48:07 +0200 |
---|---|---|
committer | Hendrik Leppelsack <hendrik@leppelsack.de> | 2017-10-26 16:04:21 +0200 |
commit | 73d7441e9ed4ce2449dd247b82248facda6883e0 (patch) | |
tree | d5901abeae35b0509ea77054cfa586f9b183a265 /templates | |
parent | 6dabbc756b9e2aef4ff2ff63fff5679da96c7728 (diff) |
add group and contactfilter model, implement group ordering by count
Diffstat (limited to 'templates')
-rw-r--r-- | templates/contactFilter.html | 7 | ||||
-rw-r--r-- | templates/group.html | 4 | ||||
-rw-r--r-- | templates/groupList.html | 4 | ||||
-rw-r--r-- | templates/main.php | 1 |
4 files changed, 12 insertions, 4 deletions
diff --git a/templates/contactFilter.html b/templates/contactFilter.html new file mode 100644 index 00000000..f8f8a743 --- /dev/null +++ b/templates/contactFilter.html @@ -0,0 +1,7 @@ +<a ng-href="#/{{ctrl.contactFilter.name}}">{{ ctrl.contactFilter.name }} + <div class="app-navigation-entry-utils"> + <ul> + <li class="app-navigation-entry-utils-counter">{{ctrl.contactFilter.count | counterFormatter}}</li> + </ul> + </div> +</a> diff --git a/templates/group.html b/templates/group.html index 320259c2..30d6bcc2 100644 --- a/templates/group.html +++ b/templates/group.html @@ -1,7 +1,7 @@ -<a ng-href="#/{{ctrl.group}}">{{ ctrl.group }} +<a ng-href="#/{{ctrl.group.name}}">{{ ctrl.group.name }} <div class="app-navigation-entry-utils"> <ul> - <li class="app-navigation-entry-utils-counter">{{ctrl.groupCount | counterFormatter}}</li> + <li class="app-navigation-entry-utils-counter">{{ctrl.group.count | counterFormatter}}</li> </ul> </div> </a> diff --git a/templates/groupList.html b/templates/groupList.html index 9c999d76..ff344a8b 100644 --- a/templates/groupList.html +++ b/templates/groupList.html @@ -1 +1,3 @@ -<li ng-repeat="group in ctrl.groups" group group-name="group[0]" group-count="group[1]" ng-click="ctrl.setSelected(group[0])" ng-class="{active: group[0] === ctrl.getSelected()}"></li> +<li ng-repeat="contactFilter in ctrl.contactFilters" contact-filter="contactFilter"></li> + +<li ng-repeat="group in ctrl.groups | orderBy: '-count'" group="group" ng-click="ctrl.setSelected(group.name)" ng-class="{active: group.name === ctrl.getSelected()}"></li> diff --git a/templates/main.php b/templates/main.php index 3f793cda..a4a15127 100644 --- a/templates/main.php +++ b/templates/main.php @@ -31,7 +31,6 @@ vendor_style('select2/select2'); <div id="importscreen-sidebar-block" class="icon-loading" ng-show="$root.importing"></div> <newContactButton></newContactButton> <ul groupList></ul> - <div id="app-settings"> <div id="app-settings-header"> <button class="settings-button" |