20190131000001_setting_change_ticket_zoom_attachment_preview.rb 922 B

12345678910111213141516171819202122232425262728293031323334
  1. class SettingChangeTicketZoomAttachmentPreview < ActiveRecord::Migration[5.1]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.exists?(name: 'system_init_done')
  5. Setting.create_or_update(
  6. title: 'Sidebar Attachments',
  7. name: 'ui_ticket_zoom_attachments_preview',
  8. area: 'UI::TicketZoom::Preview',
  9. description: 'Enables preview of attachments.',
  10. options: {
  11. form: [
  12. {
  13. display: '',
  14. null: true,
  15. name: 'ui_ticket_zoom_attachments_preview',
  16. tag: 'boolean',
  17. translate: true,
  18. options: {
  19. true => 'yes',
  20. false => 'no',
  21. },
  22. },
  23. ],
  24. },
  25. state: true,
  26. preferences: {
  27. prio: 400,
  28. permission: ['admin.ui'],
  29. },
  30. frontend: true
  31. )
  32. end
  33. end