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'
21-40 / 500 Alle rijen tonen
60voluptas repellendusTempora suscipit quibusdam rerum expedita aut.No02 Jun 12:37Edit
70autemSit ipsa aut qui quia voluptatem omnis.No25 Mar 12:37Edit
73iure architectoVoluptatum aperiam ad dolore aut fugit.No05 Apr 12:37Edit
74molestiaeAd dolores occaecati fuga ratione praesentium quo.No22 May 12:37Edit
76totamDistinctio et pariatur non est consequatur enim.No31 Mar 12:37Edit
84doloreOdio laboriosam velit pariatur ea autem distinctio.No04 Apr 12:37Edit
85voluptatibus inventoreHarum aliquam amet et inventore.Yes12 Jun 12:37Edit
94officiisIllum minus rerum expedita.No01 Apr 12:37Edit
96impedit explicabo voluptatemHic eveniet pariatur non nostrum.No02 Jun 12:37Edit
105autem quiaVelit voluptas impedit officia illo eveniet ullam.Yes09 Apr 12:37Edit
116dolorem consecteturNemo voluptate quo cum natus ut dolorum maxime consequuntur.No17 May 12:37Edit
118hicDolores voluptatem nobis repudiandae consequatur fugiat autem voluptas.No25 Mar 12:37Edit
119quo est aliquidFugiat reprehenderit est quia ducimus voluptatem maiores tempore id.No19 May 12:37Edit
129voluptates minima molestiaeMolestias enim voluptatibus voluptatem aut.No03 May 12:37Edit
132quiaNemo nostrum perspiciatis in iste neque omnis est.No17 Mar 12:37Edit
133optioDolores officia in et quam aliquid repellat rerum.No27 Mar 12:37Edit
140mollitiaEa pariatur eveniet omnis quae recusandae consectetur.No21 May 12:37Edit
144est errorQui facere accusantium sint iusto quod consectetur dolores.No15 Apr 12:37Edit
146adipisci etIncidunt porro iure esse.Yes06 Apr 12:37Edit
150qui remVoluptates deserunt non dolorem.No01 Jun 12:37Edit

Fork me on GitHub