Commit 902651d8 authored by Florie Guibert's avatar Florie Guibert

Migrate to shared alert in edit blob

No visual changes
parent d7793c0e
...@@ -4,14 +4,16 @@ ...@@ -4,14 +4,16 @@
- webpack_preload_asset_tag('monaco') - webpack_preload_asset_tag('monaco')
- if @conflict - if @conflict
.gl-alert.gl-alert-danger.gl-mb-5.gl-mt-5 = render 'shared/global_alert',
.gl-alert-container alert_class: 'gl-mb-5 gl-mt-5',
= sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') variant: :danger,
.gl-alert-content dismissible: false do
.gl-alert-body - blob_url = project_blob_path(@project, @id)
Someone edited the file the same time you did. Please check out - external_link_icon = content_tag 'span', { aria: { label: _('Opens new window') }} do
= link_to _('the file'), project_blob_path(@project, tree_join(@branch_name, @file_path)), target: "_blank", rel: 'noopener noreferrer', class: 'gl-link' - sprite_icon('external-link', css_class: 'gl-icon').html_safe
and make sure your changes will not unintentionally remove theirs. - 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 }
%h3.page-title.blob-edit-page-title %h3.page-title.blob-edit-page-title
Edit file Edit file
......
...@@ -25713,6 +25713,9 @@ msgstr "" ...@@ -25713,6 +25713,9 @@ msgstr ""
msgid "Opens in a new window" msgid "Opens in a new window"
msgstr "" msgstr ""
msgid "Opens new window"
msgstr ""
msgid "Operation failed. Check pod logs for %{pod_name} for more details." msgid "Operation failed. Check pod logs for %{pod_name} for more details."
msgstr "" msgstr ""
...@@ -34322,6 +34325,9 @@ msgstr "" ...@@ -34322,6 +34325,9 @@ msgstr ""
msgid "Some common domains are not allowed. %{learn_more_link}." msgid "Some common domains are not allowed. %{learn_more_link}."
msgstr "" msgstr ""
msgid "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."
msgstr ""
msgid "Someone edited the issue at the same time you did. Please check out %{linkStart}the issue%{linkEnd} and make sure your changes will not unintentionally remove theirs." msgid "Someone edited the issue at the same time you did. Please check out %{linkStart}the issue%{linkEnd} and make sure your changes will not unintentionally remove theirs."
msgstr "" msgstr ""
...@@ -44573,9 +44579,6 @@ msgstr "" ...@@ -44573,9 +44579,6 @@ msgstr ""
msgid "the correct format." msgid "the correct format."
msgstr "" msgstr ""
msgid "the file"
msgstr ""
msgid "the following epic(s)" msgid "the following epic(s)"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment