summaryrefslogtreecommitdiff
path: root/app/helpers/issuables_helper.rb
diff options
context:
space:
mode:
authorLuke Bennett <lukeeeebennettplus@gmail.com>2016-09-23 15:18:33 +0100
committerLuke Bennett <lukeeeebennettplus@gmail.com>2016-10-07 14:25:20 +0100
commit443619300d067a83cbd53872635c2c3cfd1f6655 (patch)
tree34bb64513e6741d08a3311d12f4f243027ac7e6a /app/helpers/issuables_helper.rb
parent49d6ca6267034149a63b8648215ed0a73126de3f (diff)
downloadgitlab-ce-443619300d067a83cbd53872635c2c3cfd1f6655.tar.gz
Added `issuable_filters_present` to check for active filters before rendering the reset button22457-reset-filters-button-should-be-invisible-when-no-filters-are-active
Added tests
Diffstat (limited to 'app/helpers/issuables_helper.rb')
-rw-r--r--app/helpers/issuables_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index 692fadd505f..03b2db1bc91 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -124,6 +124,10 @@ module IssuablesHelper
end
end
+ def issuable_filters_present
+ params[:search] || params[:author_id] || params[:assignee_id] || params[:milestone_title] || params[:label_name]
+ end
+
def issuables_count_for_state(issuable_type, state)
issuables_finder = public_send("#{issuable_type}_finder")
issuables_finder.params[:state] = state