debian-mirror-gitlab/app/views/projects/compare/_form.html.haml

29 lines
2.1 KiB
Text
Raw Normal View History

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
2018-03-17 18:26:18 +05:30
= link_to icon('exchange'), { from: params[:to], to: params[:from] }, class: 'commits-compare-switch has-tooltip btn btn-white', title: 'Swap revisions'
2016-11-03 12:29:30 +05:30
.form-group.dropdown.compare-form-group.to.js-compare-to-dropdown
2014-09-02 18:07:02 +05:30
.input-group.inline-input-group
2018-03-17 18:26:18 +05:30
%span.input-group-addon
= s_("CompareBranches|Source")
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
2018-03-17 18:26:18 +05:30
.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
= s_("CompareBranches|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")
2017-08-17 22:00:37 +05:30
= render 'shared/ref_dropdown'
2014-09-02 18:07:02 +05:30
 
2018-03-17 18:26:18 +05:30
= button_tag s_("CompareBranches|Compare"), class: "btn btn-create commits-compare-btn"
2016-04-02 18:10:28 +05:30
- if @merge_request.present?
2018-03-17 18:26:18 +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?
2018-03-17 18:26:18 +05:30
= link_to _("Create merge request"), create_mr_path, class: 'prepend-left-10 btn'