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

33 lines
1.8 KiB
Text
Raw Normal View History

2020-07-28 23:09:34 +05:30
- breadcrumb_title _("Repository")
- page_title _("Edit"), @blob.path, @ref
2021-06-08 01:23:25 +05:30
- content_for :prefetch_asset_tags do
- webpack_preload_asset_tag('monaco')
2016-09-13 17:45:13 +05:30
2019-12-04 20:38:33 +05:30
- if @conflict
2022-05-07 20:08:51 +05:30
= render 'shared/global_alert',
alert_class: 'gl-mb-5 gl-mt-5',
variant: :danger,
dismissible: false do
- blob_url = project_blob_path(@project, @id)
- external_link_icon = content_tag 'span', { aria: { label: _('Opens new window') }} do
- sprite_icon('external-link', css_class: 'gl-icon').html_safe
- blob_link_start = '<a href="%{url}" class="gl-link" target="_blank" rel="noopener noreferrer">'.html_safe % { url: blob_url }
= _('Someone edited the file the same time you did. Please check out %{link_start}the file %{icon}%{link_end} and make sure your changes will not unintentionally remove theirs.').html_safe % { link_start: blob_link_start, link_end: '</a>'.html_safe , icon: external_link_icon }
2020-11-24 15:15:51 +05:30
2021-02-22 17:27:13 +05:30
%h3.page-title.blob-edit-page-title
Edit file
2019-12-04 20:38:33 +05:30
.file-editor
2021-12-11 22:18:48 +05:30
= gl_tabs_nav({ class: 'js-edit-mode nav-links gl-border-0'}) do
= gl_tab_link_to _('Write'), '#editor', { tab_class: 'active' }
2015-04-26 12:48:37 +05:30
2021-12-11 22:18:48 +05:30
= gl_tab_link_to editing_preview_title(@blob.name), '#preview', { data: { 'preview-url': project_preview_blob_path(@project, @id) } }
2015-04-26 12:48:37 +05:30
2019-12-04 20:38:33 +05:30
= form_tag(project_update_blob_path(@project, @id), method: :put, class: 'js-quick-submit js-requires-input js-edit-blob-form', data: blob_editor_paths(@project)) do
= render 'projects/blob/editor', ref: @ref, path: @path, blob_data: @blob.data
= render 'shared/new_commit_form', placeholder: "Update #{@blob.name}"
= hidden_field_tag 'last_commit_sha', @last_commit_sha
= hidden_field_tag 'content', '', id: "file-content"
= hidden_field_tag 'from_merge_request_iid', params[:from_merge_request_iid]
= render 'projects/commit_button', ref: @ref, cancel_path: project_blob_path(@project, @id)