aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2011-03-04 21:53:31 +0100
committerJochen Topf <jochen@topf.org>2011-03-04 21:53:31 +0100
commitb6dcb99e099a4a004dfa745d6f3b9f6e614e3895 (patch)
treeea9d63502c5d2165e7774b570bbb0d4a03398405
parentda47fb72bbf5cb2f1e2f22a63847a4f9eae675ec (diff)
downloadtaginfo-b6dcb99e099a4a004dfa745d6f3b9f6e614e3895.tar
taginfo-b6dcb99e099a4a004dfa745d6f3b9f6e614e3895.tar.gz
in embed pages: handle specially if key is {{{key}}} (and value is {{{value}}})
-rw-r--r--web/views/embed/key.erb5
-rw-r--r--web/views/embed/tag.erb5
2 files changed, 8 insertions, 2 deletions
diff --git a/web/views/embed/key.erb b/web/views/embed/key.erb
index bcb7111..b21a02d 100644
--- a/web/views/embed/key.erb
+++ b/web/views/embed/key.erb
@@ -1,4 +1,7 @@
-<% if @dbkey.nil? %>
+<% if @key == '{{{key}}}' %>
+<a target="_blank" title="More information about key '<%= escape_html(@key) %>' at Taginfo" href="http://taginfo.openstreetmap.de/"><img src="/img/taginfo.24.png" alt="Taginfo"/> <b>Taginfo</b> [More...]</a>
+<p>Statistics about the key will appear here.</p>
+<% elsif @dbkey.nil? %>
<a target="_blank" title="More information about key '<%= escape_html(@key) %>' at Taginfo" href="http://taginfo.openstreetmap.de/tags/?key=<%= escape(@key) %>&value=<%= escape(@value) %>"><img src="/img/taginfo.24.png" alt="Taginfo"/> <b>Taginfo</b> [More...]</a>
<p>This key does not appear in the OSM database.</p>
<% else %>
diff --git a/web/views/embed/tag.erb b/web/views/embed/tag.erb
index 9fab641..f4ea6a8 100644
--- a/web/views/embed/tag.erb
+++ b/web/views/embed/tag.erb
@@ -1,4 +1,7 @@
-<% if @dbtag.nil? %>
+<% if @key == '{{{key}}}' && @value == '{{{value}}}' %>
+<a target="_blank" title="More information about tag '<%= escape_html(@key) %>=<%= escape_html(@value) %>' at Taginfo" href="http://taginfo.openstreetmap.de/"><img src="/img/taginfo.24.png" alt="Taginfo"/> <b>Taginfo</b> [More...]</a>
+<p>Statistics about the tag will appear here.</p>
+<% elsif @dbtag.nil? %>
<a target="_blank" title="More information about tag '<%= escape_html(@key) %>=<%= escape_html(@value) %>' at Taginfo" href="http://taginfo.openstreetmap.de/tags/?key=<%= escape(@key) %>&value=<%= escape(@value) %>"><img src="/img/taginfo.24.png" alt="Taginfo"/> <b>Taginfo</b> [More...]</a>
<p>This tag does not appear in the OSM database.</p>
<% else %>