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'
481-500 / 500 Alle rijen tonen
33voluptatemDolorem saepe et aspernatur.No04 May 12:37Edit
187quodVitae voluptates voluptas et aliquam aperiam eos.No31 Mar 12:37Edit
393nihilAut non incidunt omnis assumenda.Yes18 Apr 12:37Edit
396at consequatur quaeratNostrum enim iusto architecto numquam.No29 Mar 12:37Edit
2ut sintAssumenda ut in commodi nihil ratione odio voluptatibus ea.No09 Apr 12:37Edit
30corrupti molestiae abRepellat ipsa quis quam alias dolores itaque.No29 Apr 12:37Edit
47temporibus iure delectusCumque placeat aut vel repellat omnis accusamus error odio.No22 Apr 12:37Edit
75velit non magniTotam dolor est sint et sed.No07 May 12:37Edit
380qui repellendus sintUt quo voluptates sint.No11 May 12:37Edit
413voluptateAnimi esse amet nihil ad nobis voluptatum.No25 Mar 12:37Edit
442ut voluptatemQuibusdam et veniam ut.No10 Jun 12:37Edit
102inventore eligendi voluptasOdio autem at officia tempora labore.No11 Jun 12:37Edit
143et qui etQuae enim voluptas asperiores soluta.No02 Apr 12:37Edit
166ut exVoluptatem qui aut et accusamus saepe eius laboriosam.No06 May 12:37Edit
238namDolor culpa laboriosam enim omnis ipsa.No10 Jun 12:37Edit
275voluptatumEsse magnam ut repellendus.No08 May 12:37Edit
361culpaQuaerat sit tempore deleniti amet rerum unde sunt.No01 Apr 12:37Edit
491modi nesciuntLaboriosam voluptatem sunt quod voluptatum magnam quisquam.No04 May 12:37Edit
152nihilReiciendis explicabo sit porro veritatis illum nemo asperiores est.No19 Mar 12:37Edit
165expeditaMolestiae porro totam ipsa enim cupiditate provident qui.No12 May 12:37Edit

Fork me on GitHub