Merge pull request #1128 from nishanthvijayan/event-changelog

Improve event history page
This commit is contained in:
Stella Rouzi 2016-08-16 18:23:56 +03:00 committed by GitHub
commit 99992750bb
8 changed files with 69 additions and 47 deletions

View file

@ -86,6 +86,9 @@ module Admin
@comment_count = @event.comment_threads.count
@ratings = @event.votes.includes(:user)
@difficulty_levels = @program.difficulty_levels
@versions = @event.versions |
PaperTrail::Version.where(item_type: 'Commercial').where_object(commercialable_id: @event.id, commercialable_type: 'Event') |
PaperTrail::Version.where(item_type: 'Commercial').where_object_changes(commercialable_id: @event.id, commercialable_type: 'Event')
end
def edit

View file

@ -29,7 +29,7 @@ module Admin
flash[:error] = 'Revert failed. Attribute missing or invalid'
end
redirect_to admin_revision_history_path
redirect_back_or_to admin_revision_history_path
end
def revert_object
@ -52,7 +52,7 @@ module Admin
flash[:error] = 'The item is already in the state that you are trying to revert it back to'
end
redirect_to admin_revision_history_path
redirect_back_or_to admin_revision_history_path
end
end
end