- can_resolve = @merge_request.conflicts_can_be_resolved_by?(current_user)
- can_resolve_in_ui = @merge_request.conflicts_can_be_resolved_in_ui?
- can_merge = @merge_request.can_be_merged_via_command_line_by?(current_user)

%h4.has-conflicts
  = icon("exclamation-triangle")
  This merge request contains merge conflicts

%p
  To merge this request, resolve these conflicts
  - if can_resolve && !can_resolve_in_ui
    locally
  or
  - unless can_merge
    ask someone with write access to this repository to
  merge it locally.

- if (can_resolve && can_resolve_in_ui) || can_merge
  .btn-group
    - if can_resolve && can_resolve_in_ui
      = link_to "Resolve conflicts", conflicts_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: "btn"
    - if can_merge
      = link_to "Merge locally", "#modal_merge_info", class: "btn how_to_merge_link vlink", "data-toggle" => "modal"