<% context ||= @user %> <% hide_actions ||= false %> <%= render 'account/shared/box' do |p| %> <% p.content_for :title, t(".contexts.#{context.class.name.underscore}.header") %> <% p.content_for :description do %> <%= raw t(".contexts.#{context.class.name.underscore}.#{stripe_accounts.any? ? 'description' : 'description_empty'}") %> <% end %> <% p.content_for :body do %> <% if stripe_accounts.any? %>
<% stripe_accounts.each do |stripe_account| %>
<% if stripe_account.integrations_stripe_installations.any? %> <%= link_to stripe_account.name, [:account, stripe_account] %> <% else %> <%= stripe_account.name %> <% end %>
<% if can? :destroy, stripe_account %> <%= link_to [:account, stripe_account], method: :delete, data: { confirm: t('.buttons.confirmations.destroy', model_locales(stripe_account)) }, class: 'inline-block text-gray-300 hover:text-gray-400 hover:no-underline' do %> <% end %> <% end %>
<% end %>
<% end %> <% end %> <% unless hide_actions %> <% p.content_for :actions do %> <% if can? :create, Oauth::StripeAccount.new(user: @user) %> <%= button_to user_stripe_connect_omniauth_authorize_path, class: "#{first_button_primary(:integrations_stripe_installation)} new" do %> <%= stripe_accounts.empty? ? t('.buttons.new') : t('.buttons.another') %> <% end %> <% end %> <% end %> <% end %> <% p.content_for :footer do %> <% if current_team %> <%= raw t(".contexts.user.integration_note", integration_url: url_for([:account, current_team, :integrations_stripe_installations])) %> <% end %> <% end %> <% end %>