-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.erb
45 lines (34 loc) · 1002 Bytes
/
index.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<p>
<%= link_to 'World', '/' %>
<span class='country-count'>
(<%= Country.count %>)
</span> ›
<% Continent.order(:id).each_with_index do |continent,i| %>
<% if i > 0 %> • <% end %>
<%= link_to_continent( continent ) %>
<span class='country-count'>
(<%= continent.countries.count %>)
</span>
<% end %>
<p>
<h2>
<%= countries_count %> <%= title %>
›
<% supra_count = countries.where(s:true).count
if supra_count > 0 %>
<%= supra_count %> Supras /
<% end %>
<%= countries.where(c:true).count %> Countries /
<%= countries.where(d:true).count %> Territories
</h2>
<p>
Filter: <%= link_to 'All', '?' %> ›
<%= link_to 'Countries', '?c=t&s=f&d=f' %> •
<%= link_to 'Territories', '?c=f&s=f&d=t' %>
</p>
<table>
<%= erb :'shared/_table_header_country' %>
<% countries.each do |country| %>
<%= erb :'shared/_table_row_country', locals: { country: country } %>
<% end %><!-- each country -->
</table>