Growstuff/growstuff

View on GitHub
app/views/plantings/_progress.html.haml

Summary

Maintainability
Test Coverage
- if planting.active && planting.annual? && planting.percentage_grown.present?
  .progress
    .progress-bar.bg-success{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => planting.percentage_grown, role: "progressbar", style: "width: #{planting.percentage_grown}%"}

  .float-left #{sprintf '%.0f', planting.percentage_grown}%

  - unless planting.finish_predicted_at.blank?
    .float-right
      -# = planting.finish_predicted_at.strftime(Date::DATE_FORMATS[:ymd])
      = I18n.t('date.abbr_month_names')[planting.finish_predicted_at.month]
      = planting.finish_predicted_at.year