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

29 lines
1.1 KiB
Text
Raw Normal View History

.file-holder.file.append-bottom-default
.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
= @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'
.pull-right
.license-selector.js-license-selector.hide
= select_tag :license_type, grouped_options_for_select(licenses_for_select, @project.repository.license_key), include_blank: true, class: 'select2 license-select', data: {placeholder: 'Choose a license template', project: @project.name, fullname: @project.namespace.human_name}
.encoding-selector
= select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2'
2015-01-26 23:57:42 -05:00
.file-content.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