mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-24 16:58:35 -04:00
Show friendly message to unregistered users who view posts.
https://github.com/Growstuff/growstuff/issues/625
This commit is contained in:
3
app/views/posts/_message.html.haml
Normal file
3
app/views/posts/_message.html.haml
Normal 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.
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user