diff options
author | Jochen Topf <jochen@topf.org> | 2010-11-06 19:49:27 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2010-11-06 19:49:27 +0100 |
commit | 79f4ec1fa8238cce85ed2379544cb347fa965f57 (patch) | |
tree | 1ae0d0d83266650183064626aea34eaebf79b1ed | |
parent | 0f75e20a725cb7dbc08cbf476f7343c68dfcc3cd (diff) | |
download | taginfo-79f4ec1fa8238cce85ed2379544cb347fa965f57.tar taginfo-79f4ec1fa8238cce85ed2379544cb347fa965f57.tar.gz |
'Combinations' instead of 'Other keys', popup on lang tags shows english name, too
-rw-r--r-- | web/lib/api/wiki.rb | 1 | ||||
-rw-r--r-- | web/public/js/taginfo.js | 4 | ||||
-rw-r--r-- | web/views/key.erb | 5 | ||||
-rw-r--r-- | web/views/tag.erb | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/web/lib/api/wiki.rb b/web/lib/api/wiki.rb index 662554e..cf8303f 100644 --- a/web/lib/api/wiki.rb +++ b/web/lib/api/wiki.rb @@ -5,6 +5,7 @@ class Taginfo < Sinatra::Base return res.map{ |row| { :lang => h(row['lang']), :language => h(::Language[row['lang']].native_name), + :language_en => h(::Language[row['lang']].english_name), :title => h(row['title']), :description => h(row['description']), :image => h(row['image']), diff --git a/web/public/js/taginfo.js b/web/public/js/taginfo.js index 60e5e3d..0c4130c 100644 --- a/web/public/js/taginfo.js +++ b/web/public/js/taginfo.js @@ -14,8 +14,8 @@ function print_wiki_link(title, options) { return '<img src="/img/link-wiki.gif" alt=""/><a class="wikilink" href="http://wiki.openstreetmap.org/' + path + '" target="_blank">' + title + '</a>'; } -function print_language(code, lang) { - return '<span class="lang" title="' + lang + '">' + code + '</span> ' + lang; +function print_language(code, native_name, english_name) { + return '<span class="lang" title="' + native_name + ' (' + english_name + ')">' + code + '</span> ' + native_name; } function print_key_list(list) { diff --git a/web/views/key.erb b/web/views/key.erb index 7bbea09..eb372a2 100644 --- a/web/views/key.erb +++ b/web/views/key.erb @@ -29,10 +29,11 @@ <div id="tabs"> <ul> <li><a href="#tabs-values">Values</a></li> - <li><a href="#tabs-keys">Other Keys</a></li> + <li><a href="#tabs-keys">Combinations</a></li> <li><a href="#tabs-map">Map</a></li> <li><a href="#tabs-wiki">Wiki</a></li> <li><a href="#tabs-josm">JOSM</a></li> +<%# <li><a href="#tabs-potlatch">Potlatch</a></li>%> <%# <li><a href="#tabs-merkaartor">Merkaartor</a></li>%> </ul> <div id="tabs-values"> @@ -245,7 +246,7 @@ page: 1, rows: jQuery.map(data, function(row, i) { return { 'cell': [ - print_language(row.lang, row.language), + print_language(row.lang, row.language, row.language_en), print_wiki_link(row.title), row.description, row.image == null ? '<i>no image</i>' : print_wiki_link(row.image), diff --git a/web/views/tag.erb b/web/views/tag.erb index 1971178..ce01727 100644 --- a/web/views/tag.erb +++ b/web/views/tag.erb @@ -124,7 +124,7 @@ page: 1, rows: jQuery.map(data, function(row, i) { return { 'cell': [ - print_language(row.lang, row.language), + print_language(row.lang, row.language, row.language_en), print_wiki_link(row.title), row.description, row.image == null ? '<i>no image</i>' : print_wiki_link(row.image), |