- content_for :title, t('.title')

- content_for :buttonbar do
  - if can? :wrangle, Crop
    = link_to 'Wrangle Crops', wrangle_crops_path, class: 'btn btn-secondary'
  - if can? :create, Crop
    = link_to 'Add New Crop', new_crop_path, class: 'btn btn-primary'

- content_for :breadcrumbs do
  %li.breadcrumb-item.active= link_to 'Crops', crops_path

%section.crops
  %h2= t('.title')
  = will_paginate @crops
  .index-cards
    - @crops.each do |c|
      = render 'crops/thumbnail', crop: c

  = will_paginate @crops

%ul.list-inline
  %li The data on this page is available in the following formats:
  %li= link_to "CSV", crops_path(format: 'csv')
  %li= link_to "JSON", crops_path(format: 'json')
  %li= link_to "RSS", crops_path(format: 'rss')
