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

43 lines
2.3 KiB
Text
Raw Normal View History

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