diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-27 21:10:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-27 21:10:39 +0300 |
commit | 9beaa6816987274f2b870146ac649c970d69da24 (patch) | |
tree | 17af5519819903593a71b1eae47cbc0999f9a1c7 /app/views | |
parent | 524a21e75209d2501b23b648daf753e3a4bebe56 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/_snowplow.html.haml | 3 | ||||
-rw-r--r-- | app/views/shared/web_hooks/_hook.html.haml | 10 | ||||
-rw-r--r-- | app/views/shared/web_hooks/_test_button.html.haml | 14 |
3 files changed, 11 insertions, 16 deletions
diff --git a/app/views/layouts/_snowplow.html.haml b/app/views/layouts/_snowplow.html.haml index 0b5c4730b64..5db7f22e36b 100644 --- a/app/views/layouts/_snowplow.html.haml +++ b/app/views/layouts/_snowplow.html.haml @@ -15,6 +15,7 @@ gl.snowplowStandardContext = #{Gitlab::Tracking::StandardContext.new( namespace: namespace, project: @project, - user: current_user + user: current_user, + new_nav: show_super_sidebar? ).to_context.to_json.to_json} gl.snowplowPseudonymizedPageUrl = #{masked_page_url(group: namespace, project: @project).to_json}; diff --git a/app/views/shared/web_hooks/_hook.html.haml b/app/views/shared/web_hooks/_hook.html.haml index c19b518acd6..155a7b1827f 100644 --- a/app/views/shared/web_hooks/_hook.html.haml +++ b/app/views/shared/web_hooks/_hook.html.haml @@ -19,7 +19,9 @@ = gl_badge_tag(integration_webhook_event_human_name(trigger), size: :sm) = gl_badge_tag(sslBadgeText, size: :sm) - .col-md-4.col-lg-5.text-right-md.gl-mt-2 - %span>= render 'shared/web_hooks/test_button', hook: hook, button_class: 'btn-sm btn-default gl-mr-3' - %span>= link_to _('Edit'), edit_hook_path(hook), class: 'btn gl-button btn-default btn-sm gl-mr-3' - = link_to _('Delete'), destroy_hook_path(hook), aria: { label: s_('Webhooks|Delete webhook') }, data: { confirm_btn_variant: "danger", confirm: s_('Webhooks|Are you sure you want to delete this webhook?') }, method: :delete, class: 'btn gl-button btn-secondary btn-danger-secondary btn-sm' + .col-md-4.col-lg-5.gl-mt-2.gl-display-flex.gl-md-justify-content-end.gl-align-items-baseline.gl-gap-3 + = render 'shared/web_hooks/test_button', hook: hook, size: 'small' + = render Pajamas::ButtonComponent.new(href: edit_hook_path(hook), size: :small) do + = _('Edit') + = render Pajamas::ButtonComponent.new(href: destroy_hook_path(hook), category: :secondary, variant: :danger, size: :small, method: :delete, button_options: { 'aria-label' => s_('Webhooks|Delete webhook'), data: { confirm_btn_variant: "danger", confirm: s_('Webhooks|Are you sure you want to delete this webhook?') } }) do + = _('Delete') diff --git a/app/views/shared/web_hooks/_test_button.html.haml b/app/views/shared/web_hooks/_test_button.html.haml index 7a78a32fe87..dbd26e5bd07 100644 --- a/app/views/shared/web_hooks/_test_button.html.haml +++ b/app/views/shared/web_hooks/_test_button.html.haml @@ -1,13 +1,5 @@ -- button_class = local_assigns.fetch(:button_class, '') - hook = local_assigns.fetch(:hook) -- triggers = hook.class.triggers +- size = local_assigns.fetch(:size, 'medium') +- triggers = hook.class.triggers.each_value -.hook-test-button.dropdown.gl-dropdown.inline> - %button.btn.gl-button{ 'data-toggle' => 'dropdown', class: button_class } - = _('Test') - = sprite_icon('chevron-down') - %ul.dropdown-menu.dropdown-menu-right{ role: 'menu' } - .gl-dropdown-inner - - triggers.each_value do |event| - %li.gl-dropdown-item - = link_to_test_hook(hook, event) +.js-webhook-test-dropdown{ data: { items: webhook_test_items(hook, triggers).to_json, size: size } } |