From: Tom Hughes Date: Sun, 15 Sep 2013 15:22:48 +0000 (+0100) Subject: Make the timestamp for a diary comment into a permalink for it X-Git-Tag: live~5286 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/5bb751ca26e72e8a342b06fbe453970f111e0c37?ds=sidebyside;hp=ba8bc1a37f813d56411d9408035ff69ccb0cf723 Make the timestamp for a diary comment into a permalink for it --- diff --git a/app/views/diary_entry/_diary_comment.html.erb b/app/views/diary_entry/_diary_comment.html.erb index c7700b361..c651c2943 100644 --- a/app/views/diary_entry/_diary_comment.html.erb +++ b/app/views/diary_entry/_diary_comment.html.erb @@ -1,6 +1,6 @@
<%= user_thumbnail diary_comment.user %> -

<%= raw(t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_comment.user.display_name), :comment_created_at => l(diary_comment.created_at, :format => :friendly))) %>

+

<%= raw(t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_comment.user.display_name), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}"))) %>

<%= diary_comment.body.to_html %>
<%= if_administrator(:span) do %> <%= link_to t('diary_entry.diary_comment.hide_link'), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data=> { :confirm => t('diary_entry.diary_comment.confirm') } %>