<% content_for :head do -%>
  <%= javascript_include_tag 'page_specific/refresh_on_update' %>
<% end -%>
<h1>Listing tabs</h1>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th></th>
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>

  <tbody>
    <% @tabs.each do |tab| %>
      <tr class="tab-<%= tab.open? ? 'open' : 'closed' %>">
        <td><%= tab.name %></td>
        <td><%= number_to_currency(tab.balance) %>
        <td><%= link_to 'New Line Item', new_tab_line_item_path(tab) %>
        <td><%= link_to 'Show', tab %></td>
        <td><%= link_to 'Edit', edit_tab_path(tab) %></td>
        <td><%= link_to 'Close', close_tab_path(tab), data: { confirm: 'Are you sure that you want to close this tab?' }%></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Tab', new_tab_path %>

<% content_for :head do -%>
  <%= javascript_include_tag 'page_specific/refresh_on_update' %>
<% end -%>
<h1>Listing tabs</h1>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th></th>
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>

  <tbody>
    <% @tabs.each do |tab| %>
      <tr class="tab-<%= tab.open? ? 'open' : 'closed' %>">
        <td><%= link_to tab.name, tab %></td>
        <td><%= number_to_currency(tab.balance) %>
        <td><%= link_to 'New Line Item', new_tab_line_item_path(tab) %>
        <td><%= link_to 'Show', tab %></td>
        <td><%= link_to 'Edit', edit_tab_path(tab) %></td>
        <td><%= link_to 'Close', close_tab_path(tab), data: { confirm: 'Are you sure that you want to close this tab?' }%></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Tab', new_tab_path %>

Add link for name of tab to point to show
Add link for name of tab to point to show
