mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-26 10:45:04 -04:00
Merge pull request #708 from oshiho3/629-thumbnails-of-crops-on-post
#629 Thumbnails of crops on post
This commit is contained in:
@@ -16,16 +16,23 @@
|
||||
|
||||
= render :partial => "single", :locals => { :post => @post, :subject => false, :hide_comments => true }
|
||||
|
||||
- if can? :edit, @post or can? :destroy, @post
|
||||
.post-actions
|
||||
- if can? :edit, @post
|
||||
= link_to 'Edit Post', edit_post_path(@post), :class => 'btn btn-default btn-xs'
|
||||
- if can? :destroy, @post
|
||||
= link_to 'Delete Post', @post, method: :delete, |
|
||||
data: { confirm: 'Are you sure?' }, :class => 'btn btn-default btn-xs'
|
||||
- unless @post.crops.empty?
|
||||
%h3 Crops mentioned in this post
|
||||
- @post.crops.each do |c|
|
||||
.col-md-2
|
||||
= render :partial => 'crops/thumbnail', :locals => { :crop => c }
|
||||
|
||||
= render :partial => "comments", :locals => { :post => @post }
|
||||
.col-md-11
|
||||
- if can? :edit, @post or can? :destroy, @post
|
||||
.post-actions
|
||||
- if can? :edit, @post
|
||||
= link_to 'Edit Post', edit_post_path(@post), :class => 'btn btn-default btn-xs'
|
||||
- if can? :destroy, @post
|
||||
= link_to 'Delete Post', @post, method: :delete, |
|
||||
data: { confirm: 'Are you sure?' }, :class => 'btn btn-default btn-xs'
|
||||
|
||||
- if can? :create, Comment
|
||||
.post-actions
|
||||
=link_to 'Comment', new_comment_path(:post_id => @post.id), :class => 'btn btn-primary'
|
||||
= render :partial => "comments", :locals => { :post => @post }
|
||||
|
||||
- if can? :create, Comment
|
||||
.post-actions
|
||||
=link_to 'Comment', new_comment_path(:post_id => @post.id), :class => 'btn btn-primary'
|
||||
|
||||
Reference in New Issue
Block a user