summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2011-03-30 13:41:45 +0200
committermr <mr@mrautenberg.de>2011-03-30 13:41:45 +0200
commit1ceb48fa8a62f394ea2d622c4e6e0a4e198e8778 (patch)
treede900943b22b910adeb9fdf5a00837ceeb273fd5
parent592f509ec22dd3f742ee530c7b1692b1af05e528 (diff)
parentec743296fe370e8557acc338ae6559733c2e298d (diff)
Merge branch 'feature/create_policy_after_save' into development
-rw-r--r--application.rb1
-rw-r--r--model.rb2
-rw-r--r--public/external.gifbin0 -> 212 bytes
-rw-r--r--views/layout.haml2
-rw-r--r--views/lazar.haml4
-rw-r--r--views/model.haml2
-rw-r--r--views/style.sass3
7 files changed, 8 insertions, 6 deletions
diff --git a/application.rb b/application.rb
index d11dad4..a74fb47 100644
--- a/application.rb
+++ b/application.rb
@@ -252,7 +252,6 @@ post '/models' do # create a new model
# create summary
validation.summary(subjectid).each do |k,v|
- #LOGGER.debug "mr ::: k: #{k.inspect} - v: #{v.inspect}"
begin
eval "@model.update :#{k.to_s} => v" if v
rescue
diff --git a/model.rb b/model.rb
index 2b71eaa..58eeecf 100644
--- a/model.rb
+++ b/model.rb
@@ -49,7 +49,7 @@ class ToxCreateModel < Ohm::Model
attr_accessor :subjectid
@subjectid = nil
- #after :save, :check_policy
+ after :save, :check_policy
def validation_status
begin
diff --git a/public/external.gif b/public/external.gif
new file mode 100644
index 0000000..6114959
--- /dev/null
+++ b/public/external.gif
Binary files differ
diff --git a/views/layout.haml b/views/layout.haml
index 2a96636..c849dec 100644
--- a/views/layout.haml
+++ b/views/layout.haml
@@ -50,4 +50,4 @@
&copy;
%a{:href => 'http://www.in-silico.ch', :rel => "external"} in silico toxicology
2009-2010, powered by
- %a{:href => 'http://www.opentox.org', :rel => "external"} <span style="color:#5D308A;font-family:arial,sans-serif,helvetica;letter-spacing:-1px;">Open</span><span style="color:#000;font-family:arial,sans-serif,helvetica;font-weight:bold;letter-spacing:-1px;position:relative;">Tox</span>
+ %a{:href => 'http://www.opentox.org', :rel => "external"} <span style="color:#5D308A;font-family:arial,sans-serif,helvetica;letter-spacing:-1px;">Open</span><span style="color:#000;font-family:arial,sans-serif,helvetica;font-weight:bold;letter-spacing:-1px;">Tox</span>
diff --git a/views/lazar.haml b/views/lazar.haml
index d52a645..deb0c18 100644
--- a/views/lazar.haml
+++ b/views/lazar.haml
@@ -39,10 +39,10 @@
%a{:href => "http://ambit.uni-plovdiv.bg:8080/ambit2/query/structure/?search=#{@compound.smiles}", :rel => "external"} Ambit data
-# %li
%a{:href => "http://www.ncbi.nlm.nih.gov/sites/entrez?cmd=PureSearch&db=pccompound&term=#{URI.encode('"'+@compound.inchi+'"[InChI]')}", :rel => "external"} PubChem data
- (external)
+ (external)
-# %li
%a{:href => "http://chem.sis.nlm.nih.gov/chemidplus/direct.jsp?result=advanced&inchi=#{URI.encode @compound.inchi}", :rel => "external"} ToxNet data
- -#http://chem.sis.nlm.nih.gov/chemidplus/direct.jsp?result=advanced&regno=000143157
+ -#http://chem.sis.nlm.nih.gov/chemidplus/direct.jsp?result=advanced&regno=000143157
%tr#names{ :style => "display: none;" }
%td{:colspan => '4'}
diff --git a/views/model.haml b/views/model.haml
index cd87757..4933cdb 100644
--- a/views/model.haml
+++ b/views/model.haml
@@ -28,7 +28,7 @@
//= haml :model_progress, :locals=>{:percentage_completed=>percentage_completed}, :layout => false
- if is_authorized(model.web_uri, "DELETE")
%a{:href => url_for("/model/#{model.id}"), :id => "delete_#{model.id}", :class => 'delete_link'}
- - if model.status == "Completed"
+ - if model.status =~ /Completed|Error|Cancelled/
(delete)
- else
(stop)
diff --git a/views/style.sass b/views/style.sass
index db1f1bf..0588444 100644
--- a/views/style.sass
+++ b/views/style.sass
@@ -18,6 +18,9 @@ body
color: $ot_purple
a:hover
color: black
+ a[rel="external"]
+ background: transparent url('../external.gif') center right no-repeat
+ padding-right: 15px
.headline
.logo