diff options
author | Jochen Topf <jochen@topf.org> | 2012-01-23 09:40:31 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2012-01-23 09:40:31 +0100 |
commit | ce94aac91f0678c086622f3e62c86cfdd4ace17d (patch) | |
tree | 9ba4d044f6c97e628f6b3f0a0a17f7cd5761f145 /web/lib | |
parent | 1fa2eacf8efc60c5dcc70f210de97d78780d1c2f (diff) | |
download | taginfo-ce94aac91f0678c086622f3e62c86cfdd4ace17d.tar taginfo-ce94aac91f0678c086622f3e62c86cfdd4ace17d.tar.gz |
Moved unused Potlatch stuff to test area. This needs some work before it is ready.
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/ui/sources/db.rb | 9 | ||||
-rw-r--r-- | web/lib/ui/sources/josm.rb | 20 | ||||
-rw-r--r-- | web/lib/ui/sources/merkaartor.rb | 9 | ||||
-rw-r--r-- | web/lib/ui/sources/potlatch.rb | 38 | ||||
-rw-r--r-- | web/lib/ui/sources/wiki.rb | 9 | ||||
-rw-r--r-- | web/lib/ui/test.rb | 34 |
6 files changed, 34 insertions, 85 deletions
diff --git a/web/lib/ui/sources/db.rb b/web/lib/ui/sources/db.rb deleted file mode 100644 index a1b6939..0000000 --- a/web/lib/ui/sources/db.rb +++ /dev/null @@ -1,9 +0,0 @@ -# web/lib/ui/sources/db.rb -class Taginfo < Sinatra::Base - - get! '/sources/db' do - @title = 'Database' - erb :'sources/db' - end - -end diff --git a/web/lib/ui/sources/josm.rb b/web/lib/ui/sources/josm.rb deleted file mode 100644 index 1583155..0000000 --- a/web/lib/ui/sources/josm.rb +++ /dev/null @@ -1,20 +0,0 @@ -# web/lib/ui/sources/josm.rb -class Taginfo < Sinatra::Base - - get! '/sources/josm' do - @title = 'JOSM' - erb :'sources/josm/index' - end - - get! '/sources/josm/styles' do - @title = ['Styles', 'JOSM'] - erb :'sources/josm/styles' - end - - get '/sources/josm/styles/:style' do - @stylename = h(params[:style]) - @title = [@stylename, 'Styles', 'JOSM'] - erb :'sources/josm/style' - end - -end diff --git a/web/lib/ui/sources/merkaartor.rb b/web/lib/ui/sources/merkaartor.rb deleted file mode 100644 index 96b3d19..0000000 --- a/web/lib/ui/sources/merkaartor.rb +++ /dev/null @@ -1,9 +0,0 @@ -# web/lib/ui/sources/merkaartor.rb -class Taginfo < Sinatra::Base - - get! '/sources/merkaartor' do - @title = 'Merkaartor' - erb :'sources/merkaartor/index' - end - -end diff --git a/web/lib/ui/sources/potlatch.rb b/web/lib/ui/sources/potlatch.rb deleted file mode 100644 index 3db69e5..0000000 --- a/web/lib/ui/sources/potlatch.rb +++ /dev/null @@ -1,38 +0,0 @@ -# web/lib/ui/sources/potlatch.rb -class Taginfo < Sinatra::Base - - get! '/sources/potlatch' do - @title = 'Potlatch' - - erb :'sources/potlatch/index' - end - - get '/sources/potlatch/categories' do - @title = 'Potlatch Features' - - @categories = @db.execute('SELECT * FROM potlatch.categories ORDER BY name') - - erb :'sources/potlatch/categories' - end - - get '/sources/potlatch/categories/:category' do - @category = params[:category] - @features = @db.execute('SELECT * FROM potlatch.features WHERE category_id=? ORDER BY name', @category) - - erb :'sources/potlatch/category', :layout => false - end - - get '/sources/potlatch/features/:feature' do - @feature_name = params[:feature] - @feature = @db.execute('SELECT * FROM potlatch.features WHERE name=?', @feature_name)[0] - @tags = @db.execute('SELECT * FROM potlatch.tags WHERE feature_name=? ORDER BY key, value', @feature_name) - - erb :'sources/potlatch/feature', :layout => false - end - - get %r{/sources/potlatch/icon/(.*)} do |icon| - content_type :png - send_file('../../var/sources/potlatch/resources/' + icon) - end - -end diff --git a/web/lib/ui/sources/wiki.rb b/web/lib/ui/sources/wiki.rb deleted file mode 100644 index 5260a36..0000000 --- a/web/lib/ui/sources/wiki.rb +++ /dev/null @@ -1,9 +0,0 @@ -# web/lib/ui/sources/wiki.rb -class Taginfo < Sinatra::Base - - get! '/sources/wiki' do - @title = 'Wiki' - erb :'sources/wiki/index' - end - -end diff --git a/web/lib/ui/test.rb b/web/lib/ui/test.rb index 296ecf6..2be2af0 100644 --- a/web/lib/ui/test.rb +++ b/web/lib/ui/test.rb @@ -25,4 +25,38 @@ class Taginfo < Sinatra::Base erb :'test/wiki_import' end + get! '/test/potlatch' do + @title = 'Potlatch' + + erb :'test/potlatch/index' + end + + get '/test/potlatch/categories' do + @title = 'Potlatch Features' + + @categories = @db.execute('SELECT * FROM potlatch.categories ORDER BY name') + + erb :'test/potlatch/categories' + end + + get '/test/potlatch/categories/:category' do + @category = params[:category] + @features = @db.execute('SELECT * FROM potlatch.features WHERE category_id=? ORDER BY name', @category) + + erb :'test/potlatch/category', :layout => false + end + + get '/test/potlatch/features/:feature' do + @feature_name = params[:feature] + @feature = @db.execute('SELECT * FROM potlatch.features WHERE name=?', @feature_name)[0] + @tags = @db.execute('SELECT * FROM potlatch.tags WHERE feature_name=? ORDER BY key, value', @feature_name) + + erb :'test/potlatch/feature', :layout => false + end + + get %r{/test/potlatch/icon/(.*)} do |icon| + content_type :png + send_file('../../var/sources/potlatch/resources/' + icon) + end + end |