Index: branches/5.1.x/core/units/phrases/phrases_config.php =================================================================== diff -u -r12127 -r12657 --- branches/5.1.x/core/units/phrases/phrases_config.php (.../phrases_config.php) (revision 12127) +++ branches/5.1.x/core/units/phrases/phrases_config.php (.../phrases_config.php) (revision 12657) @@ -1,6 +1,6 @@ 'phrases', @@ -20,40 +22,31 @@ 'ForeignKey' => false, 'ParentTableKey' => false, 'ParentPrefix' => false, + + 'Sections' => Array ( + // "Phrases" + 'in-portal:phrases' => Array ( + 'parent' => 'in-portal:site', + 'icon' => 'phrases_labels', + 'label' => 'la_title_Phrases', + 'url' => Array ('t' => 'languages/phrase_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete'), +// 'perm_prefix' => 'lang', + 'priority' => 4, +// 'show_mode' => smSUPER_ADMIN, + 'type' => stTREE, + ), + ), ) ), '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'), + 'TagProcessorClass' => Array ('class' => 'PhraseTagProcessor', 'file' => 'phrase_tp.php', 'build_event' => 'OnBuild'), 'AutoLoad' => true, - 'Hooks' => Array ( - Array ( - 'Mode' => hBEFORE, - 'Conditional' => false, - 'HookToPrefix' => 'phrases', - 'HookToSpecial' => '', - 'HookToEvent' => Array('OnCreate'), - 'DoPrefix' => 'phrases', - 'DoSpecial' => '', - 'DoEvent' => 'OnBeforePhraseCreate', - ), - - Array ( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'phrases', - 'HookToSpecial' => '', - 'HookToEvent' => Array('OnBeforeItemCreate', 'OnBeforeItemUpdate'), - 'DoPrefix' => 'phrases', - 'DoSpecial' => '', - 'DoEvent' => 'OnSetLastUpdated', - ), - ), - 'QueryString' => Array ( 1 => 'id', 2 => 'page', @@ -103,21 +96,6 @@ ) ), - 'Sections' => Array ( - // "Phrases" - 'in-portal:phrases' => Array ( - 'parent' => 'in-portal:site', - 'icon' => 'conf_regional', - 'label' => 'la_title_Phrases', - 'url' => Array ('t' => 'languages/phrase_list', 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit', 'delete'), -// 'perm_prefix' => 'lang', - 'priority' => 5, -// 'show_mode' => smSUPER_ADMIN, - 'type' => stTREE, - ), - ), - 'TableName' => TABLE_PREFIX . 'Phrase', 'CalculatedFields' => Array ( @@ -157,7 +135,7 @@ 'required' => 1, 'unique' => Array ('LanguageId'), 'not_null' => 1, 'default' => '' ), - + 'PhraseKey' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => NULL), 'Translation' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'required' => 1, 'not_null' => 1, 'using_fck' => 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), @@ -180,7 +158,7 @@ 'VirtualFields' => Array ( 'PrimaryTranslation' => Array (), 'LangFile' => Array (), - 'ImportOverwrite' => Array (), + 'ImportOverwrite' => Array ('type' => 'int', 'default' => 0), 'DoNotEncode' => Array (), 'PackName' => Array ( 'type' => 'string', @@ -191,27 +169,36 @@ 'Grids' => Array ( 'Default' => Array ( - 'Icons' => Array ('default' => 'icon16_language_var.gif'), + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + ), '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'), + 'PhraseId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50), + 'Phrase' => Array ('title' => 'la_col_Label', 'data_block' => 'grid_checkbox_td', 'width' => 200), + 'Translation' => Array ('title' => 'la_col_Phrase', 'width' => 200), + 'PrimaryTranslation' => Array ('title' => 'la_col_PrimaryValue', 'width' => 200), + 'PhraseType' => Array ('title' => 'la_col_PhraseType', 'filter_block' => 'grid_options_filter', 'width' => 60), + 'LastChanged' => Array ('title' => 'la_col_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 150), + 'Module' => Array ('title' => 'la_col_Module', 'filter_block' => 'grid_options_filter', 'width' => 100), ), ), 'Phrases' => Array ( - 'Icons' => Array ('default' => 'icon16_language_var.gif'), + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + ), 'Fields' => Array ( 'PhraseId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50), - 'Phrase' => Array ('title' => 'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 150), - 'Translation' => Array ('title' => 'la_col_Translation', 'filter_block' => 'grid_like_filter', 'width' => 150), - 'PackName' => Array ('title' => 'la_col_Language', 'filter_block' => 'grid_options_filter', 'width' => 100), + 'Phrase' => Array ('title' => 'la_col_Label', 'filter_block' => 'grid_like_filter', 'width' => 170), + 'Translation' => Array ('title' => 'la_col_Phrase', 'filter_block' => 'grid_like_filter', 'width' => 180), + 'PackName' => Array ('title' => 'la_col_Language', 'filter_block' => 'grid_options_filter', 'width' => 95), 'PhraseType' => Array ('title' => 'la_col_Location', 'filter_block' => 'grid_options_filter', 'width' => 80), - 'LastChanged' => Array ('title' => 'la_col_LastChanged', 'filter_block' => 'grid_date_range_filter'), - 'Module' => Array ('title' => 'la_col_Module', 'filter_block' => 'grid_options_filter'), + 'LastChanged' => Array ('title' => 'la_col_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 145), + 'Module' => Array ('title' => 'la_col_Module', 'filter_block' => 'grid_options_filter', 'width' => 100), ), ), ),