frontend: Add field to filter tag list

This commit is contained in:
nemunaire 2018-12-04 02:02:16 +01:00
parent 3ad7976e4b
commit 8463993581
2 changed files with 3 additions and 1 deletions

View file

@ -91,7 +91,8 @@
Tags Tags
</a> </a>
<div class="dropdown-menu niceborder"> <div class="dropdown-menu niceborder">
<a ng-repeat="(tname,tag) in tags" ng-class="{active: tname == current_tag}" class="dropdown-item" ng-href="/tags/{{ tname }}">#{{ tname }} <span class="badge badge-light"><span ng-if="(my.team_id)">{{ tag.solved }}/</span>{{ tag.count }}</span></a> <input type="search" class="dropdown-item" placeholder="Filtrer" id="filtertag" ng-model="filtertag">
<a ng-repeat="tname in tagsl | filter: filtertag" ng-class="{active: tname == current_tag}" class="dropdown-item" ng-href="/tags/{{ tname }}">#{{ tname }} <span class="badge badge-light"><span ng-if="(my.team_id)">{{ tags[tname].solved }}/</span>{{ tags[tname].count }}</span></a>
</div> </div>
</li> </li>
<li class="nav-item"> <li class="nav-item">

View file

@ -131,6 +131,7 @@ angular.module("FICApp", ["ngRoute", "ngSanitize"])
}); });
}); });
$scope.tags = tags; $scope.tags = tags;
$scope.tagsl = Object.keys(tags);
} }
} }