Add contents to issue reporters page
This commit is contained in:
parent
474c7edad5
commit
1633671aee
3 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<% content_for :heading do %>
|
||||
<h1><%= t ".title", :issue_id => @issue.id %></h1>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "reporters", :locals => { :issue => @issue } %>
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue