<%= render 'account/shared/page' do |p| %> <% p.content_for :title, t('.section') %> <% p.content_for :body do %> <%= render 'account/shared/box', divider: true do |p| %> <% p.content_for :title, t('.header') %> <% p.content_for :description do %> <%= t('.description') %> <%= t('.manage_description') if can? :manage, @endpoint %> <% end %> <% p.content_for :body do %> <% with_attribute_settings object: @endpoint, strategy: :label do %> <%= render 'shared/attributes/text', attribute: :name %> <%= render 'shared/attributes/code', attribute: :url %> <% # TODO We should make the `has_many` attribute partial configurable enough to handle this use case. %> <%= render 'shared/attributes/attribute', attribute: :event_types do %> <% if @endpoint.event_type_ids.any? %> <% @endpoint.event_types.map do |event_type| %> <% capture do %> <%= event_type.name %> <% end %> <% end.map(&:strip).to_sentence.html_safe %> <% else %> <% # TODO It feels like a Nice Partials bug that we can't just do `t('.fields.event_types.all')` here. %> <%= t('webhooks/outgoing/endpoints.fields.event_types.all') %> <% end %> <% end %> <%= render 'shared/attributes/belongs_to', attribute: :scaffolding_absolutely_abstract_creative_concept %> <%# 🚅 super scaffolding will insert new fields above this line. %> <% end %> <% end %> <% p.content_for :actions do %> <%= link_to t('.buttons.edit'), [:edit, :account, @endpoint], class: first_button_primary if can? :edit, @endpoint %> <%= button_to t('.buttons.destroy'), [:account, @endpoint], method: :delete, class: first_button_primary, data: { confirm: t('.buttons.confirmations.destroy', model_locales(@endpoint)) } if can? :destroy, @endpoint %> <%= link_to t('global.buttons.back'), [:account, @parent, :webhooks_outgoing_endpoints], class: first_button_primary %> <% end %> <% end %> <%= render 'account/webhooks/outgoing/deliveries/index', deliveries: @endpoint.deliveries, hide_back: true %> <%# 🚅 super scaffolding will insert new children above this line. %> <% end %> <% end %>