2015-09-17 01:45:22 -04:00
|
|
|
|
#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
|
2015-12-02 08:39:39 -05:00
|
|
|
|
= form_tag namespace_project_create_dir_path(@project.namespace, @project, @id), method: :post, remote: false, class: 'form-horizontal js-create-dir-form js-requires-input' do
|
2015-09-17 01:45:22 -04:00
|
|
|
|
.form-group
|
2015-12-02 08:30:12 -05:00
|
|
|
|
= label_tag :dir_name, 'Directory name', class: 'control-label'
|
2015-09-17 01:45:22 -04:00
|
|
|
|
.col-sm-10
|
2015-12-02 08:36:44 -05:00
|
|
|
|
= text_field_tag :dir_name, params[:dir_name], required: true, class: 'form-control'
|
2015-11-17 12:53:56 -05:00
|
|
|
|
|
|
|
|
|
= render 'shared/new_commit_form', placeholder: "Add new directory"
|
|
|
|
|
|
2015-12-02 08:34:20 -05:00
|
|
|
|
.form-actions
|
|
|
|
|
= submit_tag "Create directory", class: 'btn btn-create'
|
|
|
|
|
= link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal"
|
2015-09-17 01:45:22 -04:00
|
|
|
|
|
2015-12-18 04:03:34 -05:00
|
|
|
|
- unless can?(current_user, :push_code, @project)
|
|
|
|
|
.inline.prepend-left-10
|
|
|
|
|
= commit_in_fork_help
|
|
|
|
|
|
2015-11-10 06:17:37 -05:00
|
|
|
|
:javascript
|
2015-11-17 12:53:56 -05:00
|
|
|
|
new NewCommitForm($('.js-create-dir-form'))
|