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'
41-60 / 500 Voir tous
110hicVoluptate quia quo sed.No11 May 12:37Edit
111sit eaCulpa numquam dolorem corporis corrupti aliquam.Yes03 Jun 12:37Edit
112neque quiAut ipsa aut accusamus quia consequatur ea facilis.No05 Apr 12:37Edit
113exercitationemExplicabo ratione quidem non sunt quibusdam rerum et.No02 Apr 12:37Edit
114dolores liberoId quis dolor natus.No08 Jun 12:37Edit
115sit et estUllam dolorum dolorem placeat doloribus aut ea consequatur.No16 Mar 12:37Edit
120esse voluptas deseruntFugit error sed id rem doloribus.No07 May 12:37Edit
123suscipit sunt deseruntDolores quasi minus fugiat reprehenderit et consequatur.No27 May 12:37Edit
126qui voluptatum atqueVeniam ut eaque commodi sint esse.No06 Apr 12:37Edit
127doloribus utNumquam consequatur tempore minima mollitia soluta nemo est ea.No06 Jun 12:37Edit
131iure autem ametOmnis tenetur dolores commodi consequatur nobis.No05 May 12:37Edit
136exercitationem distinctio quiDolores dolor amet quis a facilis asperiores.No14 Mar 12:37Edit
139aliquid oditOccaecati veritatis asperiores vitae aut.No19 Apr 12:37Edit
151ullam labore architectoFugit ut deserunt quia dolorem ut.No24 Mar 12:37Edit
154nostrumQuia cupiditate facere itaque doloribus sit ab expedita vero.No06 Jun 12:37Edit
160aut voluptatesEarum odio voluptatem nulla.No20 Mar 12:37Edit
163ipsa quoEt vel dolorum quae.No11 Apr 12:37Edit
164beatae consecteturSimilique dolorem provident et accusantium aliquid inventore omnis.No07 Jun 12:37Edit
172nihil ipsamRatione repudiandae at odio et.No22 Apr 12:37Edit
174ipsa quia voluptasQuod assumenda deleniti cupiditate soluta neque.No18 Apr 12:37Edit

Fork me on GitHub