Add tabbed navigation to user's diary comments page
This commit is contained in:
parent
08292292f0
commit
43d60108da
3 changed files with 12 additions and 6 deletions
|
@ -1,6 +1,12 @@
|
|||
<% content_for :heading_class, "pb-0" %>
|
||||
|
||||
<% content_for :heading do %>
|
||||
<h1><%= t ".heading", :user => @user.display_name %></h1>
|
||||
<p><%= t ".subheading_html", :user => link_to(@user.display_name, @user) %></p>
|
||||
<h1><%= t ".heading_html", :user => link_to(@user.display_name, @user) %></h1>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active"><%= t ".diary_entries" %></a>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<% if @comments.empty? %>
|
||||
|
|
|
@ -2875,9 +2875,9 @@ en:
|
|||
diary_comments:
|
||||
index:
|
||||
title: "Diary Comments added by %{user}"
|
||||
heading: "%{user}'s Diary Comments"
|
||||
subheading_html: "Diary Comments added by %{user}"
|
||||
no_comments: "No diary comments"
|
||||
heading_html: "%{user}'s Comments"
|
||||
diary_entries: "Diary entries"
|
||||
no_comments: "No comments"
|
||||
page:
|
||||
post: Post
|
||||
when: When
|
||||
|
|
|
@ -33,7 +33,7 @@ module Users
|
|||
get user_diary_comments_path(user)
|
||||
assert_response :success
|
||||
assert_template :index
|
||||
assert_select "h4", :html => "No diary comments"
|
||||
assert_select "h4", :html => "No comments"
|
||||
|
||||
# Test a user with a comment
|
||||
create(:diary_comment, :user => other_user)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue