Adding 'New diary post' link to main Users' diaries page to help logged-in users find how to post.
This commit is contained in:
parent
53f58825b0
commit
c81c31775b
1 changed files with 6 additions and 2 deletions
|
@ -1,7 +1,11 @@
|
|||
<% if @this_user %>
|
||||
<h2><%= @this_user.display_name %>'s diary</h2>
|
||||
|
||||
<% if @user and @this_user.id == @user.id %>
|
||||
<% if @user == @this_user %>
|
||||
<%= link_to 'New diary post', :controller => 'diary_entry', :action => 'new', :display_name => @user.display_name %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<h2>Users' diaries</h2>
|
||||
<% if @user %>
|
||||
<%= link_to 'New diary post', :controller => 'diary_entry', :action => 'new', :display_name => @user.display_name %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
Loading…
Add table
Reference in a new issue