Commit 2d1b88c1 authored by Marin Jankovski's avatar Marin Jankovski

Paginate audit events page and add time column.

parent 4734c3a7
...@@ -6,7 +6,7 @@ class AuditEventsController < ApplicationController ...@@ -6,7 +6,7 @@ class AuditEventsController < ApplicationController
layout "project_settings" layout "project_settings"
def project_log def project_log
@events = AuditEvent.where(entity_type: "Project", entity_id: project.id) @events = AuditEvent.where(entity_type: "Project", entity_id: project.id).page(params[:page]).per(30)
end end
private private
......
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
%th Action %th Action
%th %th
%th Target %th Target
%th
%th At
%tbody %tbody
- @events.each do |event| - @events.each do |event|
...@@ -25,6 +26,6 @@ ...@@ -25,6 +26,6 @@
%td #{raw human_text(event.details)} %td #{raw human_text(event.details)}
%td %td
%td #{event.details['target_details']} %td #{event.details['target_details']}
%td
%td #{event.created_at}
= paginate @events
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment