debian-mirror-gitlab/app/views/projects/merge_requests/widget/_open.html.haml

38 lines
1.9 KiB
Text
Raw Normal View History

2015-09-11 14:41:01 +05:30
.mr-state-widget
= render 'projects/merge_requests/widget/heading'
.mr-widget-body
2016-09-13 17:45:13 +05:30
-# After conflicts are resolved, the user is redirected back to the MR page.
-# There is a short window before background workers run and GitLab processes
-# the new push and commits, during which it will think the conflicts still exist.
-# We send this param to get the widget to treat the MR as having no more conflicts.
- resolved_conflicts = params[:resolved_conflicts]
2015-09-11 14:41:01 +05:30
- if @project.archived?
= render 'projects/merge_requests/widget/open/archived'
- elsif @merge_request.commits.blank?
= render 'projects/merge_requests/widget/open/nothing'
- elsif @merge_request.branch_missing?
= render 'projects/merge_requests/widget/open/missing_branch'
- elsif @merge_request.unchecked?
= render 'projects/merge_requests/widget/open/check'
2016-09-13 17:45:13 +05:30
- elsif @merge_request.cannot_be_merged? && !resolved_conflicts
2015-09-11 14:41:01 +05:30
= render 'projects/merge_requests/widget/open/conflicts'
- elsif @merge_request.work_in_progress?
= render 'projects/merge_requests/widget/open/wip'
2015-12-23 02:04:40 +05:30
- elsif @merge_request.merge_when_build_succeeds?
= render 'projects/merge_requests/widget/open/merge_when_build_succeeds'
2015-09-11 14:41:01 +05:30
- elsif !@merge_request.can_be_merged_by?(current_user)
= render 'projects/merge_requests/widget/open/not_allowed'
- elsif !@merge_request.mergeable_ci_state? && @pipeline && @pipeline.failed?
= render 'projects/merge_requests/widget/open/build_failed'
2016-09-13 17:45:13 +05:30
- elsif @merge_request.can_be_merged? || resolved_conflicts
2015-09-11 14:41:01 +05:30
= render 'projects/merge_requests/widget/open/accept'
2016-08-24 12:49:21 +05:30
- if mr_closes_issues.present?
2015-09-11 14:41:01 +05:30
.mr-widget-footer
%span
%i.fa.fa-check
2016-08-24 12:49:21 +05:30
Accepting this merge request will close #{"issue".pluralize(mr_closes_issues.size)}
2015-09-11 14:41:01 +05:30
= succeed '.' do
2016-08-24 12:49:21 +05:30
!= markdown issues_sentence(mr_closes_issues), pipeline: :gfm, author: @merge_request.author