gitlab-org--gitlab-foss/app/views/projects/blob/_editor.html.haml

38 lines
2.0 KiB
Plaintext
Raw Normal View History

.file-holder.file.append-bottom-default
.file-title.clearfix
2015-01-27 04:57:42 +00:00
.editor-ref
= icon('code-fork')
2015-01-27 04:57:42 +00:00
= ref
%span.editor-file-name
2016-07-06 17:51:02 +00:00
- if current_action?(:edit) || current_action?(:update)
2016-07-13 10:19:14 +00:00
= text_field_tag 'file_path', (params[:file_path] || @path),
class: 'form-control new-file-path'
2015-01-27 04:57:42 +00:00
- if current_action?(:new) || current_action?(:create)
%span.editor-file-name
2015-01-27 04:57:42 +00:00
\/
= text_field_tag 'file_name', params[:file_name], placeholder: "File name",
required: true, class: 'form-control new-file-name'
.pull-right
.license-selector.js-license-selector-wrap.hidden
= dropdown_tag("Choose a License template", options: { toggle_class: 'js-license-selector', title: "Choose a license", filter: true, placeholder: "Filter", data: { data: licenses_for_select, project: @project.name, fullname: @project.namespace.human_name } } )
.gitignore-selector.js-gitignore-selector-wrap.hidden
= dropdown_tag("Choose a .gitignore template", options: { toggle_class: 'js-gitignore-selector', title: "Choose a template", filter: true, placeholder: "Filter", data: { data: gitignore_names } } )
2016-06-16 07:06:30 +00:00
.gitlab-ci-yml-selector.js-gitlab-ci-yml-selector-wrap.hidden
= dropdown_tag("Choose a GitLab CI Yaml template", options: { toggle_class: 'js-gitlab-ci-yml-selector', title: "Choose a template", filter: true, placeholder: "Filter", data: { data: gitlab_ci_ymls } } )
= button_tag class: 'soft-wrap-toggle btn', type: 'button' do
= custom_icon('icon_soft_wrap', klass: 'soft-wrap-icon')
= custom_icon('icon_no_wrap', klass: 'no-wrap-icon hidden')
%span Soft wrap
.encoding-selector
= select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2'
2015-01-27 04:57:42 +00:00
2016-07-05 12:52:20 +00:00
.file-editor.code
%pre.js-edit-mode-pane#editor #{params[:content] || local_assigns[:blob_data]}
2015-01-27 04:57:42 +00:00
- if local_assigns[:path]
.js-edit-mode-pane#preview.hide
.center
%h2
%i.icon-spinner.icon-spin