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
    
  • .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'
  • <%= 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 -%>
    
201-220 / 500 Voir tous
235sunt ametHic similique sit cupiditate.No20 May 12:37Edit
44id temporibus eligendiId dignissimos dolorem enim ut.No27 Mar 12:37Edit
267quoId exercitationem laudantium nemo amet.No14 Jun 12:37Edit
135dignissimos idId iure vero quas nobis et quibusdam.No11 Apr 12:37Edit
381eosId quia ipsa laudantium.No12 May 12:37Edit
114dolores liberoId quis dolor natus.No08 Jun 12:37Edit
93autId vero doloremque animi unde.No04 Apr 12:37Edit
270modi minusIllo voluptas eum dolorem accusantium deleniti aliquam.No04 May 12:37Edit
457asperiores qui nonIllum consequatur laboriosam iusto praesentium sed dolore.No15 May 12:37Edit
466autIllum corporis occaecati quia quo aut ratione voluptatem.No19 Mar 12:37Edit
94officiisIllum minus rerum expedita.No01 Apr 12:37Edit
338impeditIllum odit tempora aut aut sint facere praesentium illo.Yes27 Apr 12:37Edit
203soluta possimus estIllum ut molestiae et officia aut earum.No28 May 12:37Edit
200minusImpedit est velit veniam architecto.No21 May 12:37Edit
314facere adipisci doloresImpedit recusandae pariatur dolores asperiores et quibusdam.No16 May 12:37Edit
357optio provident quiImpedit rerum rerum dolorem aliquid occaecati eos nam eligendi.No21 Apr 12:37Edit
241blanditiis natusImpedit sit ea ut et.No15 Jun 12:37Edit
97voluptatem facilis etIncidunt dolorem molestias deserunt repellat vero aut.No15 Mar 12:37Edit
134impedit voluptas eligendiIncidunt dolores sint amet dignissimos dolorum illum officiis dolorem.No10 May 12:37Edit
490maximeIncidunt ducimus iste illum inventore nostrum.No21 May 12:37Edit

Fork me on GitHub