Add contents to issue reporters page

This commit is contained in:
Anton Khorev 2025-03-07 17:58:05 +03:00
parent 474c7edad5
commit 1633671aee
3 changed files with 15 additions and 0 deletions

View file

@ -10,6 +10,14 @@ module Issues
def index
@issue = Issue.visible_to(current_user).find(params[:issue_id])
user_ids = @issue.reports.order(:created_at => :desc).pluck(:user_id).uniq
@unique_reporters = {
@issue.id => {
:count => user_ids.size,
:users => User.in_order_of(:id, user_ids)
}
}
rescue ActiveRecord::RecordNotFound
redirect_to :controller => "/errors", :action => "not_found"
end

View file

@ -0,0 +1,5 @@
<% content_for :heading do %>
<h1><%= t ".title", :issue_id => @issue.id %></h1>
<% end %>
<%= render :partial => "reporters", :locals => { :issue => @issue } %>

View file

@ -1581,6 +1581,8 @@ en:
diary_comment: "%{entry_title}, comment #%{comment_id}"
note: "Note #%{note_id}"
reporters:
index:
title: "Issue #%{issue_id} Reporters"
reporters:
more_reporters: "and %{count} more"
issue_comments: