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'
101-120 / 500 Alle rijen tonen
214eumUt dolor qui dolore.No25 Apr 12:37Edit
203soluta possimus estIllum ut molestiae et officia aut earum.No28 May 12:37Edit
201voluptasEt ut autem at ex voluptatibus assumenda.No16 Mar 12:37Edit
198eaDolorum voluptates quae veniam porro repudiandae nam eos qui.No24 Apr 12:37Edit
197non autemHarum eum labore ad.No25 May 12:37Edit
196laudantiumRecusandae modi sed hic doloribus vel.No01 May 12:37Edit
193idQuia voluptas sit aut sed maiores accusantium soluta.No15 May 12:37Edit
187quodVitae voluptates voluptas et aliquam aperiam eos.No31 Mar 12:37Edit
180cupiditate tenetur omnisRerum sed atque rem quos aliquid id.No17 Jun 12:37Edit
179omnis et facilisEt est rem necessitatibus earum iste.No29 Mar 12:37Edit
174ipsa quia voluptasQuod assumenda deleniti cupiditate soluta neque.No18 Apr 12:37Edit
172nihil ipsamRatione repudiandae at odio et.No22 Apr 12:37Edit
164beatae consecteturSimilique dolorem provident et accusantium aliquid inventore omnis.No07 Jun 12:37Edit
163ipsa quoEt vel dolorum quae.No11 Apr 12:37Edit
160aut voluptatesEarum odio voluptatem nulla.No20 Mar 12:37Edit
154nostrumQuia cupiditate facere itaque doloribus sit ab expedita vero.No06 Jun 12:37Edit
151ullam labore architectoFugit ut deserunt quia dolorem ut.No24 Mar 12:37Edit
139aliquid oditOccaecati veritatis asperiores vitae aut.No19 Apr 12:37Edit
136exercitationem distinctio quiDolores dolor amet quis a facilis asperiores.No14 Mar 12:37Edit
131iure autem ametOmnis tenetur dolores commodi consequatur nobis.No05 May 12:37Edit

Fork me on GitHub