summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2013-09-11 17:50:13 +0200
committergebele <gebele@in-silico.ch>2013-09-11 17:50:13 +0200
commit3ae04ef7fac5bbc20f464c1cb29c8ffebc820dce (patch)
tree8d8cf704572f3a8c7fcf09668647401df16f7f0c /views
parent27943bda280ffbb3f2a7d147dc02be1eb8b7ea2d (diff)
added ote logo
Diffstat (limited to 'views')
-rw-r--r--views/layout.haml5
-rw-r--r--views/neighbors.haml5
-rw-r--r--views/prediction.haml11
3 files changed, 18 insertions, 3 deletions
diff --git a/views/layout.haml b/views/layout.haml
index c1b2ac0..c7f31b6 100644
--- a/views/layout.haml
+++ b/views/layout.haml
@@ -21,7 +21,10 @@
.logo
%a{:href=> to("/predict")}
%img{:src=>"/images/ist_logo.png", :alt=>"logo"}
- %h1 Lazar Toxicity Predictions
+ %h1 Lazar Toxicity Predictions
+
+ %a{:href=> "http://www.opentox.org/news/opentoxeu2013news1"}
+ %img{:src=>"/images/OpenToxEuro2013.png", :alt=>"OpenToxEuro2013", :class => "ote"}
%hr
.content
diff --git a/views/neighbors.haml b/views/neighbors.haml
index ceef79c..750b615 100644
--- a/views/neighbors.haml
+++ b/views/neighbors.haml
@@ -97,7 +97,10 @@
%td.compound
%img{:src=>"#{neighbor_compound.uri}/image", :alt=>"Compound image not available", :width=>"150px"}
%td{:class => c[0]}
- = c[0] #p.data_entries[count][2]
+ - if c.class == String
+ = c
+ - else
+ = c[0]
%td{:class => c[0]}
= p.data_entries[count][3] != nil ? p.data_entries[count][3].round(3) : "Not enough similar compounds in training dataset."
%td
diff --git a/views/prediction.haml b/views/prediction.haml
index c4ef460..7f94a2e 100644
--- a/views/prediction.haml
+++ b/views/prediction.haml
@@ -44,14 +44,23 @@
- c = "non-carcinogen"
- when /(1|true)/
- c = "carcinogen"
+ - else
+ - c = Array.new
+ - c[0] = p.data_entries[0][0].round(3)
%td
%b{:class => "title"}
= @@prediction_models[count].title.split(" ").first
%br
%br
+ / classification, regression
+ %b Type:
+ %br
%b Result:
%b{:class => c[0]}
- = (c != '' ? c : "No prediction result.")
+ - if c.class == String
+ = (c != '' ? c : "No prediction result.")
+ - else
+ = (c[0] != '' ? c[0] : "No prediction result.")
/ title must be empty for tooltip
%a{:href=>"#result", :title=>"", :id=>"result"}
%img{:src=>"/images/info_white.png"}