summaryrefslogtreecommitdiff
path: root/web/lib/ui
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2013-01-14 19:53:21 +0100
committerJochen Topf <jochen@topf.org>2013-01-14 19:53:21 +0100
commit9f39838e8ad5b6b1dda21013152055f8a008acc9 (patch)
tree7a30495cee48c7b103e7a8f5ba71f34bbbf65dc6 /web/lib/ui
parent4298e373d2c7ebbd8e2c82dda6cff54f6c3995b0 (diff)
downloadtaginfo-9f39838e8ad5b6b1dda21013152055f8a008acc9.tar
taginfo-9f39838e8ad5b6b1dda21013152055f8a008acc9.tar.gz
Add new relations section
There is a whole new relations section which gives information about different relation types. There is a list of all relation types and there is a page for each relation type which currently contains an empty overview tab and a roles tab with a list of roles used with this relation type. There is currently no link that leads to this section as it is not finished yet.
Diffstat (limited to 'web/lib/ui')
-rw-r--r--web/lib/ui/relation.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/web/lib/ui/relation.rb b/web/lib/ui/relation.rb
new file mode 100644
index 0000000..ab3bc8f
--- /dev/null
+++ b/web/lib/ui/relation.rb
@@ -0,0 +1,20 @@
+# web/lib/ui/relations.rb
+class Taginfo < Sinatra::Base
+
+ get %r{^/relations/(.*)} do |rtype|
+ if params[:rtype].nil?
+ @rtype = rtype
+ else
+ @rtype = params[:rtype]
+ end
+
+ @title = [escape_html(@rtype), t.osm.relations]
+ section :relations
+
+ @desc = 'XXX'
+
+ javascript "#{ r18n.locale.code }/relation"
+ erb :relation
+ end
+
+end