summaryrefslogtreecommitdiff
path: root/app/helpers/merge_requests_helper.rb
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-07-11 18:00:55 +0000
committerRobert Speicher <robert@gitlab.com>2016-07-11 18:00:55 +0000
commit72b055d0d2dbebfffca1ff4cf55dda00a7eb362b (patch)
treee418ce59c246a045c9119c5de135979073bb37c1 /app/helpers/merge_requests_helper.rb
parentf5ceb638963f38fb647b29d7a69af5e38509d7a6 (diff)
parentb684517907c8783320a58a541b13e6efd77c36cc (diff)
downloadgitlab-ce-72b055d0d2dbebfffca1ff4cf55dda00a7eb362b.tar.gz
Merge branch 'mr-close-btn' into 'master'
Correctly shows close button on merge requests Closes #19403 See merge request !5036
Diffstat (limited to 'app/helpers/merge_requests_helper.rb')
-rw-r--r--app/helpers/merge_requests_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb
index 4da1f4865a4..db6e731c744 100644
--- a/app/helpers/merge_requests_helper.rb
+++ b/app/helpers/merge_requests_helper.rb
@@ -96,4 +96,8 @@ module MergeRequestsHelper
["#{source_path}:#{source_branch}", "#{target_path}:#{target_branch}"]
end
end
+
+ def merge_request_button_visibility(merge_request, closed)
+ return 'hidden' if merge_request.closed? == closed || (merge_request.merged? == closed && !merge_request.closed?)
+ end
end