diff --git a/app/views/diary_entries/_diary_comment.html.erb b/app/views/diary_entries/_diary_comment.html.erb
index 04e011574..5ade361aa 100644
--- a/app/views/diary_entries/_diary_comment.html.erb
+++ b/app/views/diary_entries/_diary_comment.html.erb
@@ -3,7 +3,7 @@
<%= user_thumbnail diary_comment.user %>
-
<%= link_to t(".edit_link"), :action => "edit", :display_name => diary_entry.user.display_name, :id => diary_entry.id %>
+
<%= link_to t(".edit_link"), edit_diary_entry_path(diary_entry.user, diary_entry) %>
<% end %>
<% if current_user and diary_entry.user != current_user %>
@@ -36,9 +36,9 @@
<% if can? :hide, DiaryEntry %>
<% if diary_entry.visible %>
- <%= link_to t(".hide_link"), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t(".confirm") } %>
+ <%= link_to t(".hide_link"), hide_diary_entry_path(diary_entry.user, diary_entry), :method => :post, :data => { :confirm => t(".confirm") } %>
<% else %>
- <%= link_to t(".unhide_link"), unhide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t(".confirm") } %>
+ <%= link_to t(".unhide_link"), unhide_diary_entry_path(diary_entry.user, diary_entry), :method => :post, :data => { :confirm => t(".confirm") } %>
<% end %>
<% end %>
diff --git a/app/views/diary_entries/_diary_entry_heading.html.erb b/app/views/diary_entries/_diary_entry_heading.html.erb
index ef924ffdd..30f7bc03b 100644
--- a/app/views/diary_entries/_diary_entry_heading.html.erb
+++ b/app/views/diary_entries/_diary_entry_heading.html.erb
@@ -13,7 +13,7 @@
<% end %>
- <%= t("diary_entries.diary_entry.posted_by_html", :link_user => (link_to diary_entry.user.display_name, user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to diary_entry.language.name, :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code)) %>
+ <%= t("diary_entries.diary_entry.posted_by_html", :link_user => (link_to diary_entry.user.display_name, diary_entry.user), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to diary_entry.language.name, :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code)) %>
<% if (l(diary_entry.updated_at, :format => :blog) != l(diary_entry.created_at, :format => :blog)) %>
<%= t("diary_entries.diary_entry.updated_at_html", :updated => l(diary_entry.updated_at, :format => :blog)) %>
<% end %>
diff --git a/app/views/diary_entries/_location.html.erb b/app/views/diary_entries/_location.html.erb
index d5860f11d..ae48e86b9 100644
--- a/app/views/diary_entries/_location.html.erb
+++ b/app/views/diary_entries/_location.html.erb
@@ -1,7 +1,9 @@
<%= t ".location" %>
- "index", :anchor => "map=14/#{location.latitude}/#{location.longitude}" %>">
- number_with_precision(location.latitude, :precision => 4), :longitude => number_with_precision(location.longitude, :precision => 4) %>">
-<%= describe_location location.latitude, location.longitude, 14, location.language_code %>
-
-
+<%= link_to root_path(:anchor => "map=14/#{location.latitude}/#{location.longitude}") do
+ tag.abbr :class => "geo",
+ :title => t(".coordinates", :latitude => number_with_precision(location.latitude, :precision => 4),
+ :longitude => number_with_precision(location.longitude, :precision => 4)) do
+ describe_location location.latitude, location.longitude, 14, location.language_code
+ end
+ end %>
diff --git a/app/views/diary_entries/comments.html.erb b/app/views/diary_entries/comments.html.erb
index 61ceccdc0..aa0fceb95 100644
--- a/app/views/diary_entries/comments.html.erb
+++ b/app/views/diary_entries/comments.html.erb
@@ -1,6 +1,6 @@
<% content_for :heading do %>
<%= t ".heading", :user => @user.display_name %>
- <%= t ".subheading_html", :user => link_to(@user.display_name, user_path(@user)) %>
+
<%= t ".subheading_html", :user => link_to(@user.display_name, @user) %>
<% end %>
<% if @comments.empty? %>
diff --git a/app/views/diary_entries/show.html.erb b/app/views/diary_entries/show.html.erb
index 63ab89b8f..0aea2d442 100644
--- a/app/views/diary_entries/show.html.erb
+++ b/app/views/diary_entries/show.html.erb
@@ -19,9 +19,9 @@
<% if current_user %>
<% if @entry.subscribers.exists?(current_user.id) %>
- <%= link_to t("javascripts.changesets.show.unsubscribe"), diary_entry_unsubscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => "btn btn-sm btn-primary" %>
+ <%= link_to t("javascripts.changesets.show.unsubscribe"), diary_entry_unsubscribe_path(@entry.user, @entry), :method => :post, :class => "btn btn-sm btn-primary" %>
<% else %>
- <%= link_to t("javascripts.changesets.show.subscribe"), diary_entry_subscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => "btn btn-sm btn-primary" %>
+ <%= link_to t("javascripts.changesets.show.subscribe"), diary_entry_subscribe_path(@entry.user, @entry.id), :method => :post, :class => "btn btn-sm btn-primary" %>
<% end %>
<% end %>
diff --git a/test/controllers/diary_entries_controller_test.rb b/test/controllers/diary_entries_controller_test.rb
index 84d650e23..94b706975 100644
--- a/test/controllers/diary_entries_controller_test.rb
+++ b/test/controllers/diary_entries_controller_test.rb
@@ -886,8 +886,9 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest
get diary_comments_path(:display_name => other_user.display_name)
assert_response :success
assert_template :comments
- assert_select "table.table-striped" do
- assert_select "tr", :count => 2 # header and one comment
+ assert_dom "a[href='#{user_path(other_user)}']", :text => other_user.display_name
+ assert_select "table.table-striped tbody" do
+ assert_select "tr", :count => 1
end
# Test a suspended user