Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-16 12:08:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-16 12:08:10 +0300
commit13867d66e92c2fd8962a126db4fbdc32891343c9 (patch)
tree580a1baf1cdd3283ede126ee510ecf1d3562a471 /app/views/projects
parent83758a4e5fcfec056b36a4b56fb22c8a915753cc (diff)
Add latest changes from gitlab-org/gitlab@masterogolowinski-master-patch-27476
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/hooks/_index.html.haml17
-rw-r--r--app/views/projects/hooks/edit.html.haml16
-rw-r--r--app/views/projects/settings/integrations/_project_hook.html.haml16
3 files changed, 9 insertions, 40 deletions
diff --git a/app/views/projects/hooks/_index.html.haml b/app/views/projects/hooks/_index.html.haml
index 0ab7863b77c..70f2fa0e758 100644
--- a/app/views/projects/hooks/_index.html.haml
+++ b/app/views/projects/hooks/_index.html.haml
@@ -1,23 +1,10 @@
.row.prepend-top-default
.col-lg-4
- %h4.prepend-top-0
- = page_title
- %p
- #{link_to 'Webhooks', help_page_path('user/project/integrations/webhooks')} can be
- used for binding events when something is happening within the project.
+ = render 'shared/web_hooks/title_and_docs', hook: @hook
.col-lg-8.append-bottom-default
= form_for @hook, as: :hook, url: polymorphic_path([@project.namespace.becomes(Namespace), @project, :hooks]) do |f|
= render partial: 'shared/web_hooks/form', locals: { form: f, hook: @hook }
= f.submit 'Add webhook', class: 'btn btn-success'
- %hr
- %h5.prepend-top-default
- Webhooks (#{@hooks.count})
- - if @hooks.any?
- %ul.content-list
- - @hooks.each do |hook|
- = render 'project_hook', hook: hook
- - else
- %p.settings-message.text-center.append-bottom-0
- No webhooks found, add one in the form above.
+ = render 'shared/web_hooks/index', hooks: @hooks, hook_class: @hook.class
diff --git a/app/views/projects/hooks/edit.html.haml b/app/views/projects/hooks/edit.html.haml
index 57311284e11..c1fdf619eb5 100644
--- a/app/views/projects/hooks/edit.html.haml
+++ b/app/views/projects/hooks/edit.html.haml
@@ -1,19 +1,17 @@
-- page_title 'Integrations'
+- add_to_breadcrumbs _('ProjectService|Integrations'), namespace_project_settings_integrations_path
+- page_title _('Edit Project Hook')
.row.prepend-top-default
.col-lg-3
- %h4.prepend-top-0
- = page_title
- %p
- #{link_to 'Webhooks', help_page_path('user/project/integrations/webhooks')} can be
- used for binding events when something is happening within the project.
+ = render 'shared/web_hooks/title_and_docs', hook: @hook
+
.col-lg-9.append-bottom-default
= form_for [@project.namespace.becomes(Namespace), @project, @hook], as: :hook, url: project_hook_path(@project, @hook) do |f|
= render partial: 'shared/web_hooks/form', locals: { form: f, hook: @hook }
- = f.submit 'Save changes', class: 'btn btn-success'
- = render 'shared/web_hooks/test_button', triggers: ProjectHook.triggers, hook: @hook
- = link_to 'Remove', project_hook_path(@project, @hook), method: :delete, class: 'btn btn-remove float-right', data: { confirm: 'Are you sure?' }
+ %span>= f.submit 'Save changes', class: 'btn btn-success append-right-8'
+ = render 'shared/web_hooks/test_button', hook: @hook
+ = link_to _('Delete'), project_hook_path(@project, @hook), method: :delete, class: 'btn btn-remove float-right', data: { confirm: _('Are you sure?') }
%hr
diff --git a/app/views/projects/settings/integrations/_project_hook.html.haml b/app/views/projects/settings/integrations/_project_hook.html.haml
deleted file mode 100644
index ef445f2e139..00000000000
--- a/app/views/projects/settings/integrations/_project_hook.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-%li
- .row
- .col-md-8.col-lg-7
- %strong.light-header= hook.url
- %div
- - ProjectHook.triggers.each_value do |event|
- - if hook.public_send(event)
- %span.badge.badge-gray.deploy-project-label= event.to_s.titleize
- .col-md-4.col-lg-5.text-right-lg.prepend-top-5
- %span.append-right-10.inline
- #{_("SSL Verification")}: #{hook.enable_ssl_verification ? _('enabled') : _('disabled')}
- = link_to _('Edit'), edit_project_hook_path(@project, hook), class: 'btn btn-sm'
- = render 'shared/web_hooks/test_button', triggers: ProjectHook.triggers, hook: hook, button_class: 'btn-sm'
- = link_to project_hook_path(@project, hook), data: { confirm: _('Are you sure?') }, method: :delete, class: 'btn btn-transparent' do
- %span.sr-only= _("Remove")
- = icon('trash')