aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2015-02-27 09:42:47 +0100
committerJochen Topf <jochen@topf.org>2015-02-27 09:42:47 +0100
commit441dce41853082a062afdfac805421f204b64f34 (patch)
tree2ccdf2322294779fa5d4f727fb34a117c59d2814
parent190afd5d0aec8a140bb95f97f4761c1353e14cc5 (diff)
downloadtaginfo-441dce41853082a062afdfac805421f204b64f34.tar
taginfo-441dce41853082a062afdfac805421f204b64f34.tar.gz
Make display of new 'similar' tab configurable.
There is a setting now in the configuration file. Display is off by default until people have a chance to upgrade their taginfo version, so that the data needed for displaying this is actually available.
-rw-r--r--taginfo-config-example.json6
-rw-r--r--web/views/key.erb10
2 files changed, 13 insertions, 3 deletions
diff --git a/taginfo-config-example.json b/taginfo-config-example.json
index 8727d9c..544144f 100644
--- a/taginfo-config-example.json
+++ b/taginfo-config-example.json
@@ -106,6 +106,12 @@
"tokenizer": "simple"
}
},
+ // Settings for the web user interface
+ "user_interface": {
+ "key_page": {
+ "show_tab_similar": false
+ }
+ },
"logging": {
// directory for log files
"directory": "/osm/taginfo/var/log",
diff --git a/web/views/key.erb b/web/views/key.erb
index 8724b24..ceb9928 100644
--- a/web/views/key.erb
+++ b/web/views/key.erb
@@ -38,7 +38,9 @@
<li><a href="#overview"><%= h(t.taginfo.overview) %></a></li>
<li><a href="#values"><%= h(t.osm.values) %></a></li>
<li><a href="#combinations"><%= h(t.taginfo.key_combinations) %></a></li>
-<!-- <li><a href="#similar"><%= h(t.pages.key.similar.tab) %></a></li>-->
+<% if TaginfoConfig.get('user_interface.key_page.show_tab_similar', false) %>
+ <li><a href="#similar"><%= h(t.pages.key.similar.tab) %></a></li>
+<% end %>
<li><a href="#map"><%= h(t.taginfo.map) %></a></li>
<li><a href="#wiki"><%= h(t.sources.wiki.name) %></a></li>
<li><a href="#projects"><%= h(t.taginfo.projects) %></a></li>
@@ -70,11 +72,13 @@
<table id="grid-keys">
</table>
</div>
-<!-- <div id="similar">
+<% if TaginfoConfig.get('user_interface.key_page.show_tab_similar', false) %>
+ <div id="similar">
<h2><%= h(t.pages.key.similar.title) %></h2>
<table id="grid-similar">
</table>
- </div>-->
+ </div>
+<% end %>
<div id="map">
<h2><%= h(t.pages.key.geographic_distribution.title) %></h2>
<% if @filter_type == 'all' %>