summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2011-02-08 18:31:02 +0100
committermr <mr@mrautenberg.de>2011-02-08 18:31:02 +0100
commitce68f6a763ce8de8957f84af4f52dbe1d74cd232 (patch)
tree28424895491d50870dc6126fc60cc01006284f55 /views
parent076de3e6bdde29936926814409bdce4b0c7b7477 (diff)
minor fixes and graphical progressbar from jquery-ui
Diffstat (limited to 'views')
-rw-r--r--views/layout.haml4
-rw-r--r--views/model.haml14
-rw-r--r--views/style.sass7
-rw-r--r--views/validation.haml2
4 files changed, 20 insertions, 7 deletions
diff --git a/views/layout.haml b/views/layout.haml
index 78af858..d54b413 100644
--- a/views/layout.haml
+++ b/views/layout.haml
@@ -6,7 +6,9 @@
%title ToxCreate
%script{:type => "text/javascript", :src => "javascripts/jquery.js"}
%script{:type => "text/javascript", :src => "javascripts/toxcreate.js"}
- %link{:rel=>'stylesheet', :href=>'stylesheets/style.css', :type => "text/css"}
+ %script{:type => "text/javascript", :src => "javascripts/jquery-ui-progressbar.js"}
+ %link{:rel=>'stylesheet', :href=>'stylesheets/style.css', :type => "text/css"}
+ %link{:rel=>'stylesheet', :href=>'progressbar/progressbar.css', :type => "text/css"}
%body
.logo
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
diff --git a/views/style.sass b/views/style.sass
index 27bf6fe..a2b8191 100644
--- a/views/style.sass
+++ b/views/style.sass
@@ -249,4 +249,9 @@ dl
background-color: #FEFEFF
.edit_button
- font-size: 0.5em \ No newline at end of file
+ font-size: 0.5em
+
+.model_progress
+ width: 240px
+ height: 20px
+ float: right \ No newline at end of file
diff --git a/views/validation.haml b/views/validation.haml
index 5fc7371..ce35536 100644
--- a/views/validation.haml
+++ b/views/validation.haml
@@ -8,7 +8,7 @@
- if model.validation_report_uri
%dt Detailed report:
%dd
- %a{:href => model.validation_report_uri, :target => "_blank"} show
+ %a{:href => model.validation_report_uri + subjectstring, :target => "_blank"} show
%dt Number of predictions
%dd= model.nr_predictions
- case model.type