diff options
author | Robert Speicher <robert@gitlab.com> | 2016-07-11 18:00:55 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-07-11 18:00:55 +0000 |
commit | 72b055d0d2dbebfffca1ff4cf55dda00a7eb362b (patch) | |
tree | e418ce59c246a045c9119c5de135979073bb37c1 /app/helpers/merge_requests_helper.rb | |
parent | f5ceb638963f38fb647b29d7a69af5e38509d7a6 (diff) | |
parent | b684517907c8783320a58a541b13e6efd77c36cc (diff) | |
download | gitlab-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.rb | 4 |
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 |