gitlab-org--gitlab-foss/spec/javascripts/fixtures/target_branch_dropdown.html.haml
Jacopo e0fe2834eb New file from interface on existing branch
Now you can create a new file and select a target_branch != source_branch.
If the file that you want to create already exists on the target branch an error message is shown
A glDropdown is used to select and create a new branch instead of a text field.
2017-03-13 16:36:11 +01:00

28 lines
1.4 KiB
Text

%form.js-edit-blob-form
%input{type: 'hidden', name: 'target_branch', value: 'master'}
%div
.dropdown
%button.dropdown-menu-toggle.js-project-branches-dropdown.js-target-branch{type: 'button', data: {toggle: 'dropdown', selected: 'master', field_name: 'target_branch', form_id: '.js-edit-blob-form'}}
.dropdown-menu.dropdown-menu-selectable.dropdown-menu-paging
.dropdown-page-one
.dropdown-title 'Select branch'
.dropdown-input
%input.dropdown-input-field{type: 'search', value: ''}
%i.fa.fa-search.dropdown-input-search
%i.fa.fa-times-dropdown-input-clear.js-dropdown-input-clear{role: 'button'}
.dropdown-content
.dropdown-footer
%ul.dropdown-footer-list
%li
%a.create-new-branch.dropdown-toggle-page{href: "#"}
Create new branch
.dropdown-page-two.dropdown-new-branch
%button.dropdown-title-button.dropdown-menu-back{type: 'button'}
.dropdown_title 'Create new branch'
.dropdown_content
%input#new_branch_name.default-dropdown-input{ type: "text", placeholder: "Name new branch" }
%button.btn.btn-primary.pull-left.js-new-branch-btn{ type: "button" }
Create
%button.btn.btn-default.pull-right.js-cancel-branch-btn{ type: "button" }
Cancel
%button{type: 'submit'}