2019-02-14 05:42:41 +00:00
|
|
|
class SettingChangeTicketZoomAttachmentPreview < ActiveRecord::Migration[5.1]
|
|
|
|
def up
|
|
|
|
# return if it's a new setup
|
2020-08-03 08:35:43 +00:00
|
|
|
return if !Setting.exists?(name: 'system_init_done')
|
2019-02-14 05:42:41 +00:00
|
|
|
|
|
|
|
Setting.create_or_update(
|
|
|
|
title: 'Sidebar Attachments',
|
|
|
|
name: 'ui_ticket_zoom_attachments_preview',
|
|
|
|
area: 'UI::TicketZoom::Preview',
|
|
|
|
description: 'Enables preview of attachments.',
|
|
|
|
options: {
|
|
|
|
form: [
|
|
|
|
{
|
|
|
|
display: '',
|
|
|
|
null: true,
|
|
|
|
name: 'ui_ticket_zoom_attachments_preview',
|
|
|
|
tag: 'boolean',
|
|
|
|
translate: true,
|
|
|
|
options: {
|
|
|
|
true => 'yes',
|
|
|
|
false => 'no',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
state: true,
|
|
|
|
preferences: {
|
|
|
|
prio: 400,
|
|
|
|
permission: ['admin.ui'],
|
|
|
|
},
|
|
|
|
frontend: true
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|