mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-01-25 09:47:55 -05:00
This commit introduces a new `Problem` model, analogous to `Crop`, to allow users to track problems they have on their plantings (e.g., aphids on tomatoes). Key features: - A new `Problem` model that can be curated by admins (`problem_wranglers`). - Users can associate problems with their plantings and upload photos of the problems. - Aggregated problem information is displayed on the crop detail page (e.g., "Problems: aphids (27), blight (13)"). - Users can mention problems in posts (e.g., `[aphids](problem)`), which automatically links to the problem's page. - Admin functionality for reviewing and approving new problem suggestions. Resolves merge conflict in app/controllers/plantings_controller.rb
27 lines
928 B
Plaintext
27 lines
928 B
Plaintext
.card.col-md-8.col-lg-7.mx-auto.float-none.white.z-depth-1.py-2.px-2
|
|
.card-body
|
|
- if content_for? :title
|
|
%h1.h2-responsive.text-center
|
|
%strong=yield :title
|
|
= form_for(@comment, html: { class: "form-horizontal" }) do |f|
|
|
- if @comment.errors.any?
|
|
#error_explanation
|
|
%h2
|
|
= pluralize(@comment.errors.size, "error")
|
|
prohibited this comment from being saved:
|
|
%ul
|
|
- @comment.errors.full_messages.each do |msg|
|
|
%li= msg
|
|
|
|
.md-form
|
|
= f.text_area :body, rows: 6, class: 'form-control md-textarea', autofocus: 'autofocus'
|
|
= f.label :body, "Your comment:"
|
|
|
|
%span.help-block
|
|
= render partial: "shared/markdown_help"
|
|
.actions.text-right
|
|
= f.submit 'Post comment', class: 'btn btn-primary'
|
|
- if defined?(@post)
|
|
.field
|
|
= f.hidden_field :post_id, value: @post.id
|