2017-09-10 17:25:29 +05:30
|
|
|
= form_tag project_compare_index_path(@project), method: :post, class: 'form-inline js-requires-input' do
|
2015-09-25 12:07:36 +05:30
|
|
|
.clearfix
|
2014-09-02 18:07:02 +05:30
|
|
|
- if params[:to] && params[:from]
|
2016-11-03 12:29:30 +05:30
|
|
|
.compare-switch-container
|
2017-08-17 22:00:37 +05:30
|
|
|
= link_to icon('exchange'), {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has-tooltip btn btn-white', title: 'Switch base of comparison'}
|
2016-11-03 12:29:30 +05:30
|
|
|
.form-group.dropdown.compare-form-group.from.js-compare-from-dropdown
|
2014-09-02 18:07:02 +05:30
|
|
|
.input-group.inline-input-group
|
|
|
|
%span.input-group-addon from
|
2016-11-03 12:29:30 +05:30
|
|
|
= hidden_field_tag :from, params[:from]
|
2017-09-10 17:25:29 +05:30
|
|
|
= button_tag type: 'button', title: params[:from], class: "form-control compare-dropdown-toggle js-compare-dropdown has-tooltip git-revision-dropdown-toggle", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-from-dropdown", selected: params[:from], field_name: :from } do
|
2017-08-17 22:00:37 +05:30
|
|
|
.dropdown-toggle-text.str-truncated= params[:from] || 'Select branch/tag'
|
|
|
|
= render 'shared/ref_dropdown'
|
2016-11-03 12:29:30 +05:30
|
|
|
.compare-ellipsis.inline ...
|
|
|
|
.form-group.dropdown.compare-form-group.to.js-compare-to-dropdown
|
2014-09-02 18:07:02 +05:30
|
|
|
.input-group.inline-input-group
|
|
|
|
%span.input-group-addon to
|
2016-11-03 12:29:30 +05:30
|
|
|
= hidden_field_tag :to, params[:to]
|
2017-09-10 17:25:29 +05:30
|
|
|
= button_tag type: 'button', title: params[:to], class: "form-control compare-dropdown-toggle js-compare-dropdown has-tooltip git-revision-dropdown-toggle", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-to-dropdown", selected: params[:to], field_name: :to } do
|
2017-08-17 22:00:37 +05:30
|
|
|
.dropdown-toggle-text.str-truncated= params[:to] || 'Select branch/tag'
|
|
|
|
= render 'shared/ref_dropdown'
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
= button_tag "Compare", class: "btn btn-create commits-compare-btn"
|
2016-04-02 18:10:28 +05:30
|
|
|
- if @merge_request.present?
|
2017-09-10 17:25:29 +05:30
|
|
|
= link_to "View open merge request", project_merge_request_path(@project, @merge_request), class: 'prepend-left-10 btn'
|
2016-04-02 18:10:28 +05:30
|
|
|
- elsif create_mr_button?
|
2017-08-17 22:00:37 +05:30
|
|
|
= link_to "Create merge request", create_mr_path, class: 'prepend-left-10 btn'
|