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'
441-460 / 500 Alle rijen tonen
434voluptas quisquamRerum quaerat eos numquam.No20 Apr 12:37Edit
435eos deseruntQuia amet occaecati et non sed repudiandae voluptatibus id.No20 Apr 12:37Edit
436accusantiumCorrupti qui mollitia temporibus.No05 Apr 12:37Edit
437atVoluptatem rerum eos illo voluptatem labore autem consectetur consequatur.No03 Jun 12:37Edit
438undePlaceat occaecati sunt at dolor quos aspernatur rerum voluptatem.No26 Apr 12:37Edit
439namUnde eos dolore quis quo.No23 May 12:37Edit
440ut quae atFugiat voluptate veniam distinctio aut voluptatibus est et.No29 Apr 12:37Edit
441in autRatione quam eveniet corporis.No23 May 12:37Edit
442ut voluptatemQuibusdam et veniam ut.No10 Jun 12:37Edit
6molestiae autemExplicabo aut ratione omnis voluptatem officia itaque dicta aut.Yes16 May 12:37Edit
248quiMinus quia cumque est deleniti.Yes30 Mar 12:37Edit
215aliquid sed suntQuis sed voluptate voluptatibus voluptatem doloremque et.Yes12 May 12:37Edit
249sint itaqueNeque cum vero laborum voluptatem aliquam velit quaerat voluptatem.Yes16 Jun 12:37Edit
300minimaConsequatur nesciunt tempora asperiores quo ipsa repudiandae qui dolorem.Yes07 Apr 12:37Edit
11aspernatur estVoluptatem error inventore officia rem nemo qui.Yes24 Mar 12:37Edit
105autem quiaVelit voluptas impedit officia illo eveniet ullam.Yes09 Apr 12:37Edit
278itaqueEveniet quam sint occaecati qui expedita asperiores.Yes25 Apr 12:37Edit
146adipisci etIncidunt porro iure esse.Yes06 Apr 12:37Edit
476facere voluptasOccaecati consectetur neque ullam dolores qui.Yes21 May 12:37Edit
65eosOccaecati atque assumenda qui deleniti.Yes21 Apr 12:37Edit

Fork me on GitHub