2018-10-15 14:42:47 +05:30
|
|
|
= form_tag project_compare_index_path(@project), method: :post, class: 'form-inline js-requires-input js-signature-container', data: { 'signatures-path' => signatures_namespace_project_compare_index_path } do
|
2018-11-08 19:23:39 +05:30
|
|
|
- if params[:to] && params[:from]
|
|
|
|
.compare-switch-container
|
2020-07-28 23:09:34 +05:30
|
|
|
= link_to sprite_icon('substitute'), { from: params[:to], to: params[:from] }, class: 'commits-compare-switch has-tooltip btn btn-white', title: 'Swap revisions'
|
2018-11-08 19:23:39 +05:30
|
|
|
.form-group.dropdown.compare-form-group.to.js-compare-to-dropdown
|
|
|
|
.input-group.inline-input-group
|
|
|
|
%span.input-group-prepend
|
|
|
|
.input-group-text
|
2018-03-17 18:26:18 +05:30
|
|
|
= s_("CompareBranches|Source")
|
2018-11-08 19:23:39 +05:30
|
|
|
= hidden_field_tag :to, params[:to]
|
2019-12-26 22:10:19 +05:30
|
|
|
= button_tag type: 'button', title: params[:to], class: "btn form-control compare-dropdown-toggle js-compare-dropdown has-tooltip", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-to-dropdown", selected: params[:to], field_name: :to } do
|
|
|
|
.dropdown-toggle-text.str-truncated.monospace.float-left= params[:to] || _("Select branch/tag")
|
2020-10-24 23:57:45 +05:30
|
|
|
= sprite_icon('chevron-down', css_class: 'float-right')
|
2018-11-08 19:23:39 +05:30
|
|
|
= render 'shared/ref_dropdown'
|
|
|
|
.compare-ellipsis.inline ...
|
|
|
|
.form-group.dropdown.compare-form-group.from.js-compare-from-dropdown
|
|
|
|
.input-group.inline-input-group
|
|
|
|
%span.input-group-prepend
|
|
|
|
.input-group-text
|
2018-03-17 18:26:18 +05:30
|
|
|
= s_("CompareBranches|Target")
|
2018-11-08 19:23:39 +05:30
|
|
|
= hidden_field_tag :from, params[:from]
|
2019-12-26 22:10:19 +05:30
|
|
|
= button_tag type: 'button', title: params[:from], class: "btn form-control compare-dropdown-toggle js-compare-dropdown has-tooltip", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-from-dropdown", selected: params[:from], field_name: :from } do
|
|
|
|
.dropdown-toggle-text.str-truncated.monospace.float-left= params[:from] || _("Select branch/tag")
|
2020-10-24 23:57:45 +05:30
|
|
|
= sprite_icon('chevron-down', css_class: 'float-right')
|
2018-11-08 19:23:39 +05:30
|
|
|
= render 'shared/ref_dropdown'
|
|
|
|
|
2018-12-05 23:21:45 +05:30
|
|
|
= button_tag s_("CompareBranches|Compare"), class: "btn btn-success commits-compare-btn"
|
2018-11-08 19:23:39 +05:30
|
|
|
- if @merge_request.present?
|
2020-07-28 23:09:34 +05:30
|
|
|
= link_to _("View open merge request"), project_merge_request_path(@project, @merge_request), class: 'gl-ml-3 btn'
|
2018-11-08 19:23:39 +05:30
|
|
|
- elsif create_mr_button?
|
2020-07-28 23:09:34 +05:30
|
|
|
= link_to _("Create merge request"), create_mr_path, class: 'gl-ml-3 btn'
|