diff options
author | Jochen Topf <jochen@topf.org> | 2012-02-25 17:15:06 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2012-02-25 17:15:06 +0100 |
commit | 559487172d584d04b8175a3cdb97361582291fe9 (patch) | |
tree | abda5f77d3628c18235ffebaad73c4e057e318c7 | |
parent | 5a690eb7de355d0d92a2a91b5c18af2d75497bc6 (diff) | |
download | taginfo-559487172d584d04b8175a3cdb97361582291fe9.tar taginfo-559487172d584d04b8175a3cdb97361582291fe9.tar.gz |
make xapi/josm max_results configurable
-rw-r--r-- | taginfo-config-example.json | 2 | ||||
-rw-r--r-- | web/views/key.erb | 2 | ||||
-rw-r--r-- | web/views/tag.erb | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/taginfo-config-example.json b/taginfo-config-example.json index 98d0ec2..51e923e 100644 --- a/taginfo-config-example.json +++ b/taginfo-config-example.json @@ -28,6 +28,8 @@ "background_image": "/img/mapbg/world.png" }, "xapi": { + // XAPI/JOSM buttons are disabled if more than this many results are expected + "max_results": 1000, // URL prefix for the XAPI/JOSM links on the key and tag pages. // "url_prefix": "http://www.informationfreeway.org/api/0.6/" "url_prefix": "http://open.mapquestapi.com/xapi/api/0.6/" diff --git a/web/views/key.erb b/web/views/key.erb index 175e72c..86c24e9 100644 --- a/web/views/key.erb +++ b/web/views/key.erb @@ -9,7 +9,7 @@ </select> </form> <div id="tools" class="no-print"> - <% if @count_all_values < 1000 %> + <% if @count_all_values < TaginfoConfig.get('xapi.max_results', 1000) %> <%= xapi_link(@filter_xapi, @key) %> <%= josm_link(@filter_xapi, @key) %> <% else %> <span class="button disabled" title="Button disabled, because there are too many objects with this key">XAPI</span> diff --git a/web/views/tag.erb b/web/views/tag.erb index c8c4f2a..3ae83f6 100644 --- a/web/views/tag.erb +++ b/web/views/tag.erb @@ -9,7 +9,7 @@ </select> </form> <div id="tools"> - <% if @count_all < 1000 %> + <% if @count_all < TaginfoConfig.get('xapi.max_results', 1000) %> <%= xapi_link(@filter_xapi, @key, @value) %> <%= josm_link(@filter_xapi, @key, @value) %> <% else %> <span class="button disabled" title="Button disabled, because there are too many objects with this key">XAPI</span> |