Sha256: 146bf047ab92251c97e58b8c6bd5f8a7086bfd1b00e0933c05d963178a35b142

Contents?: true

Size: 710 Bytes

Versions: 43

Compression:

Stored size: 710 Bytes

Contents

# frozen_string_literal: true

module Spotlight
  # HTML <meta> tag helpers
  module JobTrackersHelper
    def job_status_icon(job_tracker)
      content_tag :span, title: t(job_tracker.status || 'missing', scope: 'spotlight.job_trackers.status') do
        if job_tracker.enqueued? || job_tracker.in_progress?
          '⏱'
        elsif job_tracker.completed?
          '✅'
        elsif job_tracker.failed?
          '🟥'
        else
          ''
        end
      end
    end

    def job_tracker_event_table_row_class(event)
      case event.type
      when 'error'
        'table-danger'
      when 'info', 'summary'
        ''
      else
        "table-#{event.type}"
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
blacklight-spotlight-4.6.1 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.6.0 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.5.0 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.4.0 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.3.6 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.3.5 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.3.4 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.3.3 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.3.2 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.3.1 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.3.0 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.2.0 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.1.2 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.1.1 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.1.0 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.0.3 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.0.2 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.0.1 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-4.0.0 app/helpers/spotlight/job_trackers_helper.rb
blacklight-spotlight-3.6.0.beta10 app/helpers/spotlight/job_trackers_helper.rb