Sha256: 6ca33b26ea743ecc54240f0eb7165f3d6f18191c2d3f95c8519977d42489199f

Contents?: true

Size: 1.03 KB

Versions: 2

Compression:

Stored size: 1.03 KB

Contents


<h3><%= @countries.count %> Countries / <%= City.count %> Cities</h3>

<p>
  All
   <span class='country-count'>
    (<%= @countries.count %>)
   </span>
<% Continent.all.each do |continent| %>
    &bull; 
   <%= continent.title %>
   <span class='country-count'>
      (<%= continent.countries.count %>)
   </span>
<% end %>
</p>


<table>
<% @countries.each do |country| %>
  <tr>
    <td>
      <%= country.continent.title if country.continent.present? %>
    </td>
    <td class='country-key'>
      <%= country.key %>
    </td>
    <td style='white-space: nowrap;'>
<%= image_tag "flags/24x24/#{country.key}.png" %>  
<%= link_to country.title, short_country_path( country ) %>
    </td>
    <td>
      (<%= country.code %>)
    </td>
    <td>
<span class='city-count'>
(<%= country.cities.count %>)
</span>
    </td>
    <td>
  <% country.cities.each do |city| %>
    <%= city.title %>
    <span class='team-count'>(<%= city.teams.count %>)</span>
  <% end %> <!-- each city -->      
    </td>
  </tr>
<% end %><!-- each country -->
</table>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sportdb-admin-0.1.1 app/views/sport_db_admin/countries/index.html.erb
sportdb-admin-0.1.0 app/views/sport_db_admin/countries/index.html.erb