% provide(:head_title, t('webhooks.index.title')) %>
<% provide(:container_class, "no-second-nav-container") %>
<%= render partial: "users/settings/sidebar" %>
<%= t('webhooks.index.description') %>
<% @activity_filters.each do |filter| %>
-
<%= filter.name %>
<%= t('webhooks.index.new_webhook') %>
-
<%= form_with model: Webhook.new, url: users_settings_webhooks_path(filter_id: filter.id, sort: @current_sort), class: 'webhook-form' do |f| %>
<%= render partial: 'webhook_form', locals: {f: f} %>
<% end %>
<% filter.webhooks.order(created_at: :desc).each do |webhook| %>
-
<%= t('webhooks.index.webhook_text_html', method: webhook.http_method.upcase, url: webhook.url) %>
<% if webhook.active? %>
<%= t("webhooks.index.active") %>
<% else %>
<%= t("webhooks.index.disabled") %>
<% end %>
<%= form_with model: webhook, url: users_settings_webhook_path(webhook, filter_id: filter.id, sort: @current_sort), class: 'webhook-form', method: :patch do |f| %>
<%= render partial: 'webhook_form', locals: {f: f} %>
<% end %>
<% end %>
<% end %>
<%= render partial: 'delete_filter_modal' %>
<%= javascript_include_tag "users/settings/webhooks/index" %>