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'
321-340 / 500 Alle rijen tonen
101enim ullamTenetur nihil animi provident.No03 Jun 12:37Edit
71atRatione distinctio eligendi quaerat.No28 Apr 12:37Edit
422harum enimDolorum illum enim eum numquam aut nihil et perferendis.No25 Apr 12:37Edit
251odit praesentiumAt saepe ipsa officiis ut minus est et nemo.No30 May 12:37Edit
416ipsamSit dolore accusantium maxime.Yes28 Apr 12:37Edit
330voluptasSit qui aut nesciunt ut excepturi debitis id.No21 Apr 12:37Edit
363doloresMagni aliquid aperiam non delectus.No30 Apr 12:37Edit
13utEst voluptas impedit perferendis excepturi aliquid doloremque.No22 Mar 12:37Edit
276sedEa provident inventore minima quis.No26 Apr 12:37Edit
372possimus est maximeFugit et quo magnam soluta.No09 May 12:37Edit
382vel nostrumMaiores officiis sequi aut at quia.No14 Jun 12:37Edit
98aperiam rerumRerum quaerat eligendi voluptatem.Yes31 May 12:37Edit
143et qui etQuae enim voluptas asperiores soluta.No02 Apr 12:37Edit
230aliquid rerum modiFugit hic blanditiis esse alias.Yes23 Apr 12:37Edit
389utVoluptatem hic sapiente perspiciatis quos expedita et velit.No28 May 12:37Edit
127doloribus utNumquam consequatur tempore minima mollitia soluta nemo est ea.No06 Jun 12:37Edit
470et nonQuia eaque consequatur minima ut pariatur.No19 Jun 12:37Edit
430enim itaqueEt consectetur et eos ut.No11 May 12:37Edit
442ut voluptatemQuibusdam et veniam ut.No10 Jun 12:37Edit
288consectetur dolores delectusQuia vel vitae dolorum iusto illo velit.No18 May 12:37Edit

Fork me on GitHub