diff options
author | Christoph Helma <helma@in-silico.ch> | 2011-03-31 13:47:34 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2011-03-31 13:47:34 +0200 |
commit | f57103720c82700f7e43d54707e9381668f0fb67 (patch) | |
tree | 2c235a1c87f01aed637389785403d4f233685198 | |
parent | b379818883b17fb9883049b528b858925e48d486 (diff) |
ambit endpint selection started
-rw-r--r-- | application.rb | 6 | ||||
-rw-r--r-- | views/endpoints.haml | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/application.rb b/application.rb index 44adf89..9583411 100644 --- a/application.rb +++ b/application.rb @@ -175,6 +175,12 @@ get %r{/compound/(.*)} do |inchi| OpenTox::Compound.from_inchi(inchi).to_names.join(', ') end +get '/endpoints' do + #@endpoint = params[:endpoint] + @endpoints = OpenTox::Ontology::Echa.endpoints#(params[:endpoint]) + haml :endpoints +end + post '/models' do # create a new model unless params[:file] and params[:file][:tempfile] #params[:endpoint] and flash[:notice] = "Please upload a Excel or CSV file." diff --git a/views/endpoints.haml b/views/endpoints.haml new file mode 100644 index 0000000..fc41190 --- /dev/null +++ b/views/endpoints.haml @@ -0,0 +1,10 @@ +%form{ :action => url_for('/endpoints'), :method => "get" } + + - @endpoints.each do |endpoint,datasets| + %h2= endpoint.split('#').last + " " + datasets.size.to_s + - datasets.each do |dataset| + %br + %input{:type=>'radio', :name => "dataset", :value => dataset} #{dataset} + + %p + %input{:type => 'submit'} |