<commit_before><% content_for(:title, "Households") %>

<% content_for(:top_buttons) do %>
  <% if policy(Household.new(community: current_community)).create? %>
    <%= link_to(icon_tag("plus") << " Create Household", new_household_path, class: "btn btn-primary") %>
  <% end %>
<% end %>

<% if @households.empty? %>
  <div class="center-notice">
    No households found.
  </div>
<% else %>
  <table class="index">
    <tr>
      <th>Name</th>
      <% if multi_community? %>
        <th>Community</th>
      <% end %>
      <th>Unit #</th>
      <th>Users</th>
      <th></th>
    </tr>
    <% @households.each do |household| %>
      <tr class="<%= household.active? ? "" : "inactive" %>">
        <td>
          <% if policy(household).show? %>
            <%= link_to(household.name, household) %>
          <% else %>
            <%= household.name %>
          <% end %>
        </td>
        <% if multi_community? %>
          <td><%= household.community_name %></td>
        <% end %>
        <td>
          <%= household.unit_num_and_suffix %>
        </td>
        <td>
          <%= load_showable_users_and_children_in(household).map(&:link).reduce(&sep(", ")) %>
        </td>
      </tr>
    <% end %>
  </table>
  <%= paginate @households %>
<% end %><commit_msg>229: Remove community column from households page<commit_after><% content_for(:title, "Households") %>

<% content_for(:top_buttons) do %>
  <% if policy(Household.new(community: current_community)).create? %>
    <%= link_to(icon_tag("plus") << " Create Household", new_household_path, class: "btn btn-primary") %>
  <% end %>
<% end %>

<% if @households.empty? %>
  <div class="center-notice">
    No households found.
  </div>
<% else %>
  <table class="index part-width">
    <tr>
      <th>Name</th>
      <th>Unit #</th>
      <th>Users</th>
      <th></th>
    </tr>
    <% @households.each do |household| %>
      <tr class="<%= household.active? ? "" : "inactive" %>">
        <td>
          <% if policy(household).show? %>
            <%= link_to(household.name, household) %>
          <% else %>
            <%= household.name %>
          <% end %>
        </td>
        <td>
          <%= household.unit_num_and_suffix %>
        </td>
        <td>
          <%= load_showable_users_and_children_in(household).map(&:link).reduce(&sep(", ")) %>
        </td>
      </tr>
    <% end %>
  </table>
  <%= paginate @households %>
<% end %>
{'fraction_non_alphanumeric': 0.20567667626491157, 'fraction_numerical': 0.0012340600575894694, 'mean_word_length': 2.3133514986376023, 'pattern_counts': {'":': 0, '<': 100, '<?xml version=': 0, '>': 96, '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': '5610438', 'n_tokens_mistral': 911, 'n_tokens_neox': 810, 'n_words': 143}