Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Tue, Feb 25, 1:35 PM

in-portal

Index: branches/RC/core/units/logs/change_logs/change_logs_config.php
===================================================================
--- branches/RC/core/units/logs/change_logs/change_logs_config.php (revision 11557)
+++ branches/RC/core/units/logs/change_logs/change_logs_config.php (revision 11558)
@@ -1,159 +1,159 @@
<?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!',),
- 'changelog_edit' => Array ('prefixes' => Array('change-log'), 'format' => '#change-log_status# #change-log_titlefield#',),
+ 'change_log_edit' => Array ('prefixes' => Array('change-log'), 'format' => '#change-log_status# #change-log_titlefield#',),
),
'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.3
\ No newline at end of property
+1.1.2.4
\ No newline at end of property
Index: branches/RC/core/admin_templates/logs/visits/visits_list.tpl
===================================================================
--- branches/RC/core/admin_templates/logs/visits/visits_list.tpl (revision 11557)
+++ branches/RC/core/admin_templates/logs/visits/visits_list.tpl (revision 11558)
@@ -1,73 +1,73 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="visits" section="in-portal:visits" title_preset="visits_list" pagination="1"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
function edit()
{
}
a_toolbar.AddButton( new ToolBarButton('refresh', '<inp2:m_phrase label="la_ToolTip_Refresh" escape="1"/>', function() {
window.location.href = window.location.href;
}
) );
a_toolbar.AddButton( new ToolBarButton('reset', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
std_delete_items('visits');
}
) );
a_toolbar.AddButton( new ToolBarButton('export', '<inp2:m_phrase label="la_ToolTip_Export" escape="1"/>', function() {
- std_csv_export('visits', 'Visits', 'export/export_progress');
+ std_csv_export('visits', 'Default', 'export/export_progress');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="visits" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="grid_userlink_td">
<inp2:m_if check="UserFound" user_field="$user_field">
<a href="<inp2:UserLink edit_template='users/users_edit' user_field="$user_field"/>" onclick="return direct_edit('<inp2:m_Param name="PrefixSpecial"/>', this.href);" title="<inp2:m_phrase name="la_Edit_User"/>"><inp2:Field field="$field" grid="$grid"/></a>
<inp2:m_else/>
<inp2:Field field="$field" grid="$grid"/>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_referer_td">
<div style="overflow: hidden">
<inp2:m_if check="FieldEquals" field="$field" value="">
<span style="white-space: nowrap;"><inp2:m_Phrase label="la_visit_DirectReferer"/></span>
<inp2:m_else/>
<a href="<inp2:Field field="$field" grid="$grid"/>"><inp2:Field field="$field" grid="$grid" /></a>
</inp2:m_if>
</div>
</inp2:m_DefineElement>
<inp2:adm_SaveReturnScript/>
<inp2:m_RenderElement name="grid" PrefixSpecial="visits" IdField="VisitId" grid="Default" grid_filters="1"/>
<script type="text/javascript">
Grids['visits'].SetDependantToolbarButtons( new Array('reset') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/core/admin_templates/logs/visits/visits_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.16.2.4
\ No newline at end of property
+1.16.2.5
\ No newline at end of property

Event Timeline