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

29 lines
2 KiB
Text
Raw Normal View History

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]
2016-11-03 12:29:30 +05:30
.compare-switch-container
= link_to icon('exchange'), {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has-tooltip', title: 'Switch base of comparison'}
.form-group.dropdown.compare-form-group.from.js-compare-from-dropdown
2014-09-02 18:07:02 +05:30
.input-group.inline-input-group
%span.input-group-addon from
2016-11-03 12:29:30 +05:30
= hidden_field_tag :from, params[:from]
= button_tag type: 'button', class: "form-control compare-dropdown-toggle js-compare-dropdown", required: true, data: { refs_url: refs_namespace_project_path(@project.namespace, @project), toggle: "dropdown", target: ".js-compare-from-dropdown", selected: params[:from], field_name: :from } do
.dropdown-toggle-text= params[:from] || 'Select branch/tag'
2016-08-24 12:49:21 +05:30
= render "ref_dropdown"
2016-11-03 12:29:30 +05:30
.compare-ellipsis.inline ...
.form-group.dropdown.compare-form-group.to.js-compare-to-dropdown
2014-09-02 18:07:02 +05:30
.input-group.inline-input-group
%span.input-group-addon to
2016-11-03 12:29:30 +05:30
= hidden_field_tag :to, params[:to]
= button_tag type: 'button', class: "form-control compare-dropdown-toggle js-compare-dropdown", required: true, data: { refs_url: refs_namespace_project_path(@project.namespace, @project), toggle: "dropdown", target: ".js-compare-to-dropdown", selected: params[:to], field_name: :to } do
.dropdown-toggle-text= params[:to] || 'Select branch/tag'
2016-08-24 12:49:21 +05:30
= render "ref_dropdown"
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"
2016-04-02 18:10:28 +05:30
- if @merge_request.present?
= link_to "View Open Merge Request", namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'prepend-left-10 btn'
- elsif create_mr_button?
2015-09-11 14:41:01 +05:30
= link_to create_mr_path, class: 'prepend-left-10 btn' do
= icon("plus")
Create Merge Request