summaryrefslogtreecommitdiff
path: root/web/views/embed/tag.erb
blob: 74361b866f15d5c725fbd6f10b842a9867e9feed (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="http://taginfo.openstreetmap.org/"><img src="/img/taginfo.24.png" alt="Taginfo"/> <b>Taginfo</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="http://taginfo.openstreetmap.org/tags/?key=<%= escape(@key) %>&value=<%= escape(@value) %>"><img src="/img/taginfo.24.png" alt="Taginfo"/> <b>Taginfo</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="http://taginfo.openstreetmap.org/tags/?key=<%= escape(@key) %>&value=<%= escape(@value) %>"><img src="/img/taginfo.24.png" alt="Taginfo"/> <b>Taginfo</b> [More...]</a>
<div class="content"><table>
    <tr>
        <td class="ft"><img src="/img/types/node.16.png" 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) %>'"><%= '%.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" 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) %>'"><%= '%.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" 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) %>'"><%= '%.2f' % (@dbtag['count_relations'].to_f / @dbkey['count_relations'].to_f * 100) %>&thinsp;%</td>
    </tr>
</table></div>
<% end %>