Add an untagged filter in the projects list.

This commit is contained in:
Paulo Reis 2017-04-28 12:11:51 +01:00
parent 877cd8e018
commit 84a2658259
3 changed files with 14 additions and 1 deletions

View file

@ -79,6 +79,11 @@
li
a(href, ng-click="deleteTag(tag)", stop-propagation="click")
| #{translate("delete")}
li.tag(
ng-if="tags.length",
ng-cloak,
ng-click="selectUntagged()"
) uncategorized
li(ng-cloak)
a.tag(href, ng-click="openNewTagModal()")
i.fa.fa-fw.fa-plus

View file

@ -113,6 +113,10 @@ define [
if $scope.filter == "tag" and selectedTag? and project.id not in selectedTag.project_ids
visible = false
# Hide tagged projects if we only want to see the uncategorized ones
if $scope.filter == "untagged" and project.tags?
visible = false
# Hide projects we own if we only want to see shared projects
if $scope.filter == "shared" and project.accessLevel == "owner"
visible = false

View file

@ -15,7 +15,11 @@ define [
$scope._clearTags()
tag.selected = true
$scope.setFilter("tag")
$scope.selectUntagged = () ->
$scope._clearTags()
$scope.setFilter("untagged")
$scope.deleteTag = (tag) ->
modalInstance = $modal.open(
templateUrl: "deleteTagModalTemplate"