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'
121-140 / 500 Sýna allt
121dolore idDignissimos fugit amet nulla quis numquam sed explicabo.No15 Jun 12:37Edit
122omnisNecessitatibus quam in omnis.No25 Mar 12:37Edit
123suscipit sunt deseruntDolores quasi minus fugiat reprehenderit et consequatur.No27 May 12:37Edit
124earumReprehenderit nulla assumenda pariatur enim.No08 Jun 12:37Edit
125nihil eum minusAsperiores soluta ut qui.No29 Apr 12:37Edit
126qui voluptatum atqueVeniam ut eaque commodi sint esse.No06 Apr 12:37Edit
127doloribus utNumquam consequatur tempore minima mollitia soluta nemo est ea.No06 Jun 12:37Edit
128voluptasEst cum porro et et.No05 May 12:37Edit
129voluptates minima molestiaeMolestias enim voluptatibus voluptatem aut.No03 May 12:37Edit
130esse rationeAliquid dolore aut magnam voluptatum ad.No08 Apr 12:37Edit
131iure autem ametOmnis tenetur dolores commodi consequatur nobis.No05 May 12:37Edit
132quiaNemo nostrum perspiciatis in iste neque omnis est.No17 Mar 12:37Edit
133optioDolores officia in et quam aliquid repellat rerum.No27 Mar 12:37Edit
134impedit voluptas eligendiIncidunt dolores sint amet dignissimos dolorum illum officiis dolorem.No10 May 12:37Edit
135dignissimos idId iure vero quas nobis et quibusdam.No11 Apr 12:37Edit
136exercitationem distinctio quiDolores dolor amet quis a facilis asperiores.No14 Mar 12:37Edit
137molestiaeArchitecto praesentium ut dolorem illo facere rerum numquam provident.Yes12 Jun 12:37Edit
138sint quiCommodi qui fugiat eum aut consequuntur.No01 Jun 12:37Edit
139aliquid oditOccaecati veritatis asperiores vitae aut.No19 Apr 12:37Edit
140mollitiaEa pariatur eveniet omnis quae recusandae consectetur.No21 May 12:37Edit

Fork me on GitHub