Files
growstuff/app/views/crops/_posts.html.haml
Brenda Wallace b0c8b11246 📝 Inline editing and display tidy ups (#2200)
* Inline editing and display tidy ups
2019-10-08 11:06:53 +13:00

23 lines
564 B
Plaintext

%a{ name: 'posts' }
%h2 What people are saying about #{crop.name.pluralize}
- if @posts.empty?
%p
Nobody has posted about #{crop.name.pluralize} yet.
%p
- if can? :create, Post
= link_to "Post something", new_post_path, class: 'btn btn-default'
- else
= render partial: "shared/signin_signup",
locals: { to: "post your tips and experiences growing #{crop.name.pluralize}" }
- else
= will_paginate @posts
.index-cards
- @posts.each do |post|
= render 'posts/preview', post: post
= will_paginate @posts