hides crop varieties that have not been approved

This commit is contained in:
Brandon Baker
2018-11-25 17:48:02 -07:00
committed by Brenda Wallace
parent 6c6724b558
commit beab7fcfda
2 changed files with 2 additions and 1 deletions

View File

@@ -86,6 +86,7 @@ submit the change with your pull request.
- Jennifer Kruse / [jenkr55](https://github.com/jenkr55)
- Christopher Bazin / [RobotScissors](https://github.com/robotscissors)
- Ahmed Shahin / [codeminator](https://www.github.com/codeminator)
- Brandon Baker / [brandonbaker40](https://github.com/brandonbaker40)
## Bots

View File

@@ -3,7 +3,7 @@
- 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 ? ['hide', 'toggle'] : [] }
%li.crop-hierarchy{ class: (max != 0 && @count >= max) || !c.approved? ? ['hide', 'toggle'] : [] }
= link_to c, c
- @count += 1
- if c.varieties.present?