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
1impedit aperiam liberoEst necessitatibus tempora ut.No22 May 12:37Edit
2ut sintAssumenda ut in commodi nihil ratione odio voluptatibus ea.No09 Apr 12:37Edit
3aliquam repudiandaeConsequatur iste similique dolorum ducimus ut.No21 Mar 12:37Edit
4nisi quiQuas assumenda eos molestiae recusandae eveniet sit sint.No18 Mar 12:37Edit
5dicta pariaturCorporis iure repellat fuga omnis alias iusto aut voluptatum.No19 Apr 12:37Edit
6molestiae autemExplicabo aut ratione omnis voluptatem officia itaque dicta aut.Yes16 May 12:37Edit
7ut veniamMolestiae qui qui quo occaecati.No10 May 12:37Edit
8nullaNatus sint inventore culpa fugiat occaecati est distinctio.No25 Apr 12:37Edit
9quisquam in isteEt fugiat blanditiis facilis asperiores et.No07 Jun 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
13utEst voluptas impedit perferendis excepturi aliquid doloremque.No22 Mar 12:37Edit
14repellat consequatur velitError autem et deleniti nihil maxime voluptatem eius eveniet.No06 May 12:37Edit
15est ut autVero distinctio voluptatem veritatis.No17 Apr 12:37Edit
16omnisPossimus voluptas tempore sed mollitia neque vero nesciunt.No21 Mar 12:37Edit
17itaque suscipit commodiEt ut eveniet deleniti voluptatem omnis ea magnam et.No30 Mar 12:37Edit
18necessitatibus commodiLabore dolor et cumque quos.No27 Mar 12:37Edit
19id rem eaIn odio quia laborum quam dicta nulla.Yes29 Mar 12:37Edit
20aspernatur eligendi adipisciMaiores perspiciatis tempore et aut sapiente eaque.No30 May 12:37Edit

Fork me on GitHub