Index: branches/5.2.x/core/units/themes/themes_config.php =================================================================== diff -u -N -r16084 -r16388 --- branches/5.2.x/core/units/themes/themes_config.php (.../themes_config.php) (revision 16084) +++ branches/5.2.x/core/units/themes/themes_config.php (.../themes_config.php) (revision 16388) @@ -1,6 +1,6 @@ 'theme', - 'ItemClass' => Array('class'=>'ThemeItem','file'=>'theme_item.php','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'ThemesEventHandler','file'=>'themes_eh.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'ThemesTagProcessor','file'=>'themes_tag_processor.php','build_event'=>'OnBuild'), - 'AutoLoad' => true, - 'Hooks' => Array(), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), +$config = Array ( + 'Prefix' => 'theme', + 'ItemClass' => Array ('class' => 'ThemeItem', 'file' => 'theme_item.php', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'ThemesEventHandler', 'file' => 'themes_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'ThemesTagProcessor', 'file' => 'themes_tag_processor.php', 'build_event' => 'OnBuild'), - 'IDField' => 'ThemeId', - 'StatusField' => Array('Enabled', 'PrimaryTheme'), + 'AutoLoad' => true, - 'PermSection' => Array('main' => 'in-portal:configure_themes'), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'Sections' => Array ( - 'in-portal:configure_themes' => Array ( - 'parent' => 'in-portal:website_setting_folder', - 'icon' => 'conf_themes', - 'label' => 'la_tab_Themes', - 'url' => Array('t' => 'themes/themes_list', 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit', 'delete'), - 'priority' => 5, - 'type' => stTREE, - ), - ), + 'IDField' => 'ThemeId', + 'StatusField' => Array ('Enabled', 'PrimaryTheme'), - 'TitleField' => 'Name', + 'PermSection' => Array ('main' => 'in-portal:configure_themes'), - 'TitlePresets' => Array ( - 'default' => Array ( - 'new_status_labels' => Array('theme' => '!la_title_Adding_Theme!'), - 'edit_status_labels' => Array('theme' => '!la_title_Editing_Theme!'), - 'new_titlefield' => Array('theme' => '!la_title_NewTheme!'), - ), + 'Sections' => Array ( + 'in-portal:configure_themes' => Array ( + 'parent' => 'in-portal:website_setting_folder', + 'icon' => 'conf_themes', + 'label' => 'la_tab_Themes', + 'url' => Array ('t' => 'themes/themes_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete'), + 'priority' => 5, + 'type' => stTREE, + ), + ), - 'themes_list' => Array( - 'prefixes' => Array('theme_List'), 'format' => "!la_tab_Themes!", - 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'setprimary', 'refresh', 'view', 'dbl-click'), - ), + 'TitleField' => 'Name', - 'themes_edit_general' => Array( - 'prefixes' => Array('theme'), 'format' => "#theme_status# '#theme_titlefield#' - !la_title_General!", - 'toolbar_buttons' => Array('select', 'cancel', 'prev', 'next'), - ), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('theme' => '!la_title_Adding_Theme!'), + 'edit_status_labels' => Array ('theme' => '!la_title_Editing_Theme!'), + 'new_titlefield' => Array ('theme' => '!la_title_NewTheme!'), + ), - 'themes_edit_files' => Array( - 'prefixes' => Array('theme', 'theme-file_List'), 'format' => "#theme_status# '#theme_titlefield#' - !la_title_ThemeFiles!", - 'toolbar_buttons' => Array('select', 'cancel', 'prev', 'next', 'edit', 'delete', 'view', 'dbl-click'), - ), + 'themes_list' => Array ( + 'prefixes' => Array ('theme_List'), 'format' => "!la_tab_Themes!", + 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'setprimary', 'refresh', 'view', 'dbl-click'), + ), - 'theme_file_edit' => Array ( - 'prefixes' => Array ('theme', 'theme-file'), - 'new_status_labels' => Array ('theme-file' => '!la_title_AddingThemeFile!'), - 'edit_status_labels' => Array ('theme-file' => '!la_title_EditingThemeFile!'), - 'new_titlefield' => Array ('theme-file' => '!la_title_NewThemeFile!'), - 'format' => "#theme_status# '#theme_titlefield#' - #theme-file_status# '#theme-file_titlefield#'", - 'toolbar_buttons' => Array('select', 'cancel', 'reset_edit', 'prev', 'next'), - ), + 'themes_edit_general' => Array ( + 'prefixes' => Array ('theme'), 'format' => "#theme_status# '#theme_titlefield#' - !la_title_General!", + 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'), + ), - 'block_edit' => Array('prefixes' => Array('theme-file'), 'format' => "!la_title_EditingThemeFile! '#theme-file_titlefield#'"), - ), + 'themes_edit_files' => Array ( + 'prefixes' => Array ('theme', 'theme-file_List'), 'format' => "#theme_status# '#theme_titlefield#' - !la_title_ThemeFiles!", + 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'edit', 'delete', 'view', 'dbl-click'), + ), - 'EditTabPresets' => Array ( - 'Default' => Array ( - 'general' => Array ('title' => 'la_tab_General', 't' => 'themes/themes_edit', 'priority' => 1), - 'files' => Array ('title' => 'la_tab_Files', 't' => 'themes/themes_edit_files', 'priority' => 2), - ), - ), + 'theme_file_edit' => Array ( + 'prefixes' => Array ('theme', 'theme-file'), + 'new_status_labels' => Array ('theme-file' => '!la_title_AddingThemeFile!'), + 'edit_status_labels' => Array ('theme-file' => '!la_title_EditingThemeFile!'), + 'new_titlefield' => Array ('theme-file' => '!la_title_NewThemeFile!'), + 'format' => "#theme_status# '#theme_titlefield#' - #theme-file_status# '#theme-file_titlefield#'", + 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'), + ), - 'TableName' => TABLE_PREFIX.'Themes', - 'SubItems' => Array('theme-file'), + 'block_edit' => Array ('prefixes' => Array ('theme-file'), 'format' => "!la_title_EditingThemeFile! '#theme-file_titlefield#'"), + ), - 'AutoDelete' => true, - 'AutoClone' => true, + 'EditTabPresets' => Array ( + 'Default' => Array ( + 'general' => Array ('title' => 'la_tab_General', 't' => 'themes/themes_edit', 'priority' => 1), + 'files' => Array ('title' => 'la_tab_Files', 't' => 'themes/themes_edit_files', 'priority' => 2), + ), + ), - 'ListSQLs' => Array ('' => 'SELECT %1$s.* %2$s FROM %s'), + 'TableName' => TABLE_PREFIX.'Themes', + 'SubItems' => Array ('theme-file'), - 'ListSortings' => Array ( - '' => Array( - 'Sorting' => Array('Name' => 'asc'), - ) - ), + 'AutoDelete' => true, + 'AutoClone' => true, - 'Fields' => Array( - 'ThemeId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Name' => Array('type' => 'string','not_null' => 1, 'required' => 1, 'default' => ''), - 'Enabled' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_Disabled', 1 => 'la_Enabled'), - 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, - ), - 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), - 'PrimaryTheme' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'CacheTimeout' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'StylesheetId' => Array('type' => 'int', /*'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Stylesheets', 'option_key_field' => 'StylesheetId', 'option_title_field' => 'Name',*/ 'not_null' => 1, 'default' => 0), - 'LanguagePackInstalled' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0 - ), - 'TemplateAliases' => Array ('type' => 'string', 'formatter' => 'kSerializedFormatter', 'default' => 'a:0:{}'), - 'StylesheetFile' => array( - 'type' => 'string', 'max_len' => 255, - 'error_msgs' => array('not_found' => '!la_error_FileNotFound!'), - 'not_null' => 1, 'default' => '' - ), - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %s' + ), - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - '0_0' => 'icon16_disabled.png', - '0_1' => 'icon16_disabled.png', - '1_0' => 'icon16_item.png', - '1_1' => 'icon16_primary.png', - ), - 'Fields' => Array( - 'ThemeId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), - 'Name' => Array('filter_block' => 'grid_like_filter', 'width' => 200, ), - 'Description' => Array('filter_block' => 'grid_like_filter', 'width' => 250, ), - 'Enabled' => Array( 'title'=>'column:la_fld_Status', 'filter_block' => 'grid_options_filter', 'width' => 200, ), -// 'PrimaryTheme' => Array( 'title'=>'column:la_fld_Primary', 'filter_block' => 'grid_options_filter'), - 'LanguagePackInstalled' => Array ('title' => 'la_col_LanguagePackInstalled', 'filter_block' => 'grid_options_filter', 'width' => 200,), - 'StylesheetFile' => array('filter_block' => 'grid_like_filter', 'width' => 150, 'hidden' => 1), - ), - ), - ), - ); + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Name' => 'asc'), + ) + ), + + 'Fields' => Array ( + 'ThemeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Name' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), + 'Enabled' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_Disabled', 1 => 'la_Enabled'), + 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, + ), + 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), + 'PrimaryTheme' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'CacheTimeout' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'StylesheetId' => Array ('type' => 'int', /*'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Stylesheets', 'option_key_field' => 'StylesheetId', 'option_title_field' => 'Name',*/ 'not_null' => 1, 'default' => 0), + 'LanguagePackInstalled' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0 + ), + 'TemplateAliases' => Array ('type' => 'string', 'formatter' => 'kSerializedFormatter', 'default' => 'a:0:{}'), + 'StylesheetFile' => array( + 'type' => 'string', 'max_len' => 255, + 'error_msgs' => array('not_found' => '!la_error_FileNotFound!'), + 'not_null' => 1, 'default' => '' + ), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + '0_0' => 'icon16_disabled.png', + '0_1' => 'icon16_disabled.png', + '1_0' => 'icon16_item.png', + '1_1' => 'icon16_primary.png', + ), + 'Fields' => Array ( + 'ThemeId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), + 'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ), + 'Description' => Array ('filter_block' => 'grid_like_filter', 'width' => 250, ), + 'Enabled' => Array ( 'title' => 'column:la_fld_Status', 'filter_block' => 'grid_options_filter', 'width' => 200, ), +// 'PrimaryTheme' => Array ( 'title' => 'column:la_fld_Primary', 'filter_block' => 'grid_options_filter'), + 'LanguagePackInstalled' => Array ('title' => 'la_col_LanguagePackInstalled', 'filter_block' => 'grid_options_filter', 'width' => 200,), + 'StylesheetFile' => array('filter_block' => 'grid_like_filter', 'width' => 150, 'hidden' => 1), + ), + ), + ), +);