summaryrefslogtreecommitdiff
path: root/views/predict.haml
diff options
context:
space:
mode:
Diffstat (limited to 'views/predict.haml')
-rw-r--r--views/predict.haml84
1 files changed, 84 insertions, 0 deletions
diff --git a/views/predict.haml b/views/predict.haml
new file mode 100644
index 0000000..2de8b75
--- /dev/null
+++ b/views/predict.haml
@@ -0,0 +1,84 @@
+:javascript
+ function getsmiles() {
+ if (document.JME.smiles() != '') {
+ document.form.identifier.value = document.JME.smiles() ;
+ }
+ }
+
+%form{:name => "form", :action => to('/predict'), :method => "post", :enctype => "multipart/form-data" }
+ %fieldset#top
+ %a{:href => "#insert", :id => "linkInsert#{p.object_id}"}
+ %h1 1. Draw or insert your compound
+ :javascript
+ $("a#linkInsert#{p.object_id}").click(function () {
+ $("#insert").toggle();
+ document.location = document.location + "#" + "insert";
+ });
+ #insert{ :style => "display: none" }
+ %p
+ %label  
+ .jme
+ %applet{:code => "JME.class", :name => "JME", :archive => "JME.jar", :width => "500", :height => "360"}
+ %param{ :name => "options", :value => "polarnitro"}
+ Please enable Java and JavaScript in your browser to use the JME editor.
+ %span{:style=>"font-size:75%"}
+ ©
+ %a{:href => 'http://www.molinspiration.com/jme/index.html', :rel => "external"} JME Editor
+ courtesy of Peter Ertl, Novartis
+ %br
+ %label{:for => 'identifier'}
+ or enter the
+ %a{:href => "http://en.wikipedia.org/wiki/Simplified_molecular_input_line_entry_specification", :rel => "external"} SMILES
+ string
+ %input{:type => 'text', :name => 'identifier', :id => 'identifier', :size => '60'}
+
+ .close
+ = hide_link "#insert"
+
+ .arrow
+ %img{:src=>"/images/arrow_down_float.png", :alt=>"arrow", :class=> "arrow"}
+
+
+ %fieldset#middle
+ %a{:href => "#models", :id => "linkModels#{p.object_id}"}
+ %h1 2. Select one or more toxic endpoints
+
+ :javascript
+ $("a#linkModels#{p.object_id}").click(function () {
+ $("#models").toggle();
+ document.location = document.location + "#" + "models";
+ });
+
+ #models{ :style => "display: none;"}
+ %p Description about these models.
+ %br
+ - @models.each do |model|
+ %input{:type => 'checkbox', :name => "selection[#{model.title}]", :value => "#{model.metadata}", :uri => "#{model.uri}", :disabled => false}
+ %model= model.title
+ %p= model.metadata["#{RDF::DC.modified}"]
+ %br
+
+ .close
+ = hide_link "#models"
+
+ .arrow
+ %img{:src=>"/images/arrow_down_float.png", :alt=>"arrow", :class=> "arrow"}
+
+
+ %fieldset#bottom
+ %a{:href => "#predict", :id => "linkPredict#{p.object_id}"}
+ %h1 3. Predict
+
+ :javascript
+ $("a#linkPredict#{p.object_id}").click(function () {
+ $("#predict").toggle();
+ document.location = document.location + "#" + "predict";
+ });
+
+ #predict{ :style => "display: none;"}
+ %p Display the prediction including neighbours and sort mechanism
+ %br
+ %input{ :type => "submit", :value => "Predict", :onclick => "getsmiles();"}
+
+ .close
+ = hide_link "#predict"