diff options
author | Jochen Topf <jochen@topf.org> | 2013-01-24 22:13:03 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2013-01-24 22:13:03 +0100 |
commit | 301079127471428fabb0504e40eaa33a4afc3525 (patch) | |
tree | 77aa8f2cf08e3545e88cc0a279643658b85618cf | |
parent | 4bfa3306d07f006fb85a26de261c2052b256694a (diff) | |
download | taginfo-301079127471428fabb0504e40eaa33a4afc3525.tar taginfo-301079127471428fabb0504e40eaa33a4afc3525.tar.gz |
Add in_wiki column to tags
-rw-r--r-- | web/i18n/de.yml | 2 | ||||
-rw-r--r-- | web/i18n/en.yml | 2 | ||||
-rw-r--r-- | web/lib/api/v4/tags.rb | 3 | ||||
-rw-r--r-- | web/viewsjs/tags.js.erb | 6 |
4 files changed, 9 insertions, 4 deletions
diff --git a/web/i18n/de.yml b/web/i18n/de.yml index 7031691..dc93877 100644 --- a/web/i18n/de.yml +++ b/web/i18n/de.yml @@ -78,7 +78,7 @@ misc: users_tooltip: Anzahl unterschiedlicher User, die die Objekte mit diesem Key zuletzt geändert haben. prevalent_values: Häufige Values prevalent_values_tooltip: Bis zu zehn der häufigsten Values zu diesem Key (Anzeige nur, wenn mehr als 1% der Tags mit diesem Key auch diesen Value haben). - in_wiki_tooltip: Zu diesem Key gibt es mindestens eine Wiki-Seite. + in_wiki_tooltip: Zu diesem Objekt gibt es mindestens eine Wiki-Seite. in_josm_tooltip: Der Key erscheint in der JOSM-Konfiguration. help: diff --git a/web/i18n/en.yml b/web/i18n/en.yml index 6fd81db..ea04b22 100644 --- a/web/i18n/en.yml +++ b/web/i18n/en.yml @@ -79,7 +79,7 @@ misc: users_tooltip: Number of distinct users who last changed objects with this key. prevalent_values: Prevalent values prevalent_values_tooltip: Up to ten of the most common values for this key (only if more than 1% of tags with this key have this value). - in_wiki_tooltip: Key has at least one wiki page. + in_wiki_tooltip: Has at least one wiki page. in_josm_tooltip: Key appears in JOSM config. help: diff --git a/web/lib/api/v4/tags.rb b/web/lib/api/v4/tags.rb index 9830e7a..68d5ff5 100644 --- a/web/lib/api/v4/tags.rb +++ b/web/lib/api/v4/tags.rb @@ -9,6 +9,7 @@ class Taginfo < Sinatra::Base :result => paging_results([ [:key, :STRING, 'Key'], [:value, :STRING, 'Value'], + [:in_wiki, :BOOL, 'In there a page in the wiki for this tag?'], [:count_all, :INT, 'Number of objects in the OSM database with this tag.'], [:count_all_fraction, :FLOAT, 'Number of objects in relation to all objects.'], [:count_nodes, :INT, 'Number of nodes in the OSM database with this tag.'], @@ -31,6 +32,7 @@ class Taginfo < Sinatra::Base order_by(@ap.sortname, @ap.sortorder) { |o| o.tag :skey o.tag :svalue + o.in_wiki o.count_all o.count_nodes o.count_ways @@ -46,6 +48,7 @@ class Taginfo < Sinatra::Base :data => res.map{ |row| { :key => row['skey'], :value => row['svalue'], + :in_wiki => row['in_wiki'], :count_all => row['count_all'].to_i, :count_all_fraction => (row['count_all'].to_f / @db.stats('objects')).round_to(4), :count_nodes => row['count_nodes'].to_i, diff --git a/web/viewsjs/tags.js.erb b/web/viewsjs/tags.js.erb index 9dd971e..f87351d 100644 --- a/web/viewsjs/tags.js.erb +++ b/web/viewsjs/tags.js.erb @@ -10,7 +10,8 @@ function page_init() { { display: '<span title="<%= misc.objects_tooltip %>"><img src="/img/types/all.16.png" width="16" height="16" alt=""/> <%= osm.objects %></span>', name: 'count_all', width: 220, sortable: true, align: 'center' }, { display: '<span title="<%= misc.nodes_tooltip %>"><img src="/img/types/node.16.png" width="16" height="16" alt=""/> <%= osm.nodes %></span>', name: 'count_nodes', width: 220, sortable: true, align: 'center' }, { display: '<span title="<%= misc.ways_tooltip %>"><img src="/img/types/way.16.png" width="16" height="16" alt=""/> <%= osm.ways %></span>', name: 'count_ways', width: 220, sortable: true, align: 'center' }, - { display: '<span title="<%= misc.relations_tooltip %>"><img src="/img/types/relation.16.png" width="16" height="16" alt=""/> <%= osm.relations %></span>', name: 'count_relations', width: 220, sortable: true, align: 'center' } + { display: '<span title="<%= misc.relations_tooltip %>"><img src="/img/types/relation.16.png" width="16" height="16" alt=""/> <%= osm.relations %></span>', name: 'count_relations', width: 220, sortable: true, align: 'center' }, + { display: '<img src="/img/sources/wiki.16.png" alt="Wiki" width="16" height="16" title="<%= misc.in_wiki_tooltip %>"/>', name: 'in_wiki', width: 20, sortable: true, align: 'center' } ], searchitems: [ { display: '<%= osm.tag %>', name: 'tag' } @@ -24,7 +25,8 @@ function page_init() { fmt_value_with_percent(row.count_all, row.count_all_fraction), fmt_value_with_percent(row.count_nodes, row.count_nodes_fraction), fmt_value_with_percent(row.count_ways, row.count_ways_fraction), - fmt_value_with_percent(row.count_relations, row.count_relations_fraction) + fmt_value_with_percent(row.count_relations, row.count_relations_fraction), + fmt_checkmark(row.in_wiki) ] }; }); return data; |