]> git.openstreetmap.org Git - rails.git/blob - app/views/site/key.html.erb
5879701a2e4350c2ca6e666d4f569ef803787775
[rails.git] / app / views / site / key.html.erb
1 <div id="mapkey">
2   <h3><%= t "site.key.table.heading", :zoom_level => params[:zoom] %></h3>
3   <table class="mapkey-table">
4     <% YAML.load_file("#{RAILS_ROOT}/config/key.yml").each do |name,data| %>
5       <% if params[:layer] == name %>
6         <% data.each do |entry| %>
7           <% if params[:zoom].to_i >= entry['min_zoom'] && params[:zoom].to_i <= entry['max_zoom'] %>
8             <tr>
9               <td class="mapkey-table-key" align="center">
10                 <%= image_tag "key/#{name}/#{entry['image']}" %>
11               </td>
12               <td class="mapkey-table-value">
13                 <%= [*t("site.key.table.entry.#{entry['name']}")].to_sentence %>
14               </td>
15             </tr>
16           <% end %>
17         <% end %>
18       <% end %>
19     <% end %>
20   </table>
21 </div>