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'
461-480 / 500 Sýna allt
500vel eaEt a ut cum eos sed.Yes16 Apr 12:37Edit
237vel esseDistinctio accusamus et dolores aliquam repudiandae omnis.No04 Jun 12:37Edit
281velitDolorum quaerat asperiores itaque quibusdam libero aspernatur sed eius.No20 Mar 12:37Edit
186velit dignissimosQuia et molestias quidem sit minus.No11 Apr 12:37Edit
75velit non magniTotam dolor est sint et sed.No07 May 12:37Edit
496velit non pariaturQuia possimus rerum eum architecto.Yes07 Apr 12:37Edit
392velit vitaeVero tenetur ex et totam nam natus aperiam doloremque.No16 May 12:37Edit
382vel nostrumMaiores officiis sequi aut at quia.No14 Jun 12:37Edit
273veroMinima eum dicta odio a quod odit rerum.Yes11 May 12:37Edit
379vero repellatUt sed id deserunt.Yes13 Jun 12:37Edit
220vero rerumEt aliquid id sed et.No24 Mar 12:37Edit
66vitae at autemNihil quae dolores quia ut non.No06 May 12:37Edit
176vitae ducimus consequunturDolores tenetur consequatur nihil minima id delectus consequatur et.No25 Apr 12:37Edit
169vitae oditLaborum laboriosam odio cum ex.No07 Jun 12:37Edit
431vitae repudiandaeAliquid nihil aliquam architecto eos delectus placeat.No30 May 12:37Edit
222voluptasAnimi odio ad et nisi quod perferendis natus possimus.No04 Jun 12:37Edit
290voluptasIste aut occaecati quo voluptates facere consequatur.No02 Jun 12:37Edit
330voluptasSit qui aut nesciunt ut excepturi debitis id.No21 Apr 12:37Edit
201voluptasEt ut autem at ex voluptatibus assumenda.No16 Mar 12:37Edit
128voluptasEst cum porro et et.No05 May 12:37Edit

Fork me on GitHub