Commit bf908bed authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch...

Merge branch '325367-migrate-to-shared-alert-haml-partial-in-app-views-projects-blob-edit-html-haml' into 'master'

Migrate to shared alert in edit blob

See merge request gitlab-org/gitlab!82367
parents 1fe4c0c6 902651d8
...@@ -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
......
...@@ -25716,6 +25716,9 @@ msgstr "" ...@@ -25716,6 +25716,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 ""
...@@ -34331,6 +34334,9 @@ msgstr "" ...@@ -34331,6 +34334,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 ""
...@@ -44579,9 +44585,6 @@ msgstr "" ...@@ -44579,9 +44585,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