<%= 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 do %> <% if @membership.unclaimed? %> <%= t('.invitation_header') %> <% elsif @membership.tombstone? %> <%= t('.tombstone_header') %> <% else %> <%= t('.header') %> <% end %> <% end %> <% p.content_for :description do %> <%= t('.description') %> <% end %> <% p.content_for :body do %> <% with_attribute_settings object: @membership, strategy: :label do %> <%= render 'shared/attributes/text', attribute: :name %> <%= render 'shared/attributes/base' do |p| %> <% p.content_for :heading, t('.fields.role_ids.heading') %> <% p.content_for :body do %> <% if @membership.assignable_roles.any? %> <%= @membership.assignable_roles.map { |role| t(".fields.role_ids.options.#{role.key}.label") }.to_sentence %> <% else %> <%= t(".fields.role_ids.none") %> <% end %> <% end %> <% end %> <% end %> <%# 🚅 super scaffolding will insert new fields above this line. %> <% end %> <% p.content_for :actions do %> <% if @membership.tombstone? %> <%= link_to t('.buttons.reinvite'), [:reinvite, :account, @membership], class: first_button_primary, method: :post, data: {confirm: t('.buttons.confirmations.reinvite', membership_name: @membership.name)} if can? :edit, @membership %> <% end %> <%= link_to t('.buttons.edit'), [:edit, :account, @membership], class: first_button_primary if can? :edit, @membership %> <% unless @membership.tombstone? %> <% if @membership.admin? %> <%= link_to t('.buttons.demote'), [:demote, :account, @membership], method: :post, data: { confirm: t('global.confirm_message') }, class: first_button_primary if can? :demote, @membership %> <% else %> <%= link_to t('.buttons.promote'), [:promote, :account, @membership], method: :post, data: { confirm: t('global.confirm_message') }, class: first_button_primary if can? :promote, @membership %> <% end %> <% if (can? :destroy, @membership) && (!@membership.platform_agent) %> <%= button_to t(".buttons.#{membership_destroy_locale_key(@membership)}"), [:account, @membership], method: :delete, data: { confirm: t(".buttons.confirmations.#{membership_destroy_locale_key(@membership)}", model_locales(@membership)) }, class: first_button_primary %> <% end %> <% end %> <%= link_to t('global.buttons.back'), [:account, @team, :memberships], class: first_button_primary %> <% end %> <% end %> <%= render 'account/scaffolding/completely_concrete/tangible_things/index', tangible_things: @membership.scaffolding_completely_concrete_tangible_things, context: @membership if @membership.scaffolding_completely_concrete_tangible_things.any? %> <%# 🚅 super scaffolding will insert new children above this line. %> <% end %> <% end %>