diff options
author | Phil Hughes <me@iamphill.com> | 2016-07-11 08:51:18 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-07-11 08:51:18 +0100 |
commit | b684517907c8783320a58a541b13e6efd77c36cc (patch) | |
tree | b809bb360b0f9a8e266683631e687b828b61ecd0 /app/helpers/merge_requests_helper.rb | |
parent | c674c119ee463a2bfd89dfe30e6b745dfd1ae11f (diff) | |
download | gitlab-ce-b684517907c8783320a58a541b13e6efd77c36cc.tar.gz |
Moved merge request button visibility out of issue_helpermr-close-btn
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 1dd07a2a220..631a0bb758d 100644 --- a/app/helpers/merge_requests_helper.rb +++ b/app/helpers/merge_requests_helper.rb @@ -92,4 +92,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 |