Sha256: b5a309e0bcdf5e465b46a8f1c7532b187439316e66ac3d7035a0d02da3dc1024

Contents?: true

Size: 357 Bytes

Versions: 13

Compression:

Stored size: 357 Bytes

Contents

module Adhoq::ExecutionDecorator
  def status_label
    content_tag :span, class: ["label", status_label_class] do
      status
    end
  end

  def status_label_class
    case status
    when "success"
      "label-success"
    when "failure"
      "label-danger"
    when "requested"
      "label-default"
    else
      "label-default"
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
adhoq-1.0.2 app/decorators/adhoq/execution_decorator.rb
adhoq-1.0.1 app/decorators/adhoq/execution_decorator.rb
adhoq-1.0.0 app/decorators/adhoq/execution_decorator.rb
adhoq-0.5.0 app/decorators/adhoq/execution_decorator.rb
adhoq-0.5.0.beta1 app/decorators/adhoq/execution_decorator.rb
adhoq-0.4.0 app/decorators/adhoq/execution_decorator.rb
adhoq-0.3.0 app/decorators/adhoq/execution_decorator.rb
adhoq-0.2.0 app/decorators/adhoq/execution_decorator.rb
adhoq-0.1.2 app/decorators/adhoq/execution_decorator.rb
adhoq-0.1.1 app/decorators/adhoq/execution_decorator.rb
adhoq-0.1.0 app/decorators/adhoq/execution_decorator.rb
adhoq-0.0.7 app/decorators/adhoq/execution_decorator.rb
adhoq-0.0.6 app/decorators/adhoq/execution_decorator.rb