2015-09-11 14:41:01 +05:30
|
|
|
= form_tag namespace_project_compare_index_path(@project.namespace, @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]
|
|
|
|
= link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'}
|
|
|
|
.form-group
|
|
|
|
.input-group.inline-input-group
|
|
|
|
%span.input-group-addon from
|
2015-09-11 14:41:01 +05:30
|
|
|
= text_field_tag :from, params[:from], class: "form-control", required: true
|
2014-09-02 18:07:02 +05:30
|
|
|
= "..."
|
|
|
|
.form-group
|
|
|
|
.input-group.inline-input-group
|
|
|
|
%span.input-group-addon to
|
2015-09-11 14:41:01 +05:30
|
|
|
= text_field_tag :to, params[:to], class: "form-control", required: true
|
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"
|
2015-09-11 14:41:01 +05:30
|
|
|
- if create_mr_button?
|
|
|
|
= link_to create_mr_path, class: 'prepend-left-10 btn' do
|
|
|
|
= icon("plus")
|
|
|
|
Create Merge Request
|
2014-09-02 18:07:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
:javascript
|
|
|
|
var availableTags = #{@project.repository.ref_names.to_json};
|
|
|
|
|
|
|
|
$("#from, #to").autocomplete({
|
|
|
|
source: availableTags,
|
|
|
|
minLength: 1
|
|
|
|
});
|