Sha256: cb1af5045647cd84f094071a5ca71bf034748965f1b1ee4a4b9e2f8c1053af86

Contents?: true

Size: 1.21 KB

Versions: 2

Compression:

Stored size: 1.21 KB

Contents

.fg-datawrapper{ :class => "fg-#{fancygrid.name}"}
  %table.fg-datacontainer
    %tr.fg-header
      - fancygrid.visible_columns.each do |column|
        %th{ :class => column.tag_class + (column.searchable ? " fg-orderable" : ""), :"fg-identifier" => column.identifier, :"fg-sort-order" => column.sort_order }
          .fg-head-wrapper.fg-order-tag
            = column.human_name
    - if fancygrid.simple_search?
      %tr.fg-search
        - fancygrid.visible_columns.each do |column|
          %td{ :class => column.tag_class }
            - next unless column.searchable
            .fg-search-criterion
              = hidden_field_tag(:identifier, column.identifier)
              = hidden_field_tag(:operator, fancygrid.search_operator)
              - if column.search_options
                = select_tag(:value, options_from_collection_for_select(column.search_options, :last, :first), :selected => column.search_value)
              - else
                = text_field_tag(:value, column.search_value)

    - fancygrid.records.each do |record|
      %tr.fg-row
        - fancygrid.visible_columns.each do |column|
          %td{ :class => column.tag_class }
            = render_fancygrid_cell(record, column, &format_block)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fancygrid-2.0.1 app/views/fancygrid/table.html.haml
fancygrid-2.0.0 app/views/fancygrid/table.html.haml