_editor.html.haml 1.09 KB
Newer Older
1 2
.file-holder.file.append-bottom-default
  .file-title.clearfix
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
3
    .editor-ref
4
      = icon('code-fork')
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
5 6
      = ref
    %span.editor-file-name
7
      = @path
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
8

9 10
    - if current_action?(:new) || current_action?(:create)
      %span.editor-file-name
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
11
        \/
12
      = text_field_tag 'file_name', params[:file_name], placeholder: "File name",
13
        required: true, class: 'form-control new-file-name'
14 15

    .pull-right
16
      .license-selector.js-license-selector.hide
17
        = 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}
18 19 20

      .encoding-selector
        = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2'
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
21 22

  .file-content.code
23
    %pre.js-edit-mode-pane#editor #{params[:content] || local_assigns[:blob_data]}
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
24 25 26 27 28
    - if local_assigns[:path]
      .js-edit-mode-pane#preview.hide
        .center
          %h2
            %i.icon-spinner.icon-spin