Don't show a hide post button to non-logged in users
This commit is contained in:
parent
0981f04c77
commit
c5726bb379
2 changed files with 5 additions and 5 deletions
|
|
@ -21,10 +21,11 @@
|
||||||
= t('ago', :time => time_ago_in_words(@post.created_at))
|
= t('ago', :time => time_ago_in_words(@post.created_at))
|
||||||
|
|
||||||
%br
|
%br
|
||||||
- if current_user.owns? @post
|
- if user_signed_in?
|
||||||
= link_to t('delete'), post_path(@post), :confirm => t('are_you_sure'), :method => :delete
|
- if current_user.owns? @post
|
||||||
- else
|
= link_to t('delete'), post_path(@post), :confirm => t('are_you_sure'), :method => :delete
|
||||||
= link_to t('hide'), post_visibility_path(:id => "42", :post_id => @post.id), :confirm => t('are_you_sure'), :method => :put, :remote => true
|
- else
|
||||||
|
= link_to t('hide'), post_visibility_path(:id => "42", :post_id => @post.id), :confirm => t('are_you_sure'), :method => :put, :remote => true
|
||||||
|
|
||||||
.stream.show{:data=>{:guid=>@post.id}}
|
.stream.show{:data=>{:guid=>@post.id}}
|
||||||
= render "comments/comments", :post => @post, :comments => @post.comments, :comments_expanded => true
|
= render "comments/comments", :post => @post, :comments => @post.comments, :comments_expanded => true
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
- if post.author.owner_id == current_user.id
|
- if post.author.owner_id == current_user.id
|
||||||
.right.controls
|
.right.controls
|
||||||
= link_to image_tag('deletelabel.png'), post_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete stream_element_delete", :title => t('delete')
|
= link_to image_tag('deletelabel.png'), post_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete stream_element_delete", :title => t('delete')
|
||||||
|
|
||||||
- else
|
- else
|
||||||
.right.controls
|
.right.controls
|
||||||
= link_to image_tag('deletelabel.png'), post_visibility_path(:id => "42", :post_id => post.id), :method => :put, :remote => true, :class => "delete stream_element_delete", :title => t('hide')
|
= link_to image_tag('deletelabel.png'), post_visibility_path(:id => "42", :post_id => post.id), :method => :put, :remote => true, :class => "delete stream_element_delete", :title => t('hide')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue