Index: branches/5.3.x/core/units/email_templates/email_templates_config.php =================================================================== diff -u -N -r15988 -r16323 --- branches/5.3.x/core/units/email_templates/email_templates_config.php (.../email_templates_config.php) (revision 15988) +++ branches/5.3.x/core/units/email_templates/email_templates_config.php (.../email_templates_config.php) (revision 16323) @@ -1,6 +1,6 @@ Array ( 'prefixes' => Array ('email-template'), 'format' => '#email-template_status# - #email-template_titlefield# - !la_section_General!', - 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'), + 'toolbar_buttons' => Array ('select', 'setprimary', 'cancel', 'reset_edit', 'prev', 'next'), ), 'email_template_edit_settings' => Array ( @@ -71,6 +71,8 @@ ), ), + 'CheckSimulatniousEdit' => true, + 'PermSection' => Array ('main' => 'in-portal:configemail'), 'Sections' => Array ( @@ -87,8 +89,24 @@ 'TableName' => TABLE_PREFIX . 'EmailTemplates', + 'CalculatedFields' => Array ( + '' => Array ( + 'SourceSubject' => 'l%4$s_Subject', + 'SourceHtmlBody' => 'l%4$s_HtmlBody', + 'SourcePlainTextBody' => 'l%4$s_PlainTextBody', + + 'CurrentSubject' => 'l%5$s_Subject', + 'CurrentHtmlBody' => 'l%5$s_HtmlBody', + 'CurrentPlainTextBody' => 'l%5$s_PlainTextBody', + + 'TranslationInSync' => 'IF(l%5$s_TranslateFrom = 0, 1, 0)', + 'TranslateFromLanguage' => 'l%5$s_TranslateFrom', + ), + ), + 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s FROM %1$s', + '' => ' SELECT %1$s.* %2$s + FROM %1$s', ), 'ListSortings' => Array ( @@ -166,6 +184,12 @@ 'default' => null ), + 'TranslateFrom' => Array ( + 'type' => 'int', + 'formatter' => 'kMultiLanguage', 'db_type' => 'int', 'index_type' => 'int', + 'not_null' => 1, 'default' => 0 + ), + 'Enabled' => Array ( 'type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, @@ -220,6 +244,25 @@ 'Tag' => Array ('type' => 'string', 'default' => ''), 'Replacement' => Array ('type' => 'string', 'default' => ''), 'ReplacementTagsXML' => Array ('type' => 'string', 'default' => ''), + + 'SourceSubject' => Array ('type' => 'string', 'default' => ''), + 'SourceHtmlBody' => Array ('type' => 'string', 'default' => ''), + 'SourcePlainTextBody' => Array ('type' => 'string', 'default' => ''), + + 'CurrentSubject' => Array ('type' => 'string', 'default' => ''), + 'CurrentHtmlBody' => Array ('type' => 'string', 'default' => ''), + 'CurrentPlainTextBody' => Array ('type' => 'string', 'default' => ''), + + 'TranslationInSync' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, + 'default' => 0, + ), + 'TranslateFromLanguage' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName', 'option_title_field' => 'PackName', 'option_key_field' => 'LanguageId', + 'default' => 0, + ), ), 'Grids' => Array ( @@ -251,14 +294,16 @@ 'Fields' => Array ( 'TemplateId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 60, ), 'TemplateName' => Array ('filter_block' => 'grid_like_combo_filter', 'width' => 250, ), - 'Subject' => Array ('filter_block' => 'grid_like_filter', 'no_special' => 0, 'width' => 300, ), + 'CurrentSubject' => Array ('title' => 'column:la_fld_Subject', 'filter_block' => 'grid_like_filter', 'no_special' => 0, 'width' => 300, ), 'Description' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ), 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 60, ), 'Enabled' => Array ('filter_block' => 'grid_options_filter', 'width' => 70, ), 'Module' => Array ('filter_block' => 'grid_multioptions_filter', 'width' => 100, ), 'FrontEndOnly' => Array ('filter_block' => 'grid_options_filter', 'width' => 120, 'hidden' => 1), 'LastChanged' => Array ('title' => 'column:la_fld_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 150), + 'TranslationInSync' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, 'hidden' => 1), + 'TranslateFromLanguage' => Array ('filter_block' => 'grid_multioptions_filter', 'width' => 100, 'hidden' => 1), ), ), ), - ); \ No newline at end of file + );