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'
1-20 / 500 Voir tous
80corrupti officiaDolore odit consequatur dolores quia deleniti veniam.No12 Mar 12:37Edit
149omnis errorOdit voluptatem corporis reprehenderit soluta reiciendis.No12 Mar 12:37Edit
206quia ipsum maximeEum quia expedita quo quia.No12 Mar 12:37Edit
257et nihilVoluptatibus sit et saepe eum harum et.No12 Mar 12:37Edit
269culpa assumendaOmnis voluptatem atque et mollitia a.No12 Mar 12:37Edit
297dolores magnam eosAsperiores possimus modi sint et quia.No12 Mar 12:37Edit
391aut estVelit distinctio necessitatibus culpa debitis non eos molestiae rerum.No12 Mar 12:37Edit
409dolore etAut sequi veniam eius eveniet.No12 Mar 12:37Edit
52eos temporibus omnisSapiente accusamus recusandae sunt animi voluptates dolorem enim.No13 Mar 12:37Edit
318beataeQuaerat veniam architecto est.No13 Mar 12:37Edit
83enimUt molestias ducimus dignissimos.No14 Mar 12:37Edit
136exercitationem distinctio quiDolores dolor amet quis a facilis asperiores.No14 Mar 12:37Edit
233nesciunt suscipit quisDicta vel atque occaecati quisquam qui est tempora.Yes14 Mar 12:37Edit
454similique enim odioEa cupiditate sit ex aut laudantium voluptatem.No14 Mar 12:37Edit
462provident doloremque laudantiumVoluptas nihil enim placeat.No14 Mar 12:37Edit
27eum velUllam tenetur culpa error fugit sunt.No15 Mar 12:37Edit
62eum velit saepeVoluptas voluptas nesciunt in eos eum inventore.No15 Mar 12:37Edit
97voluptatem facilis etIncidunt dolorem molestias deserunt repellat vero aut.No15 Mar 12:37Edit
390voluptas ut etEst eos omnis doloremque aut.No15 Mar 12:37Edit
115sit et estUllam dolorum dolorem placeat doloribus aut ea consequatur.No16 Mar 12:37Edit

Fork me on GitHub