20170123000001_ui_ticket_zoom_article_new_internal.rb 893 B

1234567891011121314151617181920212223242526272829303132333435
  1. class UiTicketZoomArticleNewInternal < ActiveRecord::Migration
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.find_by(name: 'system_init_done')
  5. Setting.create_if_not_exists(
  6. title: 'Define default visibility of new a new article',
  7. name: 'ui_ticket_zoom_article_new_internal',
  8. area: 'UI::TicketZoom',
  9. description: 'Set default visibility of new a new article.',
  10. options: {
  11. form: [
  12. {
  13. display: '',
  14. null: true,
  15. name: 'ui_ticket_zoom_article_new_internal',
  16. tag: 'boolean',
  17. translate: true,
  18. options: {
  19. true => 'internal',
  20. false => 'public',
  21. },
  22. },
  23. ],
  24. },
  25. state: true,
  26. preferences: {
  27. prio: 1,
  28. permission: ['admin.ui'],
  29. },
  30. frontend: true
  31. )
  32. end
  33. end