20150971000001_update_settings4.rb 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. class UpdateSettings4 < ActiveRecord::Migration
  2. def up
  3. Setting.create_or_update(
  4. title: 'Authentication via Twitter',
  5. name: 'auth_twitter',
  6. area: 'Security::ThirdPartyAuthentication',
  7. description: "@T('Enables user authentication via twitter. Register your app first at [Twitter Developer Site](https://dev.twitter.com/apps)')",
  8. options: {
  9. form: [
  10. {
  11. display: '',
  12. null: true,
  13. name: 'auth_twitter',
  14. tag: 'boolean',
  15. options: {
  16. true => 'yes',
  17. false => 'no',
  18. },
  19. },
  20. ],
  21. },
  22. state: false,
  23. frontend: true
  24. )
  25. Setting.create_or_update(
  26. title: 'Authentication via Facebook',
  27. name: 'auth_facebook',
  28. area: 'Security::ThirdPartyAuthentication',
  29. description: "@T('Enables user authentication via Facebook. Register your app first at [Facebook Developer Site](https://developers.facebook.com/apps/)')",
  30. options: {
  31. form: [
  32. {
  33. display: '',
  34. null: true,
  35. name: 'auth_facebook',
  36. tag: 'boolean',
  37. options: {
  38. true => 'yes',
  39. false => 'no',
  40. },
  41. },
  42. ],
  43. },
  44. state: false,
  45. frontend: true
  46. )
  47. Setting.create_or_update(
  48. title: 'Ticket Hook Position',
  49. name: 'ticket_hook_position',
  50. area: 'Ticket::Base',
  51. description: "@T('The format of the subject.')
  52. * @T('**Right** means **Some Subject [Ticket#12345]**')
  53. * @T('**Left** means **[Ticket#12345] Some Subject**')
  54. * @T('**None** means **Some Subject** (without ticket number). In the last case you should enable *postmaster_follow_up_search_in* to recognize followups based on email headers and/or body.')",
  55. options: {
  56. form: [
  57. {
  58. display: '',
  59. null: true,
  60. name: 'ticket_hook_position',
  61. tag: 'select',
  62. options: {
  63. 'left' => 'left',
  64. 'right' => 'right',
  65. 'none' => 'none',
  66. },
  67. },
  68. ],
  69. },
  70. state: 'right',
  71. frontend: false
  72. )
  73. Setting.create_or_update(
  74. title: 'Ticket Number Format',
  75. name: 'ticket_number',
  76. area: 'Ticket::Number',
  77. description: "@T('Selects the ticket number generator module.')
  78. * @T('**Increment** increments the ticket number, the SystemID and the counter are used with SystemID.Counter format (e.g. 1010138, 1010139).')
  79. * @T('With **Date** the ticket numbers will be generated by the current date, the SystemID and the counter. The format looks like Year.Month.Day.SystemID.counter (e.g. 201206231010138, 201206231010139).')
  80. @T('With param 'Checksum => true' the counter will be appended as checksum to the string. The format looks like SystemID.Counter.CheckSum (e. g. 10101384, 10101392) or Year.Month.Day.SystemID.Counter.CheckSum (e.g. 2012070110101520, 2012070110101535).')",
  81. options: {
  82. form: [
  83. {
  84. display: '',
  85. null: true,
  86. name: 'ticket_number',
  87. tag: 'select',
  88. options: {
  89. 'Ticket::Number::Increment' => 'Increment (SystemID.Counter)',
  90. 'Ticket::Number::Date' => 'Date (Year.Month.Day.SystemID.Counter)',
  91. },
  92. },
  93. ],
  94. },
  95. state: 'Ticket::Number::Increment',
  96. frontend: false
  97. )
  98. Setting.create_or_update(
  99. title: 'Additional follow up detection',
  100. name: 'postmaster_follow_up_search_in',
  101. area: 'Email::Base',
  102. description: 'In default the follow up check is done via the subject of an email. With this setting you can add more fields where the follow up ckeck is executed.',
  103. options: {
  104. form: [
  105. {
  106. display: '',
  107. null: true,
  108. name: 'postmaster_follow_up_search_in',
  109. tag: 'checkbox',
  110. options: {
  111. 'references' => 'References - Search for follow up also in In-Reply-To or References headers.',
  112. 'body' => 'Body - Search for follow up also in mail body.',
  113. 'attachment' => 'Attachment - Search for follow up also in attachments.',
  114. },
  115. },
  116. ],
  117. },
  118. state: [],
  119. frontend: false
  120. )
  121. end
  122. end