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 %>
|
<% content_for :heading do %>
|
||||||
<h1><%= t ".heading", :user => @user.display_name %></h1>
|
<h1><%= t ".heading_html", :user => link_to(@user.display_name, @user) %></h1>
|
||||||
<p><%= t ".subheading_html", :user => link_to(@user.display_name, @user) %></p>
|
<ul class="nav nav-tabs">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active"><%= t ".diary_entries" %></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if @comments.empty? %>
|
<% if @comments.empty? %>
|
||||||
|
|
|
@ -2875,9 +2875,9 @@ en:
|
||||||
diary_comments:
|
diary_comments:
|
||||||
index:
|
index:
|
||||||
title: "Diary Comments added by %{user}"
|
title: "Diary Comments added by %{user}"
|
||||||
heading: "%{user}'s Diary Comments"
|
heading_html: "%{user}'s Comments"
|
||||||
subheading_html: "Diary Comments added by %{user}"
|
diary_entries: "Diary entries"
|
||||||
no_comments: "No diary comments"
|
no_comments: "No comments"
|
||||||
page:
|
page:
|
||||||
post: Post
|
post: Post
|
||||||
when: When
|
when: When
|
||||||
|
|
|
@ -33,7 +33,7 @@ module Users
|
||||||
get user_diary_comments_path(user)
|
get user_diary_comments_path(user)
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template :index
|
assert_template :index
|
||||||
assert_select "h4", :html => "No diary comments"
|
assert_select "h4", :html => "No comments"
|
||||||
|
|
||||||
# Test a user with a comment
|
# Test a user with a comment
|
||||||
create(:diary_comment, :user => other_user)
|
create(:diary_comment, :user => other_user)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue