WiceGrid 3.6.0.pre4 examples

Most simple grid

The simplest grid is defined by the grid helper with column blocks inside for each column. The value of each column block is the contents of a cell.

  • # encoding: utf-8
    class Basics1Controller < ApplicationController
      def index
        @tasks_grid = initialize_grid(Task)
      end
    end
    
  • <%= grid(@tasks_grid) do |g|
    
      g.column do |task|
        task.id
      end
    
      g.column  do |task|
        task.title
      end
    
      g.column do |task|
        task.description
      end
    
      g.column do |task|
        task.archived? ? 'Yes' : 'No'
      end
    
      g.column do |task|
        task.created_at.to_s(:short)
      end
    
      g.column do |task|
        link_to('Edit', edit_task_path(task))
      end
    end -%>
    
  • .well
      %h2= current_page_title
      %p
        The simplest grid is defined by the
        %code grid
        helper with column blocks inside  for each column.
        The value of each column block is the contents of a cell.
    
    = show_code
    
    .row-fluid
      .col-md-12
        = render   'grid'
1-20 / 500 Alle rijen tonen
31debitis pariatur illoTemporibus velit id et porro dolor.Yes18 May 12:37Edit
168adDolorum id sint assumenda quos consectetur aut eveniet.No25 Apr 12:37Edit
184minusVoluptatem harum fuga est hic fugit.No05 Apr 12:37Edit
188aliquid adipisciEaque maxime mollitia in vel.No21 May 12:37Edit
211et dictaExpedita tempore numquam unde ut quaerat iure est.No22 Apr 12:37Edit
240illoMolestias nostrum quis itaque sed.No24 May 12:37Edit
243molestiae similiqueLabore et dolor architecto dolorum aut recusandae.No06 Apr 12:37Edit
280corporisVoluptate et necessitatibus distinctio et.No13 May 12:37Edit
343dolorem sit molestiasEaque exercitationem aut dolorem amet.No18 Apr 12:37Edit
362eum sapienteQuos adipisci dolorem vel numquam sint.No11 May 12:37Edit
367similiqueNeque fuga recusandae expedita omnis et.Yes07 May 12:37Edit
389utVoluptatem hic sapiente perspiciatis quos expedita et velit.No28 May 12:37Edit
392velit vitaeVero tenetur ex et totam nam natus aperiam doloremque.No16 May 12:37Edit
393nihilAut non incidunt omnis assumenda.Yes18 Apr 12:37Edit
423magni eosTempore sunt voluptatum officia sapiente dolorem.No13 May 12:37Edit
455etRerum unde adipisci praesentium ut dolore ea quia debitis.No14 Apr 12:37Edit
481etEveniet repellendus necessitatibus nam neque.No05 Jun 12:37Edit
495qui ut inQuis ut eos a et.No21 Apr 12:37Edit
33voluptatemDolorem saepe et aspernatur.No04 May 12:37Edit
85voluptatibus inventoreHarum aliquam amet et inventore.Yes12 Jun 12:37Edit

Fork me on GitHub