summaryrefslogtreecommitdiff
path: root/views/model.haml
blob: 79287f0f461c6dc6720f386794cb9789a366672d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
- uri = url_for("/model/#{model.id}", :full)
- js = "$('#delete_#{model.id}').deleteModel('DELETE', {elem: '#model_#{model.id}'});\n  " + "$('#show_model_#{model.id}_warnings').toggleWarnings('#{model.id}');"
:javascript
  $(function() {
    #{js}
  });
  
%div{:id => "model_#{model.id}"}  
  %h2
    = model.name

  .model
    %dl
      %dt Status:
      %dd
        %span{:id => "model_#{model.id}_status", :class => model.status}
          = haml :model_status, :locals=>{:model=>model}, :layout => false 
        (
        %a{:href => url_for("/model/#{model.id}"), :id => "delete_#{model.id}", :class => 'delete'} delete
        )
      %dt Started:
      %dd= model.created_at.strftime("%m/%d/%Y - %I:%M:%S%p")
      %dt Training compounds:
      %dd= model.nr_compounds
      %dt Warnings:
      - if model.warnings == ''
        %dd -
      - else
        %a{:href => "#", :id => "show_model_#{model.id}_warnings"} show
        %dd{:id => "model_#{model.id}_warnings", :style => "display: none;"}= model.warnings
  
      - if model.status == 'Completed'
        %dt Algorithm:
        %dd
          = toggle_link("#lazar_description","lazar")
        %dt Type:
        %dd= toggle_link("##{model.type}","#{model.type}")
        %dt Descriptors:
        %dd
          %a{:href => 'http://www.maunz.de/libfminer2-bbrc-doc/'} Fminer backbone refinement classes
        %dt Training dataset:
        %dd
          %a{:href => "#{model.training_dataset}.xls"} Excel sheet
          ,
          -#%a{:href => "#{model.training_dataset}.rdf"} RDF/XML
          -#%em (experts) ,
          %a{:href => "#{model.training_dataset}.yaml"} YAML
          %em  (experts)
        %dt Feature dataset:
        %dd
          -#%a{:href => "#{model.feature_dataset}.rdf"} RDF/XML
          -#,
          %a{:href => "#{model.feature_dataset}.yaml"} YAML
          %em  (experts, dataset too large for Excel)
        %dt Model:
        %dd{:id => "model_qmrf_#{model.id}"}
          %input{ :id => "model_validation_qmrf_#{model.id}", :type => "hidden", :value => "#{model.validation_qmrf_status}", :class => "model_validation_qmrf" }
          -#%a{:href => "#{model.uri}.rdf"} RDF/XML
          -#,
          - unless model.validation_qmrf_uri.nil?
            %a{:href => File.join(model.validation_qmrf_uri,"editor")} QMRF Editor, 
          %a{:href => "#{model.uri}.yaml"} YAML
          %em  (experts, models cannot be represented in Excel)
        = haml :validation, :locals=>{:model=>model}, :layout => false