c456cc718b
* Improve the descriptive text * Rename "from" to "Target" and "to" to "Source" * Swap "Target" and "Source" to have the same order as in MRs * Reworded "Switch base of comparison" to "Swap versions" Signed-off-by: Rémy Coutable <remy@rymai.me>
26 lines
2 KiB
Text
26 lines
2 KiB
Text
= form_tag project_compare_index_path(@project), method: :post, class: 'form-inline js-requires-input' do
|
|
.clearfix
|
|
- if params[:to] && params[:from]
|
|
.compare-switch-container
|
|
= link_to icon('exchange'), { from: params[:to], to: params[:from] }, class: 'commits-compare-switch has-tooltip btn btn-white', title: 'Swap revisions'
|
|
.form-group.dropdown.compare-form-group.to.js-compare-to-dropdown
|
|
.input-group.inline-input-group
|
|
%span.input-group-addon Source
|
|
= hidden_field_tag :to, params[:to]
|
|
= 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
|
|
.dropdown-toggle-text.str-truncated= params[:to] || 'Select branch/tag'
|
|
= 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-addon Target
|
|
= hidden_field_tag :from, params[:from]
|
|
= 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
|
|
.dropdown-toggle-text.str-truncated= params[:from] || 'Select branch/tag'
|
|
= render 'shared/ref_dropdown'
|
|
|
|
= button_tag "Compare", class: "btn btn-create commits-compare-btn"
|
|
- if @merge_request.present?
|
|
= link_to "View open merge request", project_merge_request_path(@project, @merge_request), class: 'prepend-left-10 btn'
|
|
- elsif create_mr_button?
|
|
= link_to "Create merge request", create_mr_path, class: 'prepend-left-10 btn'
|