20210906153600_issue_257_ticket_secondary_action.rb 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Issue257TicketSecondaryAction < ActiveRecord::Migration[6.0]
  3. def change
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. Setting.create_if_not_exists(
  7. title: 'Tab behaviour after ticket action',
  8. name: 'ticket_secondary_action',
  9. area: 'CustomerWeb::Base',
  10. description: 'Defines the tab behaviour after a ticket action.',
  11. options: {
  12. form: [
  13. {
  14. display: '',
  15. null: true,
  16. name: 'ticket_secondary_action',
  17. tag: 'boolean',
  18. options: {
  19. 'closeTab' => 'Close tab',
  20. 'closeTabOnTicketClose' => 'Close tab on ticket close',
  21. 'closeNextInOverview' => 'Next in overview',
  22. 'stayOnTab' => 'Stay on tab',
  23. },
  24. },
  25. ],
  26. },
  27. state: 'stayOnTab',
  28. preferences: {
  29. authentication: true,
  30. permission: ['admin.channel_web'],
  31. },
  32. frontend: true
  33. )
  34. end
  35. end