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'
41-60 / 500 Voir tous
473voluptatum quiBlanditiis quisquam ut eos eum.No11 Jun 12:37Edit
376assumendaBlanditiis tempora qui ut ex.No22 May 12:37Edit
50ipsum nam temporeBlanditiis totam ab aut.No10 Apr 12:37Edit
161autCommodi delectus eaque quia occaecati molestiae voluptate ut qui.No19 Jun 12:37Edit
138sint quiCommodi qui fugiat eum aut consequuntur.No01 Jun 12:37Edit
210molestiaeCommodi soluta deleniti magni nisi error voluptas.No10 Jun 12:37Edit
199ea consectetur velitConsectetur fuga adipisci ad quia alias qui.No15 Jun 12:37Edit
345consequatur est sequiConsectetur libero quia ut dicta.No20 May 12:37Edit
424non autem solutaConsectetur omnis excepturi cum vitae.No01 Jun 12:37Edit
86adipisciConsectetur optio rerum facilis explicabo enim consequatur delectus iste.No08 Apr 12:37Edit
53molestiaeConsequatur explicabo quos unde esse a distinctio sapiente voluptas.No21 Apr 12:37Edit
3aliquam repudiandaeConsequatur iste similique dolorum ducimus ut.No21 Mar 12:37Edit
427quae assumendaConsequatur iure et odio nulla tenetur.No15 May 12:37Edit
300minimaConsequatur nesciunt tempora asperiores quo ipsa repudiandae qui dolorem.Yes07 Apr 12:37Edit
90commodi et quisConsequatur soluta eligendi et consequatur.No27 Apr 12:37Edit
268quasi minima magniConsequuntur aspernatur eos cumque facere.No21 May 12:37Edit
79animiCorporis est inventore nesciunt est nam voluptas et.No04 May 12:37Edit
5dicta pariaturCorporis iure repellat fuga omnis alias iusto aut voluptatum.No19 Apr 12:37Edit
181temporeCorporis rerum id possimus adipisci placeat omnis et.No09 May 12:37Edit
493estCorporis vel omnis et quam illo.No28 May 12:37Edit

Fork me on GitHub