Show friendly message to unregistered users who view posts.

https://github.com/Growstuff/growstuff/issues/625
This commit is contained in:
Rocky Jaiswal
2015-01-18 20:28:00 +01:00
parent df63819602
commit 534c299383
2 changed files with 6 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
.row.alert.alert-success
.col-md-12
#{ post.author.login_name } is using Growstuff to discuss #{ post.subject } with a community of food gardeners worldwide. We have advice on growing hundreds of different #{link_to 'Crops', crops_url}, and a community from all around the world. #{link_to 'Sign In', new_member_session_url} or #{link_to 'Sign Up', new_member_registration_url} to respond to this post, or to start using Growstuff to track what you're planting and harvesting.

View File

@@ -1,5 +1,8 @@
= content_for :title, @post.subject
- unless current_member
= render :partial => "message", :locals => { :post => @post }
= render :partial => "single", :locals => { :post => @post, :subject => false, :hide_comments => true }
- if can? :edit, @post or can? :destroy, @post