<commit_before>- content_for :title, @crop.name
- content_for :opengraph do
  - @crop.photos.each do |photo|
    = tag("meta", property: "og:image", content: photo.fullsize_url)
  = tag("meta", property: "og:title", content: @crop.name)
  = tag("meta", property: "og:type", content: "website")
  = tag("meta", property: "og:url", content: request.original_url)
  = tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME'])

- content_for :scripts do
  = javascript_include_tag "charts"

%h1
  = @crop.name
  %small= @crop.default_scientific_name

= render 'approval_status_message', crop: @crop

- if @crop.approved?
  - content_for :buttonbar do
    = render 'crops/actions', crop: @crop

.row
  .col-md-9
    %h2
      - if !@crop.plantings.empty?
        #{@crop.name.titleize} has been planted
        = pluralize(@crop.plantings.size, "time")
        by #{ENV['GROWSTUFF_SITE_NAME']} members.
      - else
        Nobody is growing this yet. You could be the first!
    %hr/

    = render 'predictions', crop: @crop
    %hr/
    = render 'crops/photos', photos: @photos

    .card-deck.text-center
      .col-md-4
        .card
          .card-body
            %h3.section-heading.h3.pt-4 Sunniness
            = pie_chart crop_sunniness_path(@crop, format: :json), legend: "bottom"
      .col-md-4
        .card
          .card-body
            %h3.section-heading.h3.pt-4 Planted from
            = pie_chart crop_planted_from_path(@crop, format: :json), legend: "bottom"
      .col-md-4
        .card
          .card-body
            %h3.section-heading.h3.pt-4 Harvested for
            = pie_chart crop_harvested_for_path(@crop, format: :json), legend: "bottom"

    .varieties= render 'varieties', crop: @crop

    %h3
      = icon 'fas', 'map'
      Crop Map
    %p
      Only plantings by members who have set their locations are shown on this map.
      - if current_member && current_member.location.blank?
        = link_to "Set your location.", edit_member_registration_path
    #cropmap

    = render 'crops/posts', crop: @crop

  .col-md-3
    = render 'wrangle', crop: @crop
    .card
      .crop-image
        = image_tag crop_image_path(@crop, full_size: true),
          class: 'img-card', alt: 'photo of crop'
      .card-body
        %h4 How to grow #{@crop.name.pluralize}
        = render 'grown_for', crop: @crop
        = render 'planting_advice', crop: @crop
        - if @crop.parent
          %hr/
          %p.parent-crop
            = @crop.name
            is a variety of
            = link_to @crop.parent, @crop.parent
      .list-group
        .list-group-item.list-group-flush.d-flex.justify-content-between.align-items-center
          = link_to crop_plantings_path(@crop), class: 'card-link' do
            = planting_icon
            #{@crop.name} plantings
          %span.badge.badge-primary.badge-pill=@crop.plantings.size
        .list-group-item.d-flex.justify-content-between.align-items-center<commit_msg>tidy up sciname display on crops#show<commit_after>- content_for :title, @crop.name
- content_for :opengraph do
  - @crop.photos.each do |photo|
    = tag("meta", property: "og:image", content: photo.fullsize_url)
  = tag("meta", property: "og:title", content: @crop.name)
  = tag("meta", property: "og:type", content: "website")
  = tag("meta", property: "og:url", content: request.original_url)
  = tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME'])

- content_for :scripts do
  = javascript_include_tag "charts"

%h1
  = @crop.name
  %small= @crop.default_scientific_name

= render 'approval_status_message', crop: @crop

- if @crop.approved?
  - content_for :buttonbar do
    = render 'crops/actions', crop: @crop

.row
  .col-md-9
    %h2
      - if !@crop.plantings.empty?
        #{@crop.name.titleize} has been planted
        = pluralize(@crop.plantings.size, "time")
        by #{ENV['GROWSTUFF_SITE_NAME']} members.
      - else
        Nobody is growing this yet. You could be the first!
    %hr/

    = render 'predictions', crop: @crop
    %hr/
    = render 'crops/photos', photos: @photos

    .card-deck.text-center
      .col-md-4
        .card
          .card-body
            %h3.section-heading.h3.pt-4 Sunniness
            = pie_chart crop_sunniness_path(@crop, format: :json), legend: "bottom"
      .col-md-4
        .card
          .card-body
            %h3.section-heading.h3.pt-4 Planted from
            = pie_chart crop_planted_from_path(@crop, format: :json), legend: "bottom"
      .col-md-4
        .card
          .card-body
            %h3.section-heading.h3.pt-4 Harvested for
            = pie_chart crop_harvested_for_path(@crop, format: :json), legend: "bottom"

    .varieties= render 'varieties', crop: @crop

    %h3
      = icon 'fas', 'map'
      Crop Map
    %p
      Only plantings by members who have set their locations are shown on this map.
      - if current_member && current_member.location.blank?
        = link_to "Set your location.", edit_member_registration_path
    #cropmap

    = render 'crops/posts', crop: @crop

  .col-md-3
    = render 'wrangle', crop: @crop
    .card
      .crop-image
        = image_tag crop_image_path(@crop, full_size: true),
          class: 'img-card', alt: 'photo of crop'
      .card-body
        %h4 How to grow #{@crop.name.pluralize}
        = render 'grown_for', crop: @crop
        = render 'planting_advice', crop: @crop
        - if @crop.parent
          %hr/
          %p.parent-crop
            = @crop.name
            is a variety of
            = link_to @crop.parent, @crop.parent
      .list-group.list-group-flush
        .list-group-item.list-group-flush.d-flex.justify-content-between.align-items-center
          = link_to crop_plantings_path(@crop), class: 'card-link' do
            = planting_icon
            #{@crop.name} plantings
          %span.badge.badge-primary.badge-pill=@crop.plantings.size
        .list-group-item.d-flex.justify-content-between.align-items-center
{'fraction_non_alphanumeric': 0.13333333333333333, 'fraction_numerical': 0.006015037593984963, 'mean_word_length': 2.3610331274564853, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5261268', 'n_tokens_mistral': 2105, 'n_tokens_neox': 2072, 'n_words': 448}