Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F848285
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
Sun, Apr 20, 2:46 AM
Size
10 KB
Mime Type
text/x-diff
Expires
Tue, Apr 22, 2:46 AM (18 h, 21 m)
Engine
blob
Format
Raw Data
Handle
603008
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/5.0.x/core/units/email_events/email_events_config.php
===================================================================
--- branches/5.0.x/core/units/email_events/email_events_config.php (revision 12481)
+++ branches/5.0.x/core/units/email_events/email_events_config.php (revision 12482)
@@ -1,149 +1,149 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.net/license/ for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => 'emailevents',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'EmailEventsEventsHandler', 'file' => 'email_events_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'EventId',
'StatusField' => Array ('Enabled'),
'TitleField' => 'Event',
'TitlePresets' => Array (
'default' => Array (
'edit_status_labels' => Array ('emailevents' => '!la_title_EditingEmailEvent!'),
),
'email_settings_list' => Array ('prefixes' => Array ('emailevents.module_List'), 'format' => '!la_title_EmailSettings!'),
'email_settings_edit' => Array (
'prefixes' => Array ('emailevents'), 'format' => "#emailevents_status# '#emailevents_titlefield#'",
'toolbar_button' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
'email_send_form' => Array ('prefixes' => Array (), 'format' => '!la_title_SendEmail!'),
'email_prepare' => Array ('prefixes' => Array (), 'format' => '!la_title_PreparingEmailsForSending!. !la_title_PleaseWait!'),
'email_send' => Array ('prefixes' => Array (), 'format' => '!la_title_SendingPreparedEmails!. !la_title_PleaseWait!'),
'email_send_complete' => Array ('prefixes' => Array (), 'format' => '!la_title_SendMailComplete!'),
),
'PermSection' => Array ('main' => 'in-portal:configure_lang'),
'FilterMenu' => Array (
'Groups' => Array (
Array ('mode' => 'AND', 'filters' => Array ('show_enabled', 'show_disabled', 'show_frontonly'), 'type' => WHERE_FILTER),
),
'Filters' => Array (
'show_enabled' => Array ('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => '%1$s.Enabled != 1' ),
'show_disabled' => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Enabled != 0' ),
'show_frontonly' => Array ('label' => 'la_Text_FrontOnly', 'on_sql' => '', 'off_sql' => '%1$s.Enabled != 2' ),
)
),
'TableName' => TABLE_PREFIX . 'Events',
'CalculatedFields' => Array (
'' => Array (
'FromUser' => 'u.Login',
)
),
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN ' . TABLE_PREFIX . 'PortalUser u ON %1$s.FromUserId = u.PortalUserId',
),
'ListSortings' => Array (
'' => Array ('Sorting' => Array ('Module' => 'asc', 'Description' => 'asc')),
'module' => Array ('Sorting' => Array ('Description' => 'asc') ),
),
'Fields' => Array (
'EventId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Event' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''),
'ReplacementTags' => Array ('type' => 'string', 'default' => NULL),
'Enabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1
),
'FrontEndOnly' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
'FromUserId' => Array (
'type' => 'int',
'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (-1 => 'root'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login',
'default' => NULL
),
'Module' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''),
'Description' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''),
'Type' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Text_Admin', 0 => 'la_Text_User'), 'use_phrases' => 1,
'not_null' => 1, 'required' => 1, 'default' => 0
),
),
'VirtualFields' => Array (
'FromUser' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array ('default' => 'icon16_custom.gif'),
'Fields' => Array (
'EventId' => Array ('title' => 'la_col_Id', 'filter_block' => 'grid_range_filter'),
'Description' => Array ( 'title' => 'la_col_Description', 'data_block' => 'label_grid_checkbox_td', 'filter_block' => 'grid_like_filter'),
'Event' => Array ( 'title' => 'la_col_Event', 'filter_block' => 'grid_like_filter'),
'Module' => Array ( 'title' => 'la_col_Module', 'filter_block' => 'grid_like_filter'),
'Type' => Array ( 'title' => 'la_col_Type', 'filter_block' => 'grid_options_filter'),
'Enabled' => Array ( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'),
),
),
'EmailSettings' => Array (
'Icons' => Array ('default' => 'icon16_custom.gif'),
'Fields' => Array (
'EventId' => Array ('title' => 'la_col_Id', 'filter_block' => 'grid_range_filter'),
'Description' => Array ('title' => 'la_col_Description', 'data_block' => 'label_grid_checkbox_td' ),
'Type' => Array ('title' => 'la_col_Type', 'filter_block' => 'grid_options_filter'),
'Enabled' => Array ('title' => 'la_col_Enabled', 'filter_block' => 'grid_options_filter'),
'FrontEndOnly' => Array ('title' => 'la_col_FrontEndOnly', 'filter_block' => 'grid_options_filter'),
- 'FromUser' => Array ('title' => 'la_col_FromToUser', 'filter_block' => 'grid_like_filter'),
+ 'FromUser' => Array ('title' => 'la_col_FromToUser', 'data_block' => 'from_user_td', 'filter_block' => 'grid_like_filter'),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/core/admin_templates/config/config_email.tpl
===================================================================
--- branches/5.0.x/core/admin_templates/config/config_email.tpl (revision 12481)
+++ branches/5.0.x/core/admin_templates/config/config_email.tpl (revision 12482)
@@ -1,97 +1,105 @@
<inp2:m_include t="incs/header"/>
<inp2:m_Get name="section" result_to_var="section"/>
<inp2:m_RenderElement name="combined_header" prefix="emailevents.module" section="$section" perm_event="emailevents:OnLoad" grid="EmailSettings" title_preset="email_settings_list" pagination="1"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit() {
Application.SetVar('remove_specials[emailevents.module]', 1);
std_edit_item('emailevents.module', 'config/config_email_edit');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton(
new ToolBarButton(
'edit',
'<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>',
edit
)
);
a_toolbar.AddButton(
new ToolBarButton(
'usertogroup',
'<inp2:m_phrase label="la_ToolTip_SelectUser" escape="1"/>',
function () {
openSelector('emailevents.module', '<inp2:m_t t="user_selector" pass="all,emailevents.module" escape="1"/>', 'FromUserId', null, 'OnSaveSelected');
}
)
);
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton(
new ToolBarButton(
'approve',
'<inp2:m_phrase label="la_ToolTip_Enable" escape="1"/>',
function() {
submit_event('emailevents.module','OnMassApprove');
}
)
);
a_toolbar.AddButton(
new ToolBarButton(
'decline',
'<inp2:m_phrase label="la_ToolTip_Disable" escape="1"/>',
function() {
submit_event('emailevents.module','OnMassDecline');
}
)
);
a_toolbar.AddButton(
new ToolBarButton(
'frontend_mail',
'<inp2:m_phrase label="la_ToolTip_Email_FrontOnly" escape="1"/>',
function() {
submit_event('emailevents.module','OnFrontOnly');
}
)
);
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
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="emailevents.module" grid="EmailSettings"/>
</tr>
</tbody>
</table>
+<inp2:m_DefineElement name="from_user_td">
+ <inp2:m_if check="Field" name="$field" db="db" equals_to="">
+ Root
+ <inp2:m_else/>
+ <inp2:Field name="$field"/>
+ </inp2:m_if>
+</inp2:m_DefineElement>
+
<inp2:m_RenderElement name="grid" PrefixSpecial="emailevents.module" IdField="EventId" grid="EmailSettings" menu_filters="yes"/>
<script type="text/javascript">
Grids['emailevents.module'].SetDependantToolbarButtons( new Array('frontend_mail','usertogroup','approve','decline','edit') );
</script>
<input type="hidden" name="emailevents.module_PopupSelectedUser" value=""/>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Event Timeline
Log In to Comment