Sha256: b6678bc9e4924e3b24e07948f8f696f4eb39f14fd68e27a1829893fc60107787

Contents?: true

Size: 1.39 KB

Versions: 7

Compression:

Stored size: 1.39 KB

Contents

<%
  urban_area ||= nil
  zcta ||= nil
  overlap = (urban_area || zcta)
%>

<table class="table table-striped sortable">
  <thead>
    <tr>
      <th>GEOID</th>
      <th>Name</th>
      <% unless defined?(county) && county %>
        <th>County</th>
      <% end %>
      <th>FIPS Class Code</th>

      <%= demographics_headers %>

      <% if overlap %>
        <th class="text-end">Overlap</th>
      <% end %>
    </th>
  </thead>
  <tbody>
    <% county_subdivisions.each do |county_subdivision| %>
      <tr>
        <td><%= county_subdivision.geoid %></td>
        <td><%= link_to county_subdivision.name, county_subdivision_path(county_subdivision, breadcrumb_params) %></td>
        <% unless defined?(county) && county %>
          <td><%= link_to county_subdivision.county.full_name, county_path(county_subdivision.county, breadcrumb_params) %></td>
        <% end %>
        <td><%= county_subdivision.fips_class_code %></td>

        <%= demographics_cells(county_subdivision, round_area: 1) %>

        <% if overlap %>
          <td class="text-end">
            <% if urban_area %>
              <%= overlap_percentage(urban_area, county_subdivision, :urban_area_county_subdivisions) %>
            <% elsif zcta %>
              <%= overlap_percentage(zcta, county_subdivision, :zcta_county_subdivisions) %>
            <% end %>
          </td>
        <% end %>
      </tr>
    <% end %>
  </tbody>
</table>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
us_geo-2.1.1 explorer_app/app/views/county_subdivisions/_table.html.erb
us_geo-2.1.0 explorer_app/app/views/county_subdivisions/_table.html.erb
us_geo-2.0.4 explorer_app/app/views/county_subdivisions/_table.html.erb
us_geo-2.0.3 explorer_app/app/views/county_subdivisions/_table.html.erb
us_geo-2.0.2 explorer_app/app/views/county_subdivisions/_table.html.erb
us_geo-2.0.1 explorer_app/app/views/county_subdivisions/_table.html.erb
us_geo-2.0.0 explorer_app/app/views/county_subdivisions/_table.html.erb