From 8addee3d7b3e1f745a75f3dbdcf278277801835a Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Thu, 15 May 2014 20:49:20 +0200 Subject: Add Key Comparison page. This allows comparing of two or more (up to five) keys on one page. No link currently points to this page. --- web/views/key_comparison.erb | 87 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 web/views/key_comparison.erb (limited to 'web/views') diff --git a/web/views/key_comparison.erb b/web/views/key_comparison.erb new file mode 100644 index 0000000..2e89c2e --- /dev/null +++ b/web/views/key_comparison.erb @@ -0,0 +1,87 @@ +
+

<%= h(t.taginfo.key_comparison) %>

+
+ + + <% (0..@keys.size-1).each do |num| %> + + <% end %> + + + <% @keys.each_with_index do |key, num| %> + + <% end %> + + + <% @keys.each_with_index do |key, num| %> + + <% end %> + + + <% @keys.each_with_index do |key, num| %> + + <% end %> + + + <% @keys.each_with_index do |key, num| %> + + <% end %> + + + <% @keys.each do |key| %> + + <% end %> + +
+

+

<%= @desc[num] %>

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
<%= h(t.osm.all) %><%= @count_all[num].to_s_with_ts %>
<%= h(t.osm.nodes) %><%= @count_nodes[num].to_s_with_ts %>
<%= h(t.osm.ways) %><%= @count_ways[num].to_s_with_ts %>
<%= h(t.osm.relations) %><%= @count_relations[num].to_s_with_ts %>
+
+

<%= h(t.misc.prevalent_values) %>:

+ <%= @prevalent_values[num].map{ |pv| "#{ pv['value'] } (#{ pv['count'].to_s_with_ts })" }.join(' • ') %> +
+

<%= h(t.pages.key.wiki_pages.title) %>:

+ <%= @wiki_pages[num].map{ |lang| '' + lang + '' }.join(' ') %> +
+
+ + +
+
+<% javascript do + JS.raw(<<"JAVASCRIPT") +function page_init2() { + var keys = #{ @keys.to_json }; + jQuery.each(keys, function(index, key) { + jQuery('.key' + index + ' h2').html(link_to_key(key)); + }); +} +JAVASCRIPT +end +%> -- cgit v1.2.3