diff --git a/app/decorators/post_report_decorator.rb b/app/decorators/post_report_decorator.rb index b1c4fcce4..3ebb3985f 100644 --- a/app/decorators/post_report_decorator.rb +++ b/app/decorators/post_report_decorator.rb @@ -14,6 +14,7 @@ def name(extension) def headers [ + "", @type.model_name.human, User.model_name.human ] @@ -23,10 +24,11 @@ def rows grouped_rows = [] @collection.each do |category, posts| - grouped_rows << [category.try(:name) || "-", ""] + grouped_rows << ["", category.try(:name) || "-", ""] posts.each do |post| grouped_rows << [ + post.id, post.title, "#{post.user} (#{post.member_uid})" ] diff --git a/app/views/application/_navbar.html.erb b/app/views/application/_navbar.html.erb index 840f9b003..4f41013a3 100644 --- a/app/views/application/_navbar.html.erb +++ b/app/views/application/_navbar.html.erb @@ -52,11 +52,31 @@
diff --git a/spec/decorators/post_report_decorator_spec.rb b/spec/decorators/post_report_decorator_spec.rb index a515b2fbc..f3d429d9d 100644 --- a/spec/decorators/post_report_decorator_spec.rb +++ b/spec/decorators/post_report_decorator_spec.rb @@ -24,6 +24,7 @@ it "#headers" do expect(decorator.headers).to eq([ + "", Offer.model_name.human, User.model_name.human ]) @@ -34,8 +35,8 @@ offer = org.offers.of_active_members.active.first expect(decorator.rows).to eq([ - [category.name, ""], - [offer.title, "#{offer.user} (#{offer.member_uid})"] + ["", category.name, ""], + [offer.id, offer.title, "#{offer.user} (#{offer.member_uid})"] ]) end end