2015-06-26 21:53:17 -04:00
|
|
|
= form_tag namespace_project_compare_index_path(@project.namespace, @project), method: :post, class: 'form-inline js-requires-input' do
|
2015-09-07 05:44:00 -04:00
|
|
|
.clearfix
|
2013-12-31 10:08:31 -05:00
|
|
|
- if params[:to] && params[:from]
|
2016-09-29 15:16:28 -04:00
|
|
|
.compare-switch-container
|
|
|
|
= link_to icon('exchange'), {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has-tooltip', title: 'Switch base of comparison'}
|
|
|
|
.form-group.dropdown.compare-form-group.from.js-compare-from-dropdown
|
2016-06-24 07:29:42 -04:00
|
|
|
.input-group.inline-input-group
|
2013-12-31 10:08:31 -05:00
|
|
|
%span.input-group-addon from
|
2016-09-27 13:29:12 -04:00
|
|
|
= hidden_field_tag :from, params[:from]
|
|
|
|
= button_tag type: 'button', class: "form-control compare-dropdown-toggle js-compare-dropdown", required: true, data: { refs_url: refs_namespace_project_path(@project.namespace, @project), toggle: "dropdown", target: ".js-compare-from-dropdown", selected: params[:from], field_name: :from } do
|
|
|
|
.dropdown-toggle-text= params[:from] || 'Select branch/tag'
|
2016-06-24 07:29:42 -04:00
|
|
|
= render "ref_dropdown"
|
2016-10-21 08:43:52 -04:00
|
|
|
.compare-ellipsis.inline ...
|
2016-09-29 15:16:28 -04:00
|
|
|
.form-group.dropdown.compare-form-group.to.js-compare-to-dropdown
|
2016-06-24 07:29:42 -04:00
|
|
|
.input-group.inline-input-group
|
2013-12-31 10:08:31 -05:00
|
|
|
%span.input-group-addon to
|
2016-09-27 13:29:12 -04:00
|
|
|
= hidden_field_tag :to, params[:to]
|
|
|
|
= button_tag type: 'button', class: "form-control compare-dropdown-toggle js-compare-dropdown", required: true, data: { refs_url: refs_namespace_project_path(@project.namespace, @project), toggle: "dropdown", target: ".js-compare-to-dropdown", selected: params[:to], field_name: :to } do
|
|
|
|
.dropdown-toggle-text= params[:to] || 'Select branch/tag'
|
2016-06-24 07:29:42 -04:00
|
|
|
= render "ref_dropdown"
|
2013-12-31 10:08:31 -05:00
|
|
|
|
2014-09-26 10:57:36 -04:00
|
|
|
= button_tag "Compare", class: "btn btn-create commits-compare-btn"
|
2016-02-01 18:43:51 -05:00
|
|
|
- if @merge_request.present?
|
2016-02-10 07:47:59 -05:00
|
|
|
= link_to "View Open Merge Request", namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'prepend-left-10 btn'
|
2016-02-01 18:43:51 -05:00
|
|
|
- elsif create_mr_button?
|
2015-05-09 16:26:25 -04:00
|
|
|
= link_to create_mr_path, class: 'prepend-left-10 btn' do
|
|
|
|
= icon("plus")
|
|
|
|
Create Merge Request
|