0ab6ca93aa
Change "+" icon under "Files" section to have three options: * Create file * Upload file * New directory Upload file is no longer accessible from the "Create file" page. Users can now select a target branch in upload file as well. Closes #2799: Fixes a bug where file modes were overwritten after a commit Closes https://github.com/gitlabhq/gitlabhq/issues/8253: Existing files can no longer be overwritten in the "Create file" section. Closes #2557
25 lines
1.3 KiB
Text
25 lines
1.3 KiB
Text
#modal-create-new-dir.modal
|
||
.modal-dialog
|
||
.modal-content
|
||
.modal-header
|
||
%a.close{href: "#", "data-dismiss" => "modal"} ×
|
||
%h3.page-title Create New Directory
|
||
.modal-body
|
||
= form_tag namespace_project_create_dir_path(@project.namespace, @project, @id), method: :post, remote: false, id: 'dir-create-form', class: 'form-horizontal' do
|
||
.form-group
|
||
= label_tag :dir_name, 'Directory Name', class: 'control-label'
|
||
.col-sm-10
|
||
= text_field_tag :dir_name, params[:dir_name], placeholder: "Directory name", required: true, class: 'form-control'
|
||
= render 'shared/commit_message_container', params: params, placeholder: ''
|
||
- unless @project.empty_repo?
|
||
.form-group
|
||
= label_tag :branch_name, 'Branch', class: 'control-label'
|
||
.col-sm-10
|
||
= text_field_tag 'new_branch', @ref, class: "form-control"
|
||
.form-group
|
||
.col-sm-offset-2.col-sm-10
|
||
= submit_tag "Create directory", class: 'btn btn-primary btn-create'
|
||
= link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal"
|
||
|
||
:coffeescript
|
||
disableButtonIfAnyEmptyField($("#dir-create-form"), ".form-control", ".btn-create");
|