2015-06-26 21:53:17 -04:00
|
|
|
= form_tag namespace_project_compare_index_path(@project.namespace, @project), method: :post, class: 'form-inline js-requires-input' do
|
2015-09-07 05:44:00 -04:00
|
|
|
.clearfix
|
2013-12-31 10:08:31 -05:00
|
|
|
- if params[:to] && params[:from]
|
2016-03-20 15:01:46 -04:00
|
|
|
= link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has-tooltip', title: 'Switch base of comparison'}
|
2013-12-31 10:08:31 -05:00
|
|
|
.form-group
|
|
|
|
.input-group.inline-input-group
|
|
|
|
%span.input-group-addon from
|
2015-06-26 21:53:17 -04:00
|
|
|
= text_field_tag :from, params[:from], class: "form-control", required: true
|
2013-12-31 10:08:31 -05:00
|
|
|
= "..."
|
|
|
|
.form-group
|
|
|
|
.input-group.inline-input-group
|
|
|
|
%span.input-group-addon to
|
2015-06-26 21:53:17 -04:00
|
|
|
= text_field_tag :to, params[:to], class: "form-control", required: true
|
2013-12-31 10:08:31 -05:00
|
|
|
|
2014-09-26 10:57:36 -04:00
|
|
|
= button_tag "Compare", class: "btn btn-create commits-compare-btn"
|
2016-02-01 18:43:51 -05:00
|
|
|
- if @merge_request.present?
|
2016-02-10 07:47:59 -05:00
|
|
|
= link_to "View Open Merge Request", namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'prepend-left-10 btn'
|
2016-02-01 18:43:51 -05:00
|
|
|
- elsif create_mr_button?
|
2015-05-09 16:26:25 -04:00
|
|
|
= link_to create_mr_path, class: 'prepend-left-10 btn' do
|
|
|
|
= icon("plus")
|
|
|
|
Create Merge Request
|
2012-12-20 08:39:39 -05:00
|
|
|
|
2012-09-25 23:13:19 -04:00
|
|
|
:javascript
|
2013-06-21 15:08:16 -04:00
|
|
|
var availableTags = #{@project.repository.ref_names.to_json};
|
2012-09-25 23:13:19 -04:00
|
|
|
|
2013-06-21 15:08:16 -04:00
|
|
|
$("#from, #to").autocomplete({
|
|
|
|
source: availableTags,
|
|
|
|
minLength: 1
|
2012-09-25 23:13:19 -04:00
|
|
|
});
|