diff options
author | gebele <gebele@in-silico.ch> | 2013-03-15 13:47:38 +0100 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2013-03-15 13:47:38 +0100 |
commit | 53321ba549175f7ffb40a5d5515a0047f369203d (patch) | |
tree | 06bfc29319c2b34122fe15c9a25f684fa89405ad /views | |
parent | d5649c3bb4eb992c722c24c7fa96a912df2cbf8f (diff) |
version with iframes for neighbours and details view
Diffstat (limited to 'views')
-rw-r--r-- | views/details.haml | 13 | ||||
-rw-r--r-- | views/layout.haml | 3 | ||||
-rw-r--r-- | views/neighbours.haml | 6 | ||||
-rw-r--r-- | views/predict.haml | 5 | ||||
-rw-r--r-- | views/prediction.haml | 10 |
5 files changed, 26 insertions, 11 deletions
diff --git a/views/details.haml b/views/details.haml index 824da91..ffa347c 100644 --- a/views/details.haml +++ b/views/details.haml @@ -1,4 +1,15 @@ %link{ :href=>"/stylesheets/screen.css", :media=>"screen, projection", :rel=>"stylesheet", :type=>"text/css"} .details - info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken info names smiles inchies Eigenschaften physic chem Verwandte links zu anderen Datenbanken + %img{:src=>"#{@compound.uri}/image", :alt=>@compound.uri, :width=>"100px"} + %p + SMILES: + = @compound.smiles + + %p + // TODO handle OpenTox::ResourceNotFoundError + Names: + = @compound.names + + %p + = @compound.inchi.gsub("InChI=", "InChI: ") diff --git a/views/layout.haml b/views/layout.haml index 7bb62c3..341ae25 100644 --- a/views/layout.haml +++ b/views/layout.haml @@ -12,7 +12,8 @@ %body .logo - %img{:src=>"/images/ist_logo.png"} + %a{:href=> to('/predict')} + %img{:src=>"/images/ist_logo.png"} %h1 Lazar Toxicity Predictions .content diff --git a/views/neighbours.haml b/views/neighbours.haml index 0a266b5..6170d43 100644 --- a/views/neighbours.haml +++ b/views/neighbours.haml @@ -8,7 +8,7 @@ - count_m = 0 :javascript $(function() { - $("#tabs").tabs(); + $("#tabs").tabs({ active: '#{params[:id]}' }); }); #tabs %ul @@ -20,7 +20,7 @@ - count_rs = 0 - @@predictions.each do |pa| - count_rs += 1 - #results{:id=>"#{count_m}"} + #results{:id=>"#{count_rs}"} - pa.each do |p| / get prediction OpenTox::Dataset - p.get @@ -65,7 +65,7 @@ = p.data_entries[count][3].round(3) %td - %a{:href => to('/prediction/neighbours/details'), :id=>"link#{neighbour_compound.uri}/#{count}", :target=>"details"} + %a{:href => to("/prediction/#{CGI.escape(neighbour_compound.uri)}/details"), :id=>"link#{neighbour_compound.uri}/#{count}", :target=>"details"} %img{:src=>"/images/arrow_right_float.png", :alt=>"arrow"} - count += 1 diff --git a/views/predict.haml b/views/predict.haml index be2134b..8ee3558 100644 --- a/views/predict.haml +++ b/views/predict.haml @@ -69,4 +69,7 @@ %fieldset#bottom - %input{ :type => "submit", :value=>"3. Predict", :onclick => "getsmiles();"} + %a{:href => "#predict", :id => "linkPredict"} + %h1 3. Predict + %input{ :type => "submit", :value=>">>", :onclick => "getsmiles();"} + diff --git a/views/prediction.haml b/views/prediction.haml index 623275d..47a4dfa 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -21,7 +21,7 @@ - p.get %td %b= @@prediction_models[count].title - - count+=1 + %br = "Result:\n" %b= p.data_entries[0][1] @@ -29,11 +29,11 @@ = "Confidence:\n" = p.data_entries[0][2].round(3) %br - %a{:href=> to("/prediction/neighbours"), :target=> "neighbours"} + %a{:href=> to("/prediction/neighbours/#{count}"), :target=> "neighbours"} %img{:src=>"/images/arrow_down_float.png", :alt=>"arrow"} + - count+=1 - - %iframe{:name=>"neighbours", :width=>"50%", :height=>"400px", :style=>"float:left; border:0px"} - %iframe{:name=>"details", :width=>"50%", :height=>"400px", :style=>"border:0px"} + %iframe{:id=>"neighbours", :name=>"neighbours", :width=>"50%", :height=>"400px", :style=>"float:left; border:0px"} + %iframe{:id=>"details", :name=>"details", :width=>"50%", :height=>"400px", :style=>"border:0px"} |