aboutsummaryrefslogtreecommitdiff
path: root/web/views/embed/tag.erb
blob: 4a9b1c72973b03d9a34f460eafcc6a4ade7d8b7f (plain)
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
<% if @key == '{{{key}}}' && @value == '{{{value}}}' %>
<a target="_blank" title="More information about tag '<%= escape_html(@key) %>=<%= escape_html(@value) %>' at Taginfo" href="//taginfo.openstreetmap.org/">tag<b>info</b> [More...]</a>
<p>Statistics about the tag will appear here.</p>
<% elsif @dbtag.nil? %>
<a target="_blank" title="More information about tag '<%= escape_html(@key) %>=<%= escape_html(@value) %>' at Taginfo" href="//taginfo.openstreetmap.org/tags/?key=<%= escape(@key) %>&value=<%= escape(@value) %>">tag<b>info</b> [More...]</a>
<p>This tag does not appear in the OSM database.</p>
<% else %>
<a target="_blank" title="More information about tag '<%= escape_html(@key) %>=<%= escape_html(@value) %>' at Taginfo" href="//taginfo.openstreetmap.org/tags/?key=<%= escape(@key) %>&value=<%= escape(@value) %>">tag<b>info</b> [More...]</a>
<div class="content"><table>
    <tr>
        <td class="ft"><img src="/img/types/node.16.png" width="16" height="16" alt="Nodes" title="Nodes with tag '<%= escape_html(@key) %>=<%= escape_html(@value) %>' in database"></td>
        <td class="ft" title="Nodes with tag '<%= escape_html(@key) %>=<%= escape_html(@value) %>' in database"><%= @dbtag['count_nodes'].to_i.to_s_with_ts %></td>
        <td title="Fraction of all nodes with key '<%= escape_html(@key) %>'"><%= @dbkey['count_nodes'] == 0 ? '0.00' : ('%.2f' % (@dbtag['count_nodes'].to_f / @dbkey['count_nodes'].to_f * 100)) %>&thinsp;%</td>
    </tr>
    <tr>
        <td class="ft"><img src="/img/types/way.16.png" width="16" height="16" alt="Ways" title="Ways with tag '<%= escape_html(@key) %>=<%= escape_html(@value) %>' in database"></td>
        <td class="ft" title="Ways with tag '<%= escape_html(@key) %>=<%= escape_html(@value) %>' in database"><%= @dbtag['count_ways'].to_i.to_s_with_ts %></td>
        <td title="Fraction of all ways with key '<%= escape_html(@key) %>'"><%= @dbkey['count_ways'] == 0 ? '0.00' : ('%.2f' % (@dbtag['count_ways'].to_f / @dbkey['count_ways'].to_f * 100)) %>&thinsp;%</td>
    </tr>
    <tr>
        <td class="ft"><img src="/img/types/relation.16.png" width="16" height="16" alt="Relations" title="Relations with tag '<%= escape_html(@key) %>=<%= escape_html(@value) %>' in database"></td>
        <td class="ft" title="Relations with tag '<%= escape_html(@key) %>=<%= escape_html(@value) %>' in database"><%= @dbtag['count_relations'].to_i.to_s_with_ts %></td>
        <td title="Fraction of all relations with key '<%= escape_html(@key) %>'"><%= @dbkey['count_relations'] == 0 ? '0.00' : ('%.2f' % (@dbtag['count_relations'].to_f / @dbkey['count_relations'].to_f * 100)) %>&thinsp;%</td>
    </tr>
</table></div>
<% end %>