Sha256: 288c4c551a5c01dd2919014336d165f5f66bec57f10089227814fd49d816ece3

Contents?: true

Size: 1.21 KB

Versions: 13

Compression:

Stored size: 1.21 KB

Contents

<h1>Listing products</h1>

<%= table_for @products,
  # :after_table_controls => [:paginator, "Hahaha!", :info_text],
  :control_div_class_after => nil,
  # :translate => proc {|x| "`#{x}`"},
  :batch_actions_type => :buttons,
  # :select_controls => [:select_all, :select_none],
  :batch_actions => {
    :activate => "Activate",
    :deactivate => "Deactivate",
    :foo => "Foo"
  } do |t|
  t.checkbox :html => {:class => 'muff'}
  t.column :id, :filter => false, :align => :right, :header => "id"
  t.column :title, :filter => :like, :link => :product_url
  t.column :price, :align => :right, :format => :euro, #"%.2f&thinsp;&euro;",
    :filter => :range, :filter_width => '20px', :range_filter_symbol => ' bis '
  t.column :active, :filter => { 'ja' => 't', 'nein' => 'f' }
  t.column :description do |record|
    record.description[0..40]
  end
  t.association :vendor, :id, :method => :name, :header => "Vendor".l,
    :filter => Vendor.all.map{|v| [v.name, v.id] }
  t.association :tags, :title, :join_symbol => ', ', :format => proc {|a| "[#{a.upcase}]" }
  t.action :header => 'Actions', :filter => false do |record|
    link_to "Edith", edit_product_url(record)
  end
end %>

<%= link_to 'New Product', new_product_path %>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
tabulatr-0.4.2 spec/dummy_app/app/views/products/index.html.erb
tabulatr-0.4.1 spec/dummy_app/app/views/products/index.html.erb
tabulatr-0.4.0 spec/dummy_app/app/views/products/index.html.erb
tabulatr-0.3.0 spec/dummy_app/app/views/products/index.html.erb
tabulatr-0.2.0 spec/dummy_app/app/views/products/index.html.erb
tabulatr-0.1.3 spec/dummy_app/app/views/products/index.html.erb
tabulatr-0.1.2 spec/dummy_app/app/views/products/index.html.erb
tabulatr-0.1.1 spec/dummy_app/app/views/products/index.html.erb
tabulatr-0.1.0 spec/dummy_app/app/views/products/index.html.erb
tabulatr-0.0.5 spec/dummy_app/app/views/products/index.html.erb
tabulatr-0.0.4 spec/dummy_app/app/views/products/index.html.erb
tabulatr-0.0.3 spec/dummy_app/app/views/products/index.html.erb
tabulatr-0.0.2 spec/dummy_app/app/views/products/index.html.erb