diff options
author | Jochen Topf <jochen@topf.org> | 2011-12-29 22:26:10 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2011-12-29 22:26:10 +0100 |
commit | 62a56e5245525b6d84234b91f961791bf83855da (patch) | |
tree | 8eef6843cfb7d381494a8997ef6882bda9413a3b /web/views/tag.erb | |
parent | cb3b3d2806b7e4f98ceb7eaccd53f07674fd814a (diff) | |
download | taginfo-62a56e5245525b6d84234b91f961791bf83855da.tar taginfo-62a56e5245525b6d84234b91f961791bf83855da.tar.gz |
Move overview table in tags page into its own tab
Diffstat (limited to 'web/views/tag.erb')
-rw-r--r-- | web/views/tag.erb | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/web/views/tag.erb b/web/views/tag.erb index 5f33f99..ec93c27 100644 --- a/web/views/tag.erb +++ b/web/views/tag.erb @@ -1,6 +1,3 @@ -<table id="overview"> -</table> - <h1><%= link_to_key(@key) %>=<%= @value_pp %></h1> <div class="source-wiki" title="Description from the wiki"> @@ -28,10 +25,16 @@ <div id="tabs"> <ul> + <li><a href="#overview"><%= t.taginfo.overview %></a></li> <li><a href="#combinations"><%= t.taginfo.combinations %></a></li> <li><a href="#wiki"><%= t.sources.wiki.name %></a></li> <li><a href="#josm"><%= t.sources.josm.name %></a></li> </ul> + <div id="overview"> + <h2><%= t.taginfo.overview %></h2> + <table id="grid-overview"> + </table> + </div> <div id="combinations"> <h2><%= t.pages.tag.combinations.title %></h2> <p><%= t.pages.tag.combinations.description %></p> @@ -71,15 +74,6 @@ jQuery('#filter').bind('change', function() { window.location.search = 'filter=' + value; }); -jQuery.getJSON('/api/2/db/tags/overview?key=#{ @key_uri }&value=#{ @value_uri }', function(data, textStatus) { - var table_content = '<tr><th></th><th title="Number of objects with this tag">Number of objects</th></tr>'; - table_content += jQuery.map(['all', 'nodes', 'ways', 'relations'], function(obj, i) { - var d = data[obj]; - return '<tr><td>' + print_image(obj) + '</td><td class="count">' + print_value_with_percent(d.count, d.count_fraction) + '</td></tr>'; - }).join(''); - jQuery('#overview').append(table_content); -}); - var tabs = jQuery('#tabs').tabs({ show: function(event, ui) { window.location.hash = ui.tab.hash; |