20190131000001_setting_change_ticket_zoom_attachment_preview.rb 999 B

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