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 Alle rijen tonen
8nullaNatus sint inventore culpa fugiat occaecati est distinctio.No25 Apr 12:37Edit
10rerum occaecatiCum aperiam voluptas aut.No22 May 12:37Edit
11aspernatur estVoluptatem error inventore officia rem nemo qui.Yes24 Mar 12:37Edit
12explicabo hicPorro in nisi ea sunt consequatur est incidunt et.No26 May 12:37Edit
26quia mollitia delenitiFugit voluptatem recusandae soluta voluptatum consequuntur est voluptatem quas.No23 May 12:37Edit
33voluptatemDolorem saepe et aspernatur.No04 May 12:37Edit
36placeatQuia aut eligendi aliquid.No13 Apr 12:37Edit
39praesentium et idExpedita laborum incidunt natus.No08 May 12:37Edit
41estIpsum illo corrupti nesciunt facere.No10 Apr 12:37Edit
50ipsum nam temporeBlanditiis totam ab aut.No10 Apr 12:37Edit
59alias liberoRepudiandae praesentium aut nobis saepe.No23 Mar 12:37Edit
78exercitationem sapienteQuasi numquam aut magnam expedita dolor repudiandae officiis.No07 Apr 12:37Edit
80corrupti officiaDolore odit consequatur dolores quia deleniti veniam.No12 Mar 12:37Edit
88culpaOccaecati aut eum vero quasi dolorem.No25 May 12:37Edit
96impedit explicabo voluptatemHic eveniet pariatur non nostrum.No02 Jun 12:37Edit
101enim ullamTenetur nihil animi provident.No03 Jun 12:37Edit
112neque quiAut ipsa aut accusamus quia consequatur ea facilis.No05 Apr 12:37Edit
119quo est aliquidFugiat reprehenderit est quia ducimus voluptatem maiores tempore id.No19 May 12:37Edit
170fugiatAutem quia deleniti veritatis facere laudantium.No20 Apr 12:37Edit
182voluptates nullaUllam est et quisquam perspiciatis qui aliquid neque dolores.No22 May 12:37Edit

Fork me on GitHub