thirteen-tien-len/app/views/tokens/index.html.haml

38 lines
829 B
Plaintext

%h1 Listing tokens
- if policy(Token).new?
= link_to 'Add Token', new_token_path
%table
%thead
%tr
%th Logo
%th Canister
%th Standard
%th Symbol
%th Name
%th Total supply
%th Decimals
%th Transfer fee
- if policy(@tokens).update?
%th
%th
%th
%tbody
- @tokens.each do |token|
%tr
%td= token.logo_url
%td= token.canister_id
%td= token.standard
%td= token.symbol
%td= token.name
%td= token.total_supply
%td= token.decimals
%td= token.transfer_fee
- if policy(token).update?
%td= link_to 'Show', token
%td= link_to 'Edit', edit_token_path(token)
%td= link_to 'Destroy', token, method: :delete, data: { confirm: 'Are you sure?' }