Index: branches/RC/core/admin_templates/regional/phrases_edit.tpl =================================================================== diff -u -r8929 -r11134 --- branches/RC/core/admin_templates/regional/phrases_edit.tpl (.../phrases_edit.tpl) (revision 8929) +++ branches/RC/core/admin_templates/regional/phrases_edit.tpl (.../phrases_edit.tpl) (revision 11134) @@ -55,11 +55,16 @@ "> - - - + + + - + + + + + + Index: branches/RC/core/admin_templates/users/admins_edit_groups.tpl =================================================================== diff -u -r10020 -r11134 --- branches/RC/core/admin_templates/users/admins_edit_groups.tpl (.../admins_edit_groups.tpl) (revision 10020) +++ branches/RC/core/admin_templates/users/admins_edit_groups.tpl (.../admins_edit_groups.tpl) (revision 11134) @@ -40,7 +40,7 @@ a_toolbar.AddButton( new ToolBarButton('proj-base:usertogroup', '::', function() { - openSelector('u-ug', '', 'GroupId', '800x600'); + openSelector('u-ug', '', 'GroupId', '800x600'); } ) ); a_toolbar.AddButton( new ToolBarButton('delete', '', Index: branches/RC/core/units/phrases/phrases_config.php =================================================================== diff -u -r8929 -r11134 --- branches/RC/core/units/phrases/phrases_config.php (.../phrases_config.php) (revision 8929) +++ branches/RC/core/units/phrases/phrases_config.php (.../phrases_config.php) (revision 11134) @@ -1,141 +1,148 @@ 'phrases', - 'Clones' => array( - 'phrases-single' => array( - 'ForeignKey' => false, - 'ParentTableKey' => false, - 'ParentPrefix' => false, - ) - ), - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'PhrasesEventHandler','file'=>'phrases_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'), - 'AutoLoad' => true, + $config = Array ( + 'Prefix' => 'phrases', - 'Hooks' => Array( - Array( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'phrases', - 'HookToSpecial' => '', - 'HookToEvent' => Array('OnCreate'), - 'DoPrefix' => 'phrases', - 'DoSpecial' => '', - 'DoEvent' => 'OnBeforePhraseCreate', - ), + 'Clones' => Array ( + 'phrases-single' => Array ( + 'ForeignKey' => false, + 'ParentTableKey' => false, + 'ParentPrefix' => false, + ) + ), - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'phrases', - 'HookToSpecial' => '', - 'HookToEvent' => Array('OnBeforeItemCreate','OnBeforeItemUpdate'), - 'DoPrefix' => 'phrases', - 'DoSpecial' => '', - 'DoEvent' => 'OnSetLastUpdated', - ), - ), + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'PhrasesEventHandler', 'file' => 'phrases_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'QueryString' => Array( - 1 => 'id', - 2 => 'page', - 3 => 'event', - 4 => 'label', - 5 => 'mode', // labels can be edited directly - ), - 'IDField' => 'PhraseId', + 'AutoLoad' => true, - 'TitleField' => 'Phrase', + 'Hooks' => Array ( + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'phrases', + 'HookToSpecial' => '', + 'HookToEvent' => Array('OnCreate'), + 'DoPrefix' => 'phrases', + 'DoSpecial' => '', + 'DoEvent' => 'OnBeforePhraseCreate', + ), - 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('phrases'=>'!la_title_Adding_Phrase!'), - 'edit_status_labels' => Array('phrases'=>'!la_title_Editing_Phrase!'), - 'new_titlefield' => Array('phrases'=>''), - ), + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'phrases', + 'HookToSpecial' => '', + 'HookToEvent' => Array('OnBeforeItemCreate', 'OnBeforeItemUpdate'), + 'DoPrefix' => 'phrases', + 'DoSpecial' => '', + 'DoEvent' => 'OnSetLastUpdated', + ), + ), - 'phrase_edit' => Array('prefixes' => Array('phrases'), 'format' => '#phrases_status# #phrases_titlefield#'), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'page', + 3 => 'event', + 4 => 'label', + 5 => 'mode', // labels can be edited directly + ), - ), + 'IDField' => 'PhraseId', + 'TitleField' => 'Phrase', - 'FilterMenu' => Array( - 'Groups' => Array( - Array('mode' => 'AND', 'filters' => Array('show_front','show_admin','show_both'), 'type' => WHERE_FILTER), - Array('mode' => 'AND', 'filters' => Array('translated', 'not_translated'), 'type' => WHERE_FILTER), - ), - 'Filters' => Array( - 'show_front' => Array('label' =>'la_PhraseType_Front', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 0'), - 'show_admin' => Array('label' => 'la_PhraseType_Admin', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 1'), - 'show_both' => Array('label' => 'la_PhraseType_Both', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 2'), - 's1' => Array(), - 'translated' => Array('label' => 'la_PhraseTranslated', 'on_sql' => '', 'off_sql' => '%1$s.Translation = pri.Translation'), - 'not_translated' => Array('label' => 'la_PhraseNotTranslated', 'on_sql' => '', 'off_sql' => '%1$s.Translation != pri.Translation'), - ) - ), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('phrases' => '!la_title_Adding_Phrase!'), + 'edit_status_labels' => Array ('phrases' => '!la_title_Editing_Phrase!'), + ), - 'TableName' => TABLE_PREFIX.'Phrase', + 'phrase_edit' => Array ('prefixes' => Array ('phrases'), 'format' => '#phrases_status# #phrases_titlefield#'), + ), - 'CalculatedFields' => Array( - '' => Array( - 'PrimaryTranslation' => 'pri.Translation', - ), + 'FilterMenu' => Array ( + 'Groups' => Array ( + Array ('mode' => 'AND', 'filters' => Array ('show_front', 'show_admin', 'show_both'), 'type' => WHERE_FILTER), + Array ('mode' => 'AND', 'filters' => Array ('translated', 'not_translated'), 'type' => WHERE_FILTER), + ), + 'Filters' => Array ( + 'show_front' => Array ('label' =>'la_PhraseType_Front', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 0'), + 'show_admin' => Array ('label' => 'la_PhraseType_Admin', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 1'), + 'show_both' => Array ('label' => 'la_PhraseType_Both', 'on_sql' => '', 'off_sql' => '%1$s.PhraseType != 2'), + 's1' => Array (), + 'translated' => Array ('label' => 'la_PhraseTranslated', 'on_sql' => '', 'off_sql' => '%1$s.Translation = pri.Translation'), + 'not_translated' => Array ('label' => 'la_PhraseNotTranslated', 'on_sql' => '', 'off_sql' => '%1$s.Translation != pri.Translation'), + ) + ), - ), + 'TableName' => TABLE_PREFIX . 'Phrase', - 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Phrase pri ON (%1$s.Phrase = pri.Phrase) AND (pri.LanguageId = 1)'), + 'CalculatedFields' => Array ( + '' => Array ( + 'PrimaryTranslation' => 'pri.Translation', + ), + ), - 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Phrase pri ON (%1$s.Phrase = pri.Phrase) AND (pri.LanguageId = 1)',), + 'ListSQLs' => Array( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN ' . TABLE_PREFIX . 'Phrase pri ON (%1$s.Phrase = pri.Phrase) AND (pri.LanguageId = 1)' + ), - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('Phrase' => 'asc'), - ) - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Phrase' => 'asc'), + ) + ), - 'ForeignKey' => 'LanguageId', - 'ParentTableKey' => 'LanguageId', - 'ParentPrefix' => 'lang', - 'AutoDelete' => true, - 'AutoClone' => true, + 'ForeignKey' => 'LanguageId', + 'ParentTableKey' => 'LanguageId', + 'ParentPrefix' => 'lang', + 'AutoDelete' => true, + 'AutoClone' => true, - 'Fields' => Array( - 'Phrase' => Array('type' => 'string','required'=>1,'unique'=>Array('LanguageId'),'not_null' => '1','default' => ''), - 'Translation' => Array('type' => 'string','required'=>1,'not_null' => '1','default' => ''), - 'PhraseType' => Array('type' => 'int','required'=>1,'formatter'=>'kOptionsFormatter','options'=>Array(0=>'la_PhraseType_Front',1=>'la_PhraseType_Admin',2=>'la_PhraseType_Both'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'PhraseId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'LanguageId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'LastChanged' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'not_null' => 1, 'default' => 0), - 'LastChangeIP' => Array('type' => 'string','not_null' => 1, 'default' => ''), - 'Module' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>''), 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Modules WHERE Loaded = 1 ORDER BY LoadOrder', 'option_key_field'=>'Name', 'option_title_field'=>'Name', 'not_null' => 1, 'default' => 'In-Portal'), - ), + 'Fields' => Array ( + 'Phrase' => Array ( + 'type' => 'string', + 'required' => 1, 'unique' => Array ('LanguageId'), + 'not_null' => 1, 'default' => '' + ), - 'VirtualFields' => Array( - 'PrimaryTranslation' => Array(), - 'LangFile' => Array(), - 'ImportOverwrite' => Array(), - 'DoNotEncode' => Array(), - ), + 'Translation' => Array ('type' => 'string', 'required'=>1,'not_null' => '1', 'default' => ''), + 'PhraseType' => Array ('type' => 'int', 'required'=>1,'formatter' => 'kOptionsFormatter', 'options'=>Array (0=>'la_PhraseType_Front',1=>'la_PhraseType_Admin',2=>'la_PhraseType_Both'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), + 'PhraseId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array('default'=>'icon16_language_var.gif'), - 'Fields' => Array( - 'Phrase' => Array( 'title'=>'la_col_Label', 'data_block' => 'grid_checkbox_td'), - 'Translation' => Array( 'title'=>'la_col_Translation' ), - 'PrimaryTranslation' => Array( 'title'=>'la_col_PrimaryValue' ), - 'PhraseType' => Array( 'title'=>'la_col_PhraseType', 'filter_block' => 'grid_options_filter'), - 'LastChanged' => Array( 'title'=>'la_col_LastChanged', 'filter_block' => 'grid_date_range_filter'), - 'Module' => Array( 'title'=>'la_col_Module', 'filter_block' => 'grid_options_filter'), - ), + 'LanguageId' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Language ORDER BY LocalName', 'option_key_field' => 'LanguageId', 'option_title_field' => 'LocalName', + 'not_null' => 1, 'default' => 0 + ), - ), - ), - ); + 'LastChanged' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1, 'default' => 0), + 'LastChangeIP' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'Module' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => ''), 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Modules WHERE Loaded = 1 ORDER BY LoadOrder', 'option_key_field' => 'Name', 'option_title_field' => 'Name', 'not_null' => 1, 'default' => 'In-Portal'), + ), -?> \ No newline at end of file + 'VirtualFields' => Array ( + 'PrimaryTranslation' => Array (), + 'LangFile' => Array (), + 'ImportOverwrite' => Array (), + 'DoNotEncode' => Array (), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ('default' => 'icon16_language_var.gif'), + 'Fields' => Array ( + 'Phrase' => Array ('title' => 'la_col_Label', 'data_block' => 'grid_checkbox_td'), + 'Translation' => Array ('title' => 'la_col_Translation'), + 'PrimaryTranslation' => Array ('title' => 'la_col_PrimaryValue'), + 'PhraseType' => Array ('title' => 'la_col_PhraseType', 'filter_block' => 'grid_options_filter'), + 'LastChanged' => Array ('title' => 'la_col_LastChanged', 'filter_block' => 'grid_date_range_filter'), + 'Module' => Array ('title' => 'la_col_Module', 'filter_block' => 'grid_options_filter'), + ), + ), + ), + ); \ No newline at end of file