"Fossies" - the Fresh Open Source Software Archive

Member "db/migrate/20170123000001_ui_ticket_zoom_article_new_internal.rb" (25 Mar 2021, 957 Bytes) of package /linux/www/zammad-4.0.0.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ruby source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "20170123000001_ui_ticket_zoom_article_new_internal.rb": 3.4.1_vs_3.5.0.

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