From 6cf9f5dc9cba1b73d7f275560798d7dcc6a2e3ea Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 20 Mar 2024 04:38:34 +0300 Subject: [PATCH] Simplify link_to user calls on issue pages --- app/views/issues/_comments.html.erb | 4 ++-- app/views/issues/_reports.html.erb | 4 ++-- app/views/issues/index.html.erb | 4 ++-- app/views/issues/show.html.erb | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/issues/_comments.html.erb b/app/views/issues/_comments.html.erb index 7776d9ee3..9200b4cec 100644 --- a/app/views/issues/_comments.html.erb +++ b/app/views/issues/_comments.html.erb @@ -2,11 +2,11 @@ <% comments.each do |comment| %>
- <%= link_to user_thumbnail(comment.user), user_path(comment.user) %> + <%= link_to user_thumbnail(comment.user), comment.user %>

- <%= t ".comment_from_html", :user_link => link_to(comment.user.display_name, user_path(comment.user)), + <%= t ".comment_from_html", :user_link => link_to(comment.user.display_name, comment.user), :comment_created_at => tag.time(l(comment.created_at.to_datetime, :format => :friendly), :datetime => comment.created_at.xmlschema) %>

diff --git a/app/views/issues/_reports.html.erb b/app/views/issues/_reports.html.erb index 9ef28f1c2..2d1b78800 100644 --- a/app/views/issues/_reports.html.erb +++ b/app/views/issues/_reports.html.erb @@ -1,12 +1,12 @@ <% reports.each do |report| %>
- <%= link_to user_thumbnail(report.user), user_path(report.user) %> + <%= link_to user_thumbnail(report.user), report.user %>

<%= t ".reported_by_html", :category => report.category, - :user => link_to(report.user.display_name, user_path(report.user)), + :user => link_to(report.user.display_name, report.user), :updated_at => tag.time(l(report.updated_at.to_datetime, :format => :friendly), :datetime => report.updated_at.xmlschema) %>

diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 12ddf2b32..523f90846 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -59,10 +59,10 @@ <%= t ".states.#{issue.status}" %> <%= link_to t(".reports_count", :count => issue.reports_count), issue %> <%= link_to reportable_title(issue.reportable), reportable_url(issue.reportable) %> - <%= link_to issue.reported_user.display_name, user_path(issue.reported_user) if issue.reported_user %> + <%= link_to issue.reported_user.display_name, issue.reported_user if issue.reported_user %> <% if issue.user_updated %> - <%= t ".last_updated_time_ago_user_html", :user => link_to(issue.user_updated.display_name, user_path(issue.user_updated)), + <%= t ".last_updated_time_ago_user_html", :user => link_to(issue.user_updated.display_name, issue.user_updated), :time_ago => friendly_date_ago(issue.updated_at) %> <% else %> <%= friendly_date_ago(issue.updated_at) %> diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index e2099f8e6..8b5f7f42d 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -21,7 +21,7 @@ | <%= t ".last_updated_at_html", :datetime => tag.time(l(@issue.updated_at.to_datetime, :format => :friendly), :datetime => @issue.updated_at.xmlschema), - :displayname => link_to(@issue.user_updated.display_name, user_path(@issue.user_updated)) %> + :displayname => link_to(@issue.user_updated.display_name, @issue.user_updated) %> <% end %>

-- 2.39.5