<% team = @team || @team %> <% context ||= team %> <% collection ||= :platform_applications %> <% hide_actions ||= false %> <% hide_back ||= false %> <%= render 'account/shared/box' do |box| %> <% box.title t(".contexts.#{context.class.name.underscore}.header") %> <% box.description t(".contexts.#{context.class.name.underscore}.description") %> <% box.table do %> <% if applications.any? %> <%# 🚅 super scaffolding will insert new field headers above this line. %> <% applications.each do |application| %> <% with_attribute_settings object: application do %> <%# 🚅 super scaffolding will insert new fields above this line. %> <% end %> <% end %>
<%= t('.fields.name.heading') %><%= t('.fields.created_at.heading') %>
<%= render 'shared/attributes/text', attribute: :name, url: [:account, application] %><%= display_date_and_time(application.created_at) %> <% unless hide_actions %> <% if can? :edit, application %> <%= link_to t('.buttons.shorthand.edit'), [:edit, :account, application], class: 'button-secondary button-smaller' %> <% end %> <% if can? :destroy, application %> <%= button_to t('.buttons.shorthand.destroy'), [:account, application], method: :delete, data: { confirm: t('.buttons.confirmations.destroy', model_locales(application)) }, class: 'button-secondary button-smaller' %> <% end %> <% end %>
<% end %> <% end %> <% box.actions do %> <% unless hide_actions %> <% if context == team %> <% if can? :create, Platform::Application.new(team: team) %> <%= link_to t('.buttons.new'), [:new, :account, team, :platform_application], class: "#{first_button_primary(:platform_application)} new" %> <% end %> <% end %> <% unless hide_back %> <%= link_to t('global.buttons.back'), [:account, context], class: "#{first_button_primary(:platform_application)} back" %> <% end %> <% end %> <% end %> <% end %>