2017-09-08 08:28:34 +00:00
class TicketZoomSetting2 < ActiveRecord :: Migration [ 4 . 2 ]
2017-07-05 05:18:19 +00:00
def up
# return if it's a new setup
2020-08-03 08:35:43 +00:00
return if ! Setting . exists? ( name : 'system_init_done' )
2017-07-05 05:18:19 +00:00
setting = Setting . find_by ( name : 'ui_ticket_zoom_article_new_internal' )
if setting
setting . title = 'Note - default visibility'
setting . name = 'ui_ticket_zoom_article_note_new_internal'
setting . description = 'Default visibility for new articles.'
setting . preferences [ :prio ] = 100
setting . options [ :form ] [ 0 ] [ :name ] = 'ui_ticket_zoom_article_note_new_internal'
setting . save!
end
Setting . create_if_not_exists (
2018-12-19 17:31:51 +00:00
title : 'Note - default visibility' ,
name : 'ui_ticket_zoom_article_note_new_internal' ,
area : 'UI::TicketZoom' ,
2017-07-05 05:18:19 +00:00
description : 'Default visibility for new articles.' ,
2018-12-19 17:31:51 +00:00
options : {
2017-07-05 05:18:19 +00:00
form : [
{
2018-12-19 17:31:51 +00:00
display : '' ,
null : true ,
name : 'ui_ticket_zoom_article_note_new_internal' ,
tag : 'boolean' ,
2017-07-05 05:18:19 +00:00
translate : true ,
2018-12-19 17:31:51 +00:00
options : {
2017-07-05 05:18:19 +00:00
true = > 'internal' ,
false = > 'public' ,
} ,
} ,
] ,
} ,
2018-12-19 17:31:51 +00:00
state : true ,
2017-07-05 05:18:19 +00:00
preferences : {
2018-12-19 17:31:51 +00:00
prio : 100 ,
2017-07-05 05:18:19 +00:00
permission : [ 'admin.ui' ] ,
} ,
2018-12-19 17:31:51 +00:00
frontend : true
2017-07-05 05:18:19 +00:00
)
Setting . create_if_not_exists (
2018-12-19 17:31:51 +00:00
title : 'Email - subject field' ,
name : 'ui_ticket_zoom_article_email_subject' ,
area : 'UI::TicketZoom' ,
2017-07-05 05:18:19 +00:00
description : 'Use subject field for emails. If disabled, the ticket title will be used as subject.' ,
2018-12-19 17:31:51 +00:00
options : {
2017-07-05 05:18:19 +00:00
form : [
{
2018-12-19 17:31:51 +00:00
display : '' ,
null : true ,
name : 'ui_ticket_zoom_article_email_subject' ,
tag : 'boolean' ,
2017-07-05 05:18:19 +00:00
translate : true ,
2018-12-19 17:31:51 +00:00
options : {
2017-07-05 05:18:19 +00:00
true = > 'yes' ,
false = > 'no' ,
} ,
} ,
] ,
} ,
2018-12-19 17:31:51 +00:00
state : false ,
2017-07-05 05:18:19 +00:00
preferences : {
2018-12-19 17:31:51 +00:00
prio : 200 ,
2017-07-05 05:18:19 +00:00
permission : [ 'admin.ui' ] ,
} ,
2018-12-19 17:31:51 +00:00
frontend : true
2017-07-05 05:18:19 +00:00
)
2017-07-13 11:09:16 +00:00
Setting . create_if_not_exists (
2018-12-19 17:31:51 +00:00
title : 'Email - full quote' ,
name : 'ui_ticket_zoom_article_email_full_quote' ,
area : 'UI::TicketZoom' ,
2017-07-13 11:09:16 +00:00
description : 'Enable if you want to quote the full email in your answer. The quoted email will be put at the end of your answer. If you just want to quote a certain phrase, just mark the text and press reply (this feature is always available).' ,
2018-12-19 17:31:51 +00:00
options : {
2017-07-13 11:09:16 +00:00
form : [
{
2018-12-19 17:31:51 +00:00
display : '' ,
null : true ,
name : 'ui_ticket_zoom_article_email_full_quote' ,
tag : 'boolean' ,
2017-07-13 11:09:16 +00:00
translate : true ,
2018-12-19 17:31:51 +00:00
options : {
2017-07-13 11:09:16 +00:00
true = > 'yes' ,
false = > 'no' ,
} ,
} ,
] ,
} ,
2018-12-19 17:31:51 +00:00
state : false ,
2017-07-13 11:09:16 +00:00
preferences : {
2018-12-19 17:31:51 +00:00
prio : 220 ,
2017-07-13 11:09:16 +00:00
permission : [ 'admin.ui' ] ,
} ,
2018-12-19 17:31:51 +00:00
frontend : true
2017-07-13 11:09:16 +00:00
)
2017-07-05 05:18:19 +00:00
Setting . create_if_not_exists (
2018-12-19 17:31:51 +00:00
title : 'Twitter - tweet initials' ,
name : 'ui_ticket_zoom_article_twitter_initials' ,
area : 'UI::TicketZoom' ,
2017-07-05 05:18:19 +00:00
description : 'Add sender initials to end of a tweet.' ,
2018-12-19 17:31:51 +00:00
options : {
2017-07-05 05:18:19 +00:00
form : [
{
2018-12-19 17:31:51 +00:00
display : '' ,
null : true ,
name : 'ui_ticket_zoom_article_twitter_initials' ,
tag : 'boolean' ,
2017-07-05 05:18:19 +00:00
translate : true ,
2018-12-19 17:31:51 +00:00
options : {
2017-07-05 05:18:19 +00:00
true = > 'yes' ,
false = > 'no' ,
} ,
} ,
] ,
} ,
2018-12-19 17:31:51 +00:00
state : true ,
2017-07-05 05:18:19 +00:00
preferences : {
2018-12-19 17:31:51 +00:00
prio : 300 ,
2017-07-05 05:18:19 +00:00
permission : [ 'admin.ui' ] ,
} ,
2018-12-19 17:31:51 +00:00
frontend : true
2017-07-05 05:18:19 +00:00
)
end
end