summaryrefslogtreecommitdiff
path: root/views/model.haml
diff options
context:
space:
mode:
Diffstat (limited to 'views/model.haml')
-rw-r--r--views/model.haml14
1 files changed, 10 insertions, 4 deletions
diff --git a/views/model.haml b/views/model.haml
index 32439a9..52d143c 100644
--- a/views/model.haml
+++ b/views/model.haml
@@ -14,11 +14,17 @@
%dd
%span{:id => "model_#{model.id}_status", :class => "model_status"}
= haml :model_status, :locals=>{:model=>model}, :layout => false
- - if model.task_uri && model.status != "Completedss"
+ - if model.task_uri && model.status != "Completed"
- if (task = OpenTox::Task.exist?(model.task_uri))
- percentage_completed = task.metadata[OT.percentageCompleted]
- %span{:id => "model_#{model.id}_progress", :class => "model_progress"}
- = haml :model_progress, :locals=>{:percentage_completed=>percentage_completed}, :layout => false
+ - js = "$('#model_#{model.id}_progress').progressbar({ value: #{percentage_completed} })";
+ :javascript
+ $(function() {
+ #{js}
+ });
+
+ %div{:id => "model_#{model.id}_progress", :class => "model_progress"}
+ //= 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'}
@@ -75,4 +81,4 @@
%a{:href => File.join(model.validation_qmrf_uri,"editor")} QMRF Editor,
%a{:href => "#{model.uri}.yaml#{subjectstring}"} YAML
%em (experts, models cannot be represented in Excel)
- = haml :validation, :locals=>{:model=>model}, :layout => false
+ = haml :validation, :locals=>{:model=>model,:subjectstring => subjectstring}, :layout => false