mirror of
https://github.com/mastodon/mastodon.git
synced 2026-08-20 05:15:27 -05:00
add to controller and helper
This commit is contained in:
@@ -17,12 +17,14 @@ module Admin
|
||||
authorize @tag, :show?
|
||||
|
||||
@time_period = report_range
|
||||
@action_logs = Admin::ActionLogFilter.new(action_type: :update_tag).results.limit(5)
|
||||
end
|
||||
|
||||
def update
|
||||
authorize @tag, :update?
|
||||
|
||||
if @tag.update(tag_params.merge(reviewed_at: Time.now.utc))
|
||||
log_action :update, @tag
|
||||
redirect_to admin_tag_path(@tag.id), notice: I18n.t('admin.tags.updated_msg')
|
||||
else
|
||||
@time_period = report_range
|
||||
|
||||
@@ -37,6 +37,8 @@ module Admin::ActionLogsHelper
|
||||
end
|
||||
when 'Relay'
|
||||
link_to log.human_identifier, admin_relays_path
|
||||
when 'Tag'
|
||||
link_to log.human_identifier, admin_tags_path
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user