mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-30 04:35:28 -04:00
14 lines
502 B
Plaintext
14 lines
502 B
Plaintext
%ul
|
|
- @count ||= 0
|
|
- unless defined? max
|
|
- max = 0 # list all without "show all" toggle button
|
|
- display_crops.each do |c|
|
|
%li.crop-hierarchy{ class: (max != 0 && @count >= max) || !c.approved? ? ['hide', 'toggle'] : [] }
|
|
= render 'crops/tiny', crop: c
|
|
- if c.perennial
|
|
= perennial_icon
|
|
- @count += 1
|
|
- if c.varieties.present?
|
|
- c.varieties.order(:name).each do |v|
|
|
= render partial: 'hierarchy', locals: { display_crops: [v], max: max }
|