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'
61-80 / 500 Alle rijen tonen
257et nihilVoluptatibus sit et saepe eum harum et.No12 Mar 12:37Edit
347sint aut velDeleniti et aut laboriosam praesentium.No04 May 12:37Edit
447animi accusantium utSequi dolorem distinctio sit doloremque et corporis voluptatem alias.No06 Apr 12:37Edit
138sint quiCommodi qui fugiat eum aut consequuntur.No01 Jun 12:37Edit
169vitae oditLaborum laboriosam odio cum ex.No07 Jun 12:37Edit
184minusVoluptatem harum fuga est hic fugit.No05 Apr 12:37Edit
228reprehenderitDeleniti non necessitatibus voluptas.No19 Apr 12:37Edit
350et quoRerum rem quos officiis molestias earum pariatur.Yes06 Apr 12:37Edit
428commodi omnis temporeEsse sint deleniti a rerum est praesentium unde.No18 Mar 12:37Edit
5dicta pariaturCorporis iure repellat fuga omnis alias iusto aut voluptatum.No19 Apr 12:37Edit
268quasi minima magniConsequuntur aspernatur eos cumque facere.No21 May 12:37Edit
326similique maiores esseNobis minus nam fuga quia.No12 May 12:37Edit
27eum velUllam tenetur culpa error fugit sunt.No15 Mar 12:37Edit
73iure architectoVoluptatum aperiam ad dolore aut fugit.No05 Apr 12:37Edit
114dolores liberoId quis dolor natus.No08 Jun 12:37Edit
292excepturi hicEsse saepe deserunt ipsam.No24 May 12:37Edit
294fugiat evenietAccusamus ut et nesciunt sit corrupti.No08 Jun 12:37Edit
375maxime laborumEt culpa accusantium animi.No21 May 12:37Edit
401cum deserunt nesciuntMolestiae quasi totam voluptatem in esse dignissimos ut.Yes18 May 12:37Edit
77sed quibusdam isteQuis non ducimus quia perferendis.No03 Jun 12:37Edit

Fork me on GitHub