Add a user link to the heading of the diary comments page
Fixes #3369 This makes the heading match the layout of the user's Notes page, which also has a short heading and a subheading with a link. Additionally, add a page title, again for consistency
This commit is contained in:
parent
abbd5a30d4
commit
18c70fa2de
3 changed files with 7 additions and 2 deletions
|
@ -235,6 +235,8 @@ class DiaryEntriesController < ApplicationController
|
|||
end
|
||||
|
||||
def comments
|
||||
@title = t ".title", :user => @user.display_name
|
||||
|
||||
conditions = { :user_id => @user }
|
||||
|
||||
conditions[:visible] = true unless can? :unhidecomment, DiaryEntry
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<% content_for :heading do %>
|
||||
<h1><%= t(".has_commented_on", :display_name => @user.display_name) %></h1>
|
||||
<h1><%= t ".heading", :user => @user.display_name %></h1>
|
||||
<p><%= t ".subheading_html", :user => link_to(@user.display_name, user_path(@user)) %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @comments.empty? %>
|
||||
|
|
|
@ -504,7 +504,9 @@ en:
|
|||
title: "OpenStreetMap diary entries"
|
||||
description: "Recent diary entries from users of OpenStreetMap"
|
||||
comments:
|
||||
has_commented_on: "%{display_name} has commented on the following diary entries"
|
||||
title: "Diary Comments added by %{user}"
|
||||
heading: "%{user}'s Diary Comments"
|
||||
subheading_html: "Diary Comments added by %{user}"
|
||||
no_comments: "No diary comments"
|
||||
post: Post
|
||||
when: When
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue