From 05ae0755a4b0810fdd012e2fb7a636b260ef69ce Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 28 Feb 2018 14:56:47 +0800 Subject: [PATCH] Rearrange issues table and combine some columns. --- app/views/issues/index.html.erb | 18 ++++++++---------- config/locales/en.yml | 10 ++++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 0edf364ec..2980f5e01 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -22,24 +22,22 @@ <%= t ".status" %> - <%= t ".number_of_reports" %> - <%= t ".last_updated_at" %> - <%= t ".last_updated_by" %> - <%= t ".link_to_reports" %> + <%= t ".reports" %> + <%= t ".reported_item" %> <%= t ".reported_user" %> - <%= t ".link_to_reported_instance" %> + <%= t ".last_updated_by" %> + <%= t ".last_updated_at" %> <% @issues.each do |issue| %> <%= t "issues.states.#{issue.status}" %> - <%= issue.reports_count %> - <%= l(issue.updated_at.to_datetime, :format => :friendly) %> - <% if issue.user_updated %> <%= issue.user_updated.display_name %> <% else %> - <% end %> - <%= link_to reportable_title(issue.reportable), issue %> + <%= 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, :controller => :user, :action => :view, :display_name => issue.reported_user.display_name if issue.reported_user %> - <%= link_to t(".show_instance"), reportable_url(issue.reportable) %> + <% if issue.user_updated %> <%= issue.user_updated.display_name %> <% else %> - <% end %> + <%= l(issue.updated_at.to_datetime, :format => :friendly) %> <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 3ff6b8c12..bb1292d9c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -924,13 +924,15 @@ en: user_not_found: User does not exist issues_not_found: No such issues found status: Status - show_instance: Show Instance - number_of_reports: Number of Reports + reports: Reports last_updated_at: Last Updated At last_updated_by: Last Updated By - link_to_reports: Link to Reports + link_to_reports: View Reports reported_user: Reported User - link_to_reported_instance: Link to Reported Instance + reports_count: + one: "1 Report" + other: "%{count} Reports" + reported_item: Reported Item create: successful_report: Your report has been registered sucessfully provide_details: Please provide the required details -- 2.39.5