mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge pull request #1128 from nishanthvijayan/event-changelog
Improve event history page
This commit is contained in:
commit
99992750bb
8 changed files with 69 additions and 47 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue