diff options
Diffstat (limited to 'app/views')
5 files changed, 6 insertions, 30 deletions
diff --git a/app/views/admin/application_settings/service_usage_data.html.haml b/app/views/admin/application_settings/service_usage_data.html.haml index d9fbc75e58f..ec084c05cf7 100644 --- a/app/views/admin/application_settings/service_usage_data.html.haml +++ b/app/views/admin/application_settings/service_usage_data.html.haml @@ -16,10 +16,9 @@ .js-text.d-inline= _('Download payload') %pre.js-syntax-highlight.code.highlight.gl-mt-2.gl-display-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } } - else - = render 'shared/global_alert', - variant: :warning, + = render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, - title: 'Service Ping payload not found in the application cache' do + title: _('Service Ping payload not found in the application cache')) do .gl-alert-body - enable_service_ping_link_url = help_page_path('user/admin_area/settings/usage_statistics', anchor: 'enable-or-disable-usage-statistics') diff --git a/app/views/clusters/clusters/_deprecation_alert.html.haml b/app/views/clusters/clusters/_deprecation_alert.html.haml index 6ef39766906..202e2c14d3f 100644 --- a/app/views/clusters/clusters/_deprecation_alert.html.haml +++ b/app/views/clusters/clusters/_deprecation_alert.html.haml @@ -1,4 +1,4 @@ -= render 'shared/global_alert', variant: :warning, dismissible: false, alert_class: 'gl-mt-6 gl-mb-3' do += render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, alert_class: 'gl-mt-6 gl-mb-3') do .gl-alert-body - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe - issue_link_start = link_start % { url: 'https://gitlab.com/gitlab-org/configure/general/-/issues/199' } diff --git a/app/views/groups/_import_group_from_file_panel.html.haml b/app/views/groups/_import_group_from_file_panel.html.haml index 9d7a326d74a..ddd7481e0bd 100644 --- a/app/views/groups/_import_group_from_file_panel.html.haml +++ b/app/views/groups/_import_group_from_file_panel.html.haml @@ -6,9 +6,8 @@ .gl-border-l-solid.gl-border-r-solid.gl-border-gray-100.gl-border-1.gl-p-5 %h4 = _('Import group from file') - = render 'shared/global_alert', - variant: :warning, - dismissible: false do + = render Pajamas::AlertComponent.new(variant: :warning, + dismissible: false) do .gl-alert-body - docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/group/import/index.md') } - link_end = '</a>'.html_safe diff --git a/app/views/profiles/notifications/show.html.haml b/app/views/profiles/notifications/show.html.haml index e958168bb8e..5d74bbe9971 100644 --- a/app/views/profiles/notifications/show.html.haml +++ b/app/views/profiles/notifications/show.html.haml @@ -3,8 +3,7 @@ %div - if @user.errors.any? - = render 'shared/global_alert', - variant: :danger do + = render Pajamas::AlertComponent.new(variant: :danger) do .gl-alert-body %ul - @user.errors.full_messages.each do |msg| diff --git a/app/views/shared/_global_alert.html.haml b/app/views/shared/_global_alert.html.haml deleted file mode 100644 index cb7ad32e474..00000000000 --- a/app/views/shared/_global_alert.html.haml +++ /dev/null @@ -1,21 +0,0 @@ -- icons = { info: 'information-o', warning: 'warning', success: 'check-circle', danger: 'error', tip: 'bulb' } - -- title = local_assigns.fetch(:title, nil) -- variant = local_assigns.fetch(:variant, :info) -- dismissible = local_assigns.fetch(:dismissible, true) -- alert_class = local_assigns.fetch(:alert_class, nil) -- alert_data = local_assigns.fetch(:alert_data, nil) -- close_button_class = local_assigns.fetch(:close_button_class, nil) -- close_button_data = local_assigns.fetch(:close_button_data, nil) -- icon = icons[variant] - -%div{ role: 'alert', class: ['gl-alert', "gl-alert-#{variant}", alert_class], data: alert_data } - = sprite_icon(icon, css_class: "gl-alert-icon#{' gl-alert-icon-no-title' if title.nil?}") - - if dismissible - %button.btn.gl-dismiss-btn.btn-default.btn-sm.gl-button.btn-default-tertiary.btn-icon.js-close{ type: 'button', aria: { label: _('Dismiss') }, class: close_button_class, data: close_button_data } - = sprite_icon('close') - .gl-alert-content{ role: 'alert' } - - if title - %h4.gl-alert-title - = title - = yield |