Sha256: 7fd02c0764a326fef063ad59d03caa85344f9a7adf4cae169c166767b301bbbe

Contents?: true

Size: 621 Bytes

Versions: 7

Compression:

Stored size: 621 Bytes

Contents

- columns_count ||= 4
- unless items.blank?
  - items_rendered_count = 0
  - (0...columns_count).each do |i|
    .column
      %ul
        - column_items_count = ((items.size - items_rendered_count).to_f/(columns_count-i)).ceil
        - from  = items_rendered_count
        - to    = items_rendered_count + column_items_count
        - to    = items.size if to > items.size
        - items_rendered_count = to
        - (from...to).each do |j|
          .criteria
            %li
              = link_to items[j][:name], 'javascript:void(0);', :class => 'categorized_autocompleter_item_link', :rel => "#{items[j][:rel]}"

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
discerner-1.2.2 app/views/discerner/shared/_categorized_autocompleter_items.html.haml
discerner-1.2.1 app/views/discerner/shared/_categorized_autocompleter_items.html.haml
discerner-1.2.0 app/views/discerner/shared/_categorized_autocompleter_items.html.haml
discerner-2.0.0 app/views/discerner/shared/_categorized_autocompleter_items.html.haml
discerner-1.1.20 app/views/discerner/shared/_categorized_autocompleter_items.html.haml
discerner-1.1.19 app/views/discerner/shared/_categorized_autocompleter_items.html.haml
discerner-1.1.18 app/views/discerner/shared/_categorized_autocompleter_items.html.haml