Sha256: ba1833fe875e4b5262214b86a87c78baf7737b2ea80bc18d1d691ea1e290931e

Contents?: true

Size: 1.19 KB

Versions: 2

Compression:

Stored size: 1.19 KB

Contents

- if locals.include? :jobname or locals.include? "jobname"
  = workflow_partial("partials/_job_control", workflow, task, locals)

- result_type = result_type.to_sym if String === result_type
- case result_type
- when :string
  = result.to_s
- when :float
  = "%.3f" % result.to_f
- when :integer
  = result.to_i
- when :yaml
  %dl
    - result.each do |key, value|
      %dt= key
      - if Array === value
        %dd= value * ", "
      - else
        %dd= value

- when :boolean
  = result.to_s

- when :array
  %ul
    - if locals.include? :result_description and defined? Entity and Entity.respond_to? :formats and Entity.formats.include? locals[:result_description] and Entity.formats[locals[:result_description]].include? Entity::REST
      - if Entity.formats[locals[:result_description]].annotations.first == :format
        - Entity.formats[locals[:result_description]].setup(result, locals[:result_description])
      - else
        - Entity.format[locals[:result_description]].setup(result)
      - result.each do |res|
        %li= res.link
    - else
      - result.each do |res|
        %li= res
- when :tsv
  = workflow_partial("partials/_result_table", workflow, task, locals.merge(:page => "1"))

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rbbt-views-1.0.1 share/views/result.haml
rbbt-views-1.0.0 share/views/result.haml