Sha256: 7dc8521a138c15da8789bfe06ee1dd9aaf2f44de3f76ba7cbf24f47a1cffd8f1

Contents?: true

Size: 1.64 KB

Versions: 26

Compression:

Stored size: 1.64 KB

Contents

paginated_collection(Kaminari.paginate_array(terminal.pings).page(params[:page]).per(15), download_links: false) do
  table_for(collection, :class => 'index_table index', :i18n => TerminalPing) do |t|
    t.column :created_at
    t.column :condition do |x|
      status_tag I18n.t("smartkiosk.terminal_conditions.#{x.condition}"), x.condition.to_sym
    end
    t.column :state do |x|
      I18n.t "smartkiosk.terminal_states.#{x.state}"
    end
    t.column :version
    t.column :ip
    t.column :queues do |x|
      ul do
        x.queues.each do |queue, count|
          li :style => 'white-space: nowrap' do
            b queue+':'
            span count
          end
        end
      end
    end
    t.column :banknotes do |x|
      ul do
        x.banknotes.each do |banknote, count|
          li :style => 'white-space: nowrap' do
            b banknote+':'
            span count
          end
        end
      end
    end
    Terminal::HARDWARE.each do |hardware|
      t.column :"#{hardware}_error" do |x|
        div :style => 'white-space: nowrap' do
          if x.error(hardware).blank?
            status_tag I18n.t('formtastic.no'), :ok
          else
            status_tag(
              (
                I18n.t("smartkiosk.hardware.#{hardware}.errors")[x.error(hardware)] ||
                I18n.t('smartkiosk.unlocalized') + " (#{x.error(hardware)})"
              ),
              :error
            )
          end
        end
      end
    end
    t.column :cash_sum
    t.column :cash_count
    t.column :cash_acceptor_version
    t.column :printer_version
    t.column :modem_balance
    t.column :modem_signal_level
    t.column :modem_version
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
smartkiosk-server-0.13.1 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.13 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.12.1 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.12 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.11.11 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.11.10 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.11.9 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.11.8 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.11.7 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.11.6 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.11.5 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.11.4 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.11.3 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.11.2 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.11.1 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.11 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.10.19 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.10.18 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.10.17 app/views/admin/terminals/pings.html.arb
smartkiosk-server-0.10.16 app/views/admin/terminals/pings.html.arb