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
    
  • .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'
  • <%= 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 -%>
    
1-20 / 500 Voir tous
499voluptatemMagnam accusantium id aut et quaerat praesentium eveniet.No09 May 12:37Edit
498sedQui sint eos distinctio vel assumenda sed animi quae.Yes05 Apr 12:37Edit
496velit non pariaturQuia possimus rerum eum architecto.Yes07 Apr 12:37Edit
493estCorporis vel omnis et quam illo.No28 May 12:37Edit
484quiaMolestias ut reprehenderit ipsum quod corporis dolore debitis iste.No06 May 12:37Edit
478necessitatibusQui omnis tempora velit.No10 May 12:37Edit
476facere voluptasOccaecati consectetur neque ullam dolores qui.Yes21 May 12:37Edit
475rerum perspiciatis eumSoluta non et temporibus.No20 Apr 12:37Edit
469natus autemSed deleniti iste et eos magnam delectus in sequi.Yes10 Jun 12:37Edit
467in error praesentiumEarum temporibus quae laudantium.No12 May 12:37Edit
466autIllum corporis occaecati quia quo aut ratione voluptatem.No19 Mar 12:37Edit
457asperiores qui nonIllum consequatur laboriosam iusto praesentium sed dolore.No15 May 12:37Edit
456inventore voluptasQuis molestiae ipsa omnis blanditiis ut dolores.No31 May 12:37Edit
454similique enim odioEa cupiditate sit ex aut laudantium voluptatem.No14 Mar 12:37Edit
447animi accusantium utSequi dolorem distinctio sit doloremque et corporis voluptatem alias.No06 Apr 12:37Edit
443ullam laudantium commodiEaque tempora non quia sit quia perspiciatis mollitia.No18 May 12:37Edit
442ut voluptatemQuibusdam et veniam ut.No10 Jun 12:37Edit
439namUnde eos dolore quis quo.No23 May 12:37Edit
435eos deseruntQuia amet occaecati et non sed repudiandae voluptatibus id.No20 Apr 12:37Edit
427quae assumendaConsequatur iure et odio nulla tenetur.No15 May 12:37Edit

Fork me on GitHub