Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F803564
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Feb 25, 1:35 PM
Size
7 KB
Mime Type
text/x-diff
Expires
Thu, Feb 27, 1:35 PM (20 h, 14 m)
Engine
blob
Format
Raw Data
Handle
576368
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/RC/core/units/logs/change_logs/change_logs_config.php
===================================================================
--- branches/RC/core/units/logs/change_logs/change_logs_config.php (revision 11559)
+++ branches/RC/core/units/logs/change_logs/change_logs_config.php (revision 11560)
@@ -1,159 +1,166 @@
<?php
$config = Array (
'Prefix' => 'change-log',
'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
'RegisterClasses' => Array (
Array ('pseudo' => 'kChangesFormatter', 'class' => 'kChangesFormatter', 'file' => 'changes_formatter.php', 'build_event' => '', 'require_classes' => 'kFormatter'),
),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'ChangeLogId',
'StatusField' => Array ('Status'),
'TableName' => TABLE_PREFIX.'ChangeLogs',
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('change-log' => '!la_title_AddingChangeLog!'),
'edit_status_labels' => Array ('change-log' => '!la_title_EditingChangeLog!'),
),
- 'change_log_list' => Array ('prefixes' => Array('change-log_List'), 'format' => '!la_tab_ChangeLog!',),
- 'change_log_edit' => Array ('prefixes' => Array('change-log'), 'format' => '#change-log_status# #change-log_titlefield#',),
+ 'change_log_list' => Array (
+ 'prefixes' => Array('change-log_List'), 'format' => '!la_tab_ChangeLog!',
+ 'toolbar_buttons' => Array ('view_item', 'view'),
+ ),
+
+ 'change_log_edit' => Array (
+ 'prefixes' => Array('change-log'), 'format' => '#change-log_status# #change-log_titlefield#',
+ 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
+ ),
),
'PermSection' => Array ('main' => 'in-portal:change_logs'),
// don't forget to add corresponding permissions to install script
// INSERT INTO Permissions VALUES (0, 'in-portal:change_logs.view', 11, 1, 1, 0), (0, 'in-portal:change_logs.add', 11, 1, 1, 0), (0, 'in-portal:change_logs.edit', 11, 1, 1, 0), (0, 'in-portal:change_logs.delete', 11, 1, 1, 0);
'Sections' => Array (
'in-portal:change_logs' => Array (
'parent' => 'in-portal:reports',
'icon' => 'change_logs',
'label' => 'la_tab_ChangeLog',
'url' => Array('t' => 'logs/change_logs/change_log_list', 'pass' => 'm'),
'permissions' => Array('view', 'edit', 'delete'),
'priority' => 0.2,
'show_mode' => smSUPER_ADMIN,
'type' => stTREE,
),
),
'TitleField' => 'ChangeLogId',
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser AS u ON u.PortalUserId = %1$s.PortalUserId',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('OccuredOn' => 'desc'),
)
),
'CalculatedFields' => Array (
'' => Array (
'UserLogin' => 'IF(%1$s.PortalUserId = -1, \'root\', u.Login)',
'UserFirstName' => 'u.FirstName',
'UserLastName' => 'u.LastName',
'UserEmail' => 'u.Email',
),
),
'Fields' => Array (
'ChangeLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'SessionLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Action' => Array (
'type' => 'int', 'formatter' => 'kOptionsFormatter',
'options' => array (clCREATE => 'la_opt_ActionCreate', clUPDATE => 'la_opt_ActionUpdate', clDELETE => 'la_opt_ActionDelete'),
'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
'OccuredOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'time_format' => 'H:i:s', 'not_null' => 1, 'default' => 0),
'Prefix' => Array (
'type' => 'string', 'formatter' => 'kOptionsFormatter',
'options_sql' => 'SELECT DISTINCT %s FROM '.TABLE_PREFIX.'ChangeLogs ORDER BY Phrase',
'option_key_field' => 'Prefix',
'option_title_field' => 'CONCAT(\'la_prefix_\', Prefix) AS Phrase',
'use_phrases' => 1,
'max_len' => 255, 'not_null' => 1, 'default' => ''
),
'ItemId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Changes' => Array ('type' => 'string', 'formatter' => 'kChangesFormatter', 'not_null' => 1, 'default' => ''),
'MasterPrefix' => Array (
'type' => 'string', 'formatter' => 'kOptionsFormatter',
'options_sql' => 'SELECT DISTINCT %s FROM '.TABLE_PREFIX.'ChangeLogs ORDER BY Phrase',
'option_key_field' => 'MasterPrefix',
'option_title_field' => 'CONCAT(\'la_prefix_\',MasterPrefix) AS Phrase',
'use_phrases' => 1,
'max_len' => 255, 'not_null' => 1, 'default' => ''
),
'MasterId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
),
'Grids' => Array (
'Default' => Array (
'Fields' => Array (
'ChangeLogId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter',),
'PortalUserId' => Array ('title' => 'la_col_PortalUserId', 'filter_block' => 'grid_like_filter',),
'UserLogin' => Array ('title' => 'la_col_Username', 'filter_block' => 'grid_like_filter',),
'UserFirstName' => Array ('title' => 'la_col_FirstName', 'filter_block' => 'grid_like_filter',),
'UserLastName' => Array ('title' => 'la_col_LastName', 'filter_block' => 'grid_like_filter',),
'SessionLogId' => Array ('title' => 'la_col_SessionLogId', 'filter_block' => 'grid_like_filter',),
'Action' => Array ('title' => 'la_col_Action', 'filter_block' => 'grid_options_filter', ),
'OccuredOn' => Array ('title' => 'la_col_OccuredOn', 'filter_block' => 'grid_date_range_filter',),
'MasterPrefix' => Array ('title' => 'la_col_MasterPrefix', 'filter_block' => 'grid_options_filter', ),
'MasterId' => Array ('title' => 'la_col_MasterId', 'filter_block' => 'grid_range_filter',),
'Prefix' => Array ('title' => 'la_col_ItemPrefix', 'filter_block' => 'grid_options_filter', ),
'ItemId' => Array ('title' => 'la_col_ItemId', 'filter_block' => 'grid_range_filter',),
'Changes' => Array ('title' => 'la_col_Changes', 'data_block' => 'grid_changes_td', 'filter_block' => 'grid_like_filter',),
),
),
),
'ConfigMapping' => Array(
'PerPage' => 'Perpage_ChangeLog',
),
);
/* !!! Copy the rest of the file to appropriate files and templates
* !!! DON'T FORGET TO CREAT FIELDS AND GRIDS USING SYSTEM TOOLS SECTION !!!
/*
Don't forget to:
- Add table create statement to install_schema.sql
CREATE TABLE ChangeLogs (
`ChangeLogId` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`Title` VARCHAR( 255 ) NOT NULL ,
`Description` TEXT NULL ,
`Email` VARCHAR( 255 ) NOT NULL ,
`Type` TINYINT NOT NULL ,
`Phone` VARCHAR( 50 ) NOT NULL ,
`Qty` DOUBLE NOT NULL ,
`Status` TINYINT NOT NULL ,
`CreatedOn` INT NOT NULL ,
`Good` TINYINT NOT NULL
)
- Add permissions for admin gorup to install script (see 'Sections' key above)
*/
\ No newline at end of file
Property changes on: branches/RC/core/units/logs/change_logs/change_logs_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.4
\ No newline at end of property
+1.1.2.5
\ No newline at end of property
Event Timeline
Log In to Comment