<commit_before><p id="notice"><%= notice %></p>

<div class="row">
  <div class="col-md-6">
    <div class="panel panel-primary">
      <div class="panel-heading">All Assets</div>
      <div class="panel-body">

        <table class="visible-sm-block visible-md-block visible-lg-block table table-striped">
          <thead>
            <tr>
              <th>Name</th>
              <th>Status</th>
              <th>Balance</th>
            </tr>
          </thead>

          <tbody>
            <% @assets_list.each do |account| %>
              <tr>
                <td><%= "#{account.name} #{account.last4} (#{account.type})" %></td>
                <td><%= account.status %></td>
                <td><%= number_to_currency(account.balance) %></td>
                <td><%= link_to 'Show', account_path(account) %></td>
                <td><%= link_to 'Edit', edit_account_path(account) %></td>
                <td><%= link_to 'Destroy', account_path(account), method: :delete, data: { confirm: 'Are you sure?' } %></td>
              </tr>
            <% end %>
          </tbody>
        </table>

      </div>
    </div>
  </div>

  <div class="col-md-6">
    <div class="panel panel-primary">
      <div class="panel-heading">All Liabilities</div>
      <div class="panel-body">

        <table class="visible-sm-block visible-md-block visible-lg-block table table-striped">
          <thead>
            <tr>
              <th>Name</th>
              <th>Status</th>
              <th>Balance</th>
            </tr>
          </thead>

          <tbody>
            <% @liabilities_list.each do |account| %>
              <tr>
                <td><%= "#{account.name} #{account.last4} (#{account.type})" %></td>
                <td><%= account.status %></td>
                <td><%= number_to_currency(account.balance) %></td>
                <td><%= link_to 'Show', account_path(account) %></td>
                <td><%= link_to 'Edit', edit_account_path(account) %></td>
                <td><%= link_to 'Destroy', account_path(account), method: :delete, data: { confirm: 'Are you sure?' } %></td>
              </tr>
            <% end %>
          </tbody>
        </table>

      </div>
    </div>
  </div>
</div>





<!-- Mobile -->
<% @accounts.each_with_index do |account, i| %>
  <table class="visible-xs-block table table-striped">
  <tbody>
    <tr><td>Account</td><td><%= "#{account.name} #{account.last4} (#{account.type})" %></td></tr>
    <tr><td>Status</td><td><%= account.status %></td></tr>
    <tr><td>Balance</td><td><%= number_to_currency(account.balance) %></td></tr>
    <tr>
      <td><%= link_to 'Show', account_path(account) %></td>
      <td><%= link_to 'Edit', edit_account_path(account) %></td>
      <td><%= link_to 'Destroy', account_path(account), method: :delete, data: { confirm: 'Are you sure?' } %></td>
    </tr>
  </tbody>
  </table>
<% end %>
<!-- Mobile -->
<br>

<%= link_to 'New Account', new_account_path %>
<commit_msg>updated list of all accounts view and link<commit_after><p id="notice"><%= notice %></p>

<div class="row">
  <div class="col-md-6">
    <div class="panel panel-primary">
      <div class="panel-heading">All Assets</div>
      <div class="panel-body">

        <table class="table table-striped">
          <thead>
            <tr>
              <th>Name</th>
              <th>Status</th>
              <th>Balance</th>
            </tr>
          </thead>

          <tbody>
          <% @asset_total = 0 %>
            <% @assets_list.each do |account| %>
              <tr>
                <td><%= link_to "#{account.name} #{account.last4}", account_transactions_path(account_id: account.id) %><%= " (#{account.type})" %></td>
                <td><%= account.status %></td>
                <td><%= number_to_currency(account.balance) %></td>
                <% @asset_total += account.balance %>
              </tr>
            <% end %>
          </tbody>
        </table>

      </div>
      <div class="panel-footer clearfix">
        <div class="pull-right">
          <Strong>Subtotal Assets <%= number_to_currency(@asset_total) %></Strong>
        </div>
      </div>
    </div>
  </div>

  <div class="col-md-6">
    <div class="panel panel-primary">
      <div class="panel-heading">All Liabilities</div>
      <div class="panel-body">

        <table class="table table-striped">
          <thead>
            <tr>
              <th>Name</th>
              <th>Status</th>
              <th>Balance</th>
            </tr>
          </thead>

          <tbody>
            <% @liabilities_total = 0 %>
            <% @liabilities_list.each do |account| %>
              <tr>
                <td><%= link_to "#{account.name} #{account.last4}", account_transactions_path(account_id: account.id) %><%= " (#{account.type})" %></td>
                <td><%= account.status %></td>
                <td><%= number_to_currency(account.balance) %></td>
                <% @liabilities_total += account.balance %>
              </tr>
            <% end %>
          </tbody>
        </table>

      </div>
      <div class="panel-footer clearfix">
        <div class="pull-right">
          <Strong>Subtotal Liabilities <%= number_to_currency(@liabilities_total) %></Strong>
        </div>
      </div>
    </div>
  </div>
</div>

<br>

<%= link_to 'New Account', new_account_path %>

{'fraction_non_alphanumeric': 0.19824528654097442, 'fraction_numerical': 0.002053388090349076, 'mean_word_length': 1.8637092463923035, 'pattern_counts': {'":': 0, '<': 235, '<?xml version=': 0, '>': 235, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6178978', 'n_tokens_mistral': 1799, 'n_tokens_neox': 1687, 'n_words': 338}