Welcome to mirror list, hosted at ThFree Co, Russian Federation.

edit.html.haml « blob « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1f61a0b940c84b940e1517111b65e67180c8d889 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.file-editor
  %ul.nav.nav-tabs.js-edit-mode
    %li.active
      = link_to '#editor' do
        %i.fa.fa-edit
        Edit file

    %li
      = link_to '#preview', 'data-preview-url' => namespace_project_preview_blob_path(@project.namespace, @project, @id) do
        %i.fa.fa-eye
        = editing_preview_title(@blob.name)

  = form_tag(namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put, class: "form-horizontal") do
    = render 'projects/blob/editor', ref: @ref, path: @path, blob_data: @blob.data
    = render 'shared/commit_message_container', params: params,
             placeholder: "Update #{@blob.name}"

    .form-group.branch
      = label_tag 'branch', class: 'control-label' do
        Branch
      .col-sm-10
        = text_field_tag 'new_branch', @ref, class: "form-control"

    = hidden_field_tag 'last_commit', @last_commit
    = hidden_field_tag 'content', '', id: "file-content"
    = hidden_field_tag 'from_merge_request_id', params[:from_merge_request_id]
    = render 'projects/commit_button', ref: @ref,
              cancel_path: @after_edit_path

:javascript
  blob = new EditBlob(gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}", "#{@blob.language.try(:ace_mode)}")