debian-mirror-gitlab/app/views/projects/blob/_editor.html.haml

37 lines
1.5 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
- action = current_action?(:edit) || current_action?(:update) ? 'edit' : 'create'
2018-03-17 18:26:18 +05:30
.file-holder-bottom-radius.file-holder.file.append-bottom-default
2017-08-17 22:00:37 +05:30
.js-file-title.file-title.clearfix{ data: { current_action: action } }
2018-11-20 20:47:30 +05:30
.editor-ref.block-truncated
2018-03-17 18:26:18 +05:30
= sprite_icon('fork', size: 12)
2015-04-26 12:48:37 +05:30
= ref
2018-11-20 20:47:30 +05:30
- if current_action?(:edit) || current_action?(:update)
2018-12-23 12:14:25 +05:30
%span.pull-left.append-right-10
2016-08-24 12:49:21 +05:30
= text_field_tag 'file_path', (params[:file_path] || @path),
2017-08-17 22:00:37 +05:30
class: 'form-control new-file-path js-file-path-name-input'
2015-04-26 12:48:37 +05:30
2015-12-23 02:04:40 +05:30
- if current_action?(:new) || current_action?(:create)
2018-12-23 12:14:25 +05:30
%span.pull-left.append-right-10
2015-04-26 12:48:37 +05:30
\/
2015-12-23 02:04:40 +05:30
= text_field_tag 'file_name', params[:file_name], placeholder: "File name",
2017-08-17 22:00:37 +05:30
required: true, class: 'form-control new-file-name js-file-path-name-input'
2015-12-23 02:04:40 +05:30
2018-11-20 20:47:30 +05:30
.file-buttons
2017-08-17 22:00:37 +05:30
= button_tag class: 'soft-wrap-toggle btn', type: 'button', tabindex: '-1' do
2016-11-03 12:29:30 +05:30
%span.no-wrap
= custom_icon('icon_no_wrap')
No wrap
%span.soft-wrap
= custom_icon('icon_soft_wrap')
Soft wrap
2016-06-02 11:05:42 +05:30
.encoding-selector
2017-08-17 22:00:37 +05:30
= select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2', tabindex: '-1'
2015-04-26 12:48:37 +05:30
2016-09-29 09:46:39 +05:30
.file-editor.code
2017-08-17 22:00:37 +05:30
%pre.js-edit-mode-pane#editor= params[:content] || local_assigns[:blob_data]
2015-04-26 12:48:37 +05:30
- if local_assigns[:path]
.js-edit-mode-pane#preview.hide
.center
%h2
%i.icon-spinner.icon-spin