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'
401-420 / 500 Alle rijen tonen
157rerumEum voluptatibus quis in.No12 Jun 12:37Edit
353rerum nam eligendiUt qui omnis at ducimus id non perferendis qui.Yes08 Apr 12:37Edit
10rerum occaecatiCum aperiam voluptas aut.No22 May 12:37Edit
475rerum perspiciatis eumSoluta non et temporibus.No20 Apr 12:37Edit
399rerum quaeUt quisquam molestiae at aut.No16 Apr 12:37Edit
256saepeEarum facere omnis voluptatem dolor ad.No04 May 12:37Edit
356saepe illum essePerferendis ut ut quo nesciunt amet itaque.No16 May 12:37Edit
354sedQuibusdam voluptas ipsam blanditiis debitis.No13 Apr 12:37Edit
498sedQui sint eos distinctio vel assumenda sed animi quae.Yes05 Apr 12:37Edit
387sedMolestias aut iusto aliquid.No27 Mar 12:37Edit
276sedEa provident inventore minima quis.No26 Apr 12:37Edit
492sed atInventore ipsum qui rerum cum reiciendis nisi.No13 May 12:37Edit
293sed est estUllam dolores iste ut perspiciatis necessitatibus id illo.Yes22 Apr 12:37Edit
77sed quibusdam isteQuis non ducimus quia perferendis.No03 Jun 12:37Edit
221sequiQuo nobis aut ut dolor perferendis odit.No17 Apr 12:37Edit
406sequi beataeSit velit consequuntur minus possimus.No26 Apr 12:37Edit
367similiqueNeque fuga recusandae expedita omnis et.Yes07 May 12:37Edit
454similique enim odioEa cupiditate sit ex aut laudantium voluptatem.No14 Mar 12:37Edit
360similique estQuas porro qui nihil libero molestias omnis pariatur.No10 Jun 12:37Edit
326similique maiores esseNobis minus nam fuga quia.No12 May 12:37Edit

Fork me on GitHub