foodcoops/foodsoft

View on GitHub
app/views/admin/finances/_bank_accounts.html.haml

Summary

Maintainability
Test Coverage
%table.table.table-striped
  %thead
    %tr
      %th= heading_helper BankAccount, :name
      %th= heading_helper BankAccount, :iban
      %th= heading_helper BankAccount, :description
      %th
  %tbody
    - @bank_accounts.each do |bank_account|
      %tr
        %td= bank_account.name
        %td= format_iban bank_account.iban
        %td= truncate bank_account.description, length: 50
        %td
          = link_to t('ui.edit'), edit_admin_bank_account_path(bank_account), remote: true, class: 'btn btn-mini'
          = link_to t('ui.delete'), [:admin, bank_account], :method => :delete, :data => {:confirm => t('ui.confirm_delete', name: bank_account.name)},
            remote: true, class: 'btn btn-mini btn-danger'