本文整理汇总了PHP中SubPanelTiles类的典型用法代码示例。如果您正苦于以下问题:PHP SubPanelTiles类的具体用法?PHP SubPanelTiles怎么用?PHP SubPanelTiles使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SubPanelTiles类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: _displaySubPanels
/**
* Override - Called from process(). This method will display subpanels.
* include/MVC/View/SugarView.php
*/
protected function _displaySubPanels()
{
if (isset($this->bean) && !empty($this->bean->id) && (file_exists("modules/" . $this->module . "/metadata/subpaneldefs.php") || file_exists("custom/modules/" . $this->module . "/Ext/Layoutdefs/layoutdefs.ext.php"))) {
$GLOBALS["focus"] = $this->bean;
require_once 'include/SubPanel/SubPanelTiles.php';
$subpanel = new SubPanelTiles($this->bean, $this->module);
//Dependent Logic
global $current_user;
require_once 'modules/ACLRoles/ACLRole.php';
$role = new ACLRole();
$user_id = $current_user->id;
$roles = $role->getUserRoleNames($user_id);
if (in_array("Technical support", $roles)) {
//Subpanels to hide
$hide_subpanels = array("bugs");
if (isset($subpanel->subpanel_definitions->layout_defs['subpanel_setup']["bugs"])) {
unset($subpanel->subpanel_definitions->layout_defs['subpanel_setup']["bugs"]);
}
}
echo $subpanel->display();
}
}
开发者ID:mihir-parikh,项目名称:sugarcrm_playground,代码行数:26,代码来源:view.detail.php
示例2: _displaySubPanels
/**
* Override - Called from process(). This method will display subpanels.
*/
protected function _displaySubPanels()
{
if (isset($this->bean) && !empty($this->bean->id) && (file_exists('modules/' . $this->module . '/metadata/subpaneldefs.php') || file_exists('custom/modules/' . $this->module . '/metadata/subpaneldefs.php') || file_exists('custom/modules/' . $this->module . '/Ext/Layoutdefs/layoutdefs.ext.php'))) {
$GLOBALS['focus'] = $this->bean;
require_once 'include/SubPanel/SubPanelTiles.php';
$subpanel = new SubPanelTiles($this->bean, $this->module);
//Subpanels to hide
$hideSubpanels = array('projecttask', 'tasks');
foreach ($hideSubpanels as $subpanelKey) {
//Remove subpanel if set
if (isset($subpanel->subpanel_definitions->layout_defs['subpanel_setup'][$subpanelKey])) {
unset($subpanel->subpanel_definitions->layout_defs['subpanel_setup'][$subpanelKey]);
}
}
echo $subpanel->display();
}
}
开发者ID:aldridged,项目名称:airtap-sugar,代码行数:20,代码来源:view.detail.php
示例3: display
function display()
{
global $app_list_strings;
$this->ss->assign('APP_LIST', $app_list_strings);
if (isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'set_target') {
require_once 'modules/Campaigns/utils.php';
//call function to create campaign logs
$mess = track_campaign_prospects($this->bean);
$confirm_msg = "var ajax_C_LOG_Status = new SUGAR.ajaxStatusClass();\n window.setTimeout(\"ajax_C_LOG_Status.showStatus('" . $mess . "')\",1000);\n window.setTimeout('ajax_C_LOG_Status.hideStatus()', 1500);\n window.setTimeout(\"ajax_C_LOG_Status.showStatus('" . $mess . "')\",2000);\n window.setTimeout('ajax_C_LOG_Status.hideStatus()', 5000); ";
$this->ss->assign("MSG_SCRIPT", $confirm_msg);
}
if ($this->bean->campaign_type == 'Email' || $this->bean->campaign_type == 'NewsLetter') {
$this->ss->assign("ADD_BUTTON_STATE", "submit");
$this->ss->assign("TARGET_BUTTON_STATE", "hidden");
} else {
$this->ss->assign("ADD_BUTTON_STATE", "hidden");
$this->ss->assign("DISABLE_LINK", "display:none");
$this->ss->assign("TARGET_BUTTON_STATE", "submit");
}
$currency = BeanFactory::getBean('Currencies');
if (!empty($this->bean->currency_id)) {
$currency->retrieve($this->bean->currency_id);
if ($currency->deleted != 1) {
$this->ss->assign('CURRENCY', $currency->iso4217 . ' ' . $currency->symbol);
} else {
$this->ss->assign('CURRENCY', $currency->getDefaultISO4217() . ' ' . $currency->getDefaultCurrencySymbol());
}
} else {
$this->ss->assign('CURRENCY', $currency->getDefaultISO4217() . ' ' . $currency->getDefaultCurrencySymbol());
}
parent::display();
//We want to display subset of available, panels, so we will call subpanel
//object directly instead of using sugarview.
$GLOBALS['focus'] = $this->bean;
require_once 'include/SubPanel/SubPanelTiles.php';
$subpanel = new SubPanelTiles($this->bean, $this->module);
//get available list of subpanels
$alltabs = $subpanel->subpanel_definitions->get_available_tabs();
if (!empty($alltabs)) {
//iterate through list, and filter out all but 3 subpanels
foreach ($alltabs as $key => $name) {
if ($name != 'prospectlists' && $name != 'emailmarketing' && $name != 'tracked_urls') {
//exclude subpanels that are not prospectlists, emailmarketing, or tracked urls
$subpanel->subpanel_definitions->exclude_tab($name);
}
}
//only show email marketing subpanel for email/newsletter campaigns
if ($this->bean->campaign_type != 'Email' && $this->bean->campaign_type != 'NewsLetter') {
//exclude emailmarketing subpanel if not on an email or newsletter campaign
$subpanel->subpanel_definitions->exclude_tab('emailmarketing');
// Bug #49893 - 20120120 - Captivea (ybi) - Remove trackers subpanels if not on an email/newsletter campaign (useless subpannl)
$subpanel->subpanel_definitions->exclude_tab('tracked_urls');
}
}
//show filtered subpanel list
echo $subpanel->display();
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:57,代码来源:view.detail.php
示例4: _displaySubPanels
/**
* Called from process(). This method will display subpanels.
*/
protected function _displaySubPanels()
{
if (isset($this->bean) && !empty($this->bean->id) && (file_exists('modules/' . $this->module . '/metadata/subpaneldefs.php') || file_exists('custom/modules/' . $this->module . '/metadata/subpaneldefs.php') || file_exists('custom/modules/' . $this->module . '/Ext/Layoutdefs/layoutdefs.ext.php'))) {
$GLOBALS['focus'] = $this->bean;
require_once 'include/SubPanel/SubPanelTiles.php';
$subpanel = new SubPanelTiles($this->bean, $this->module);
echo $subpanel->display();
}
}
开发者ID:omusico,项目名称:sugar_work,代码行数:12,代码来源:SugarView.php
示例5: unset
unset($categories2[$v]);
}
}
if (!empty($names)) {
$tdwidth = 100 / sizeof($names);
}
$sugar_smarty->assign('ROLE', $role->toArray());
//xye customization begin
$sugar_smarty->assign("CHECKED", $role->enablesoftphone ? "checked" : "");
//xye customization end
$sugar_smarty->assign('CATEGORIES', $categories);
$sugar_smarty->assign('CATEGORIES2', $categories2);
$sugar_smarty->assign('TDWIDTH', $tdwidth);
$sugar_smarty->assign('ACTION_NAMES', $names);
$return = array('module' => 'ACLRoles', 'action' => 'DetailView', 'record' => $role->id);
$sugar_smarty->assign('RETURN', $return);
$params = array();
$params[] = "<a href='index.php?module=ACLRoles&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>";
$params[] = $role->get_summary_text();
echo getClassicModuleTitle("ACLRoles", $params, true);
//$sugar_smarty->assign('TITLE', $title);
$hide_hide_supanels = true;
//xye customization begin
echo $sugar_smarty->fetch('custom/modules/ACLRoles/DetailView.tpl');
//xye customization end
//for subpanels the variable must be named focus;
$focus =& $role;
$_REQUEST['module'] = 'ACLRoles';
require_once 'include/SubPanel/SubPanelTiles.php';
$subpanel = new SubPanelTiles($role, 'ACLRoles');
echo $subpanel->display();
开发者ID:anhtuantt,项目名称:sugarcrm-twilio-example,代码行数:31,代码来源:DetailView.php
示例6: foreach
if (!$GLOBALS['current_user']->isAdminForModule('Users')) {
$tabs = $focus->getPreference('display_tabs');
global $modInvisList;
if (!empty($tabs)) {
foreach ($categories as $key => $value) {
if (!in_array($key, $tabs) && !in_array($key, $modInvisList)) {
unset($categories[$key]);
}
}
}
}
$names = array();
$names = ACLAction::setupCategoriesMatrix($categories);
if (!empty($names)) {
$tdwidth = 100 / sizeof($names);
}
$sugar_smarty->assign('APP', $app_list_strings);
$sugar_smarty->assign('CATEGORIES', $categories);
$sugar_smarty->assign('TDWIDTH', $tdwidth);
$sugar_smarty->assign('ACTION_NAMES', $names);
$title = getClassicModuleTitle('', array($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_ROLES_SUBPANEL_TITLE']), '');
$sugar_smarty->assign('TITLE', $title);
$sugar_smarty->assign('USER_ID', $focus->id);
$sugar_smarty->assign('LAYOUT_DEF_KEY', 'UserRoles');
echo $sugar_smarty->fetch('modules/ACLRoles/DetailViewUser.tpl');
//this gets its layout_defs.php file from the user not from ACLRoles so look in modules/Users for the layout defs
require_once 'include/SubPanel/SubPanelTiles.php';
$modules_exempt_from_availability_check = array('Users' => 'Users', 'ACLRoles' => 'ACLRoles');
$subpanel = new SubPanelTiles($focus, 'UserRoles');
echo $subpanel->display(true, true);
}
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:31,代码来源:DetailUserRole.php
示例7: processListNavigation
//.........这里部分代码省略.........
$onClick = '';
if (0 != preg_match('/javascript.*/', $end_URL)) {
$onClick = "\"{$end_URL};\"";
} else {
$onClick = "'location.href=\"{$end_URL}\";'";
}
$end_link = "<button type='button' name='listViewEndButton' class='button' title='{$this->local_app_strings['LNK_LIST_END']}' onClick=" . $onClick . ">" . SugarThemeRegistry::current()->getImage("end", "alt='" . $this->local_app_strings['LNK_LIST_END'] . "' border='0' align='absmiddle'") . "</button>";
}
}
$GLOBALS['log']->info("Offset (next, current, prev)({$next_offset}, {$current_offset}, {$previous_offset})");
$GLOBALS['log']->info("Start/end records ({$start_record}, {$end_record})");
$end_record = $end_record - 1;
echo "<script>\n function select_overlib() {\n return overlib('<a style=\\'width: 150px\\' name=\"thispage\" class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,\"yes\");\\' onmouseout=\\'unhiliteItem(this);\\' onclick=\\'if (document.MassUpdate.select_entire_list.value==1){document.MassUpdate.select_entire_list.value=0;sListView.check_all(document.MassUpdate, \"mass[]\", true, {$this->records_per_page})}else {sListView.check_all(document.MassUpdate, \"mass[]\", true)};\\' href=\\'#\\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_CURRENT']} ({$this->records_per_page})‎</a>" . "<a style=\\'width: 150px\\' name=\"selectall\" class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,\"yes\");\\' onmouseout=\\'unhiliteItem(this);\\' onclick=\\'sListView.check_entire_list(document.MassUpdate, \"mass[]\",true,{$row_count});\\' href=\\'#\\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_ENTIRE']} ({$row_count})‎</a>" . "<a style=\\'width: 150px\\' name=\"deselect\" class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,\"yes\");\\' onmouseout=\\'unhiliteItem(this);\\' onclick=\\'sListView.clear_all(document.MassUpdate, \"mass[]\", false);\\' href=\\'#\\'>{$this->local_app_strings['LBL_LISTVIEW_NONE']}</a>" . "', CENTER, '" . "', STICKY, MOUSEOFF, 3000, CLOSETEXT, '<img border=0 src=" . SugarThemeRegistry::current()->getImageURL('close_inline.gif') . ">', WIDTH, 150, CLOSETITLE, '" . $this->local_app_strings['LBL_ADDITIONAL_DETAILS_CLOSE_TITLE'] . "', CLOSECLICK, FGCLASS, 'olOptionsFgClass', " . "CGCLASS, 'olOptionsCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olOptionsCapFontClass', CLOSEFONTCLASS, 'olOptionsCloseFontClass');\n }\n </script>";
if ($this->show_select_menu) {
$select_link = "<a id='select_link' onclick='return select_overlib();' href=\"#\">" . $this->local_app_strings['LBL_LINK_SELECT'] . " <img src='" . SugarThemeRegistry::current()->getImageURL('MoreDetail.png') . "' width='11' height='7' border='0''>" . "</a>";
} else {
$select_link = " ";
}
// put overlib strings into functions to avoid backslash plague!
/*echo "<script>
function export_overlib() {
return overlib('<a style=\'width: 150px\' class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' onclick=\'return sListView.send_form(true, \"{$_REQUEST['module']}\", \"export.php\", \"{$this->local_app_strings['LBL_LISTVIEW_NO_SELECTED']}\")\' href=\'#\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_SELECTED']}</a>"
. "<a style=\'width: 150px\' class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' onclick=\'return sListView.send_form(false, \"{$_REQUEST['module']}\", \"export.php\", \"{$this->local_app_strings['LBL_LISTVIEW_NO_SELECTED']}\")\' href=\'#\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_CURRENT']}</a>"
. "<a style=\'width: 150px\' class=\'menuItem\' onmouseover=\'hiliteItem(this,\"yes\");\' onmouseout=\'unhiliteItem(this);\' href=\'export.php?module={$_REQUEST['module']}\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_ENTIRE']}</a>"
. "', CAPTION, '" . $this->local_app_strings['LBL_EXPORT']
. "', STICKY, MOUSEOFF, 3000, CLOSETEXT, '<img border=0 style=\'margin-left:2px; margin-right: 2px;\' src=" . $this->local_image_path
. "close.gif>', WIDTH, 150, CLOSETITLE, '" . $this->local_app_strings['LBL_ADDITIONAL_DETAILS_CLOSE_TITLE'] . "', CLOSECLICK, FGCLASS, 'olOptionsFgClass', "
. "CGCLASS, 'olOptionsCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olOptionsCapFontClass', CLOSEFONTCLASS, 'olOptionsCloseFontClass');
}
</script>";
*/
//$export_link = "<a id='export_link' onclick='return export_overlib();' href=\"#\">".SugarThemeRegistry::current()->getImage("export","alt='".$this->local_app_strings['LBL_EXPORT']."' border='0' align='absmiddle'")." ".$this->local_app_strings['LBL_EXPORT']."</a>";
$export_link = '<input class="button" type="button" value="' . $this->local_app_strings['LBL_EXPORT'] . '" ' . 'onclick="return sListView.send_form(true, \'' . $_REQUEST['module'] . '\', \'index.php?entryPoint=export\',\'' . $this->local_app_strings['LBL_LISTVIEW_NO_SELECTED'] . '\')">';
if ($this->show_delete_button) {
$delete_link = '<input class="button" type="button" name="Delete" value="' . $this->local_app_strings['LBL_DELETE_BUTTON_LABEL'] . '" onclick="return sListView.send_mass_update(\'selected\',\'' . $this->local_app_strings['LBL_LISTVIEW_NO_SELECTED'] . '\', 1)">';
} else {
$delete_link = ' ';
}
$admin = new Administration();
$admin->retrieveSettings('system');
$user_merge = $current_user->getPreference('mailmerge_on');
if ($user_merge == 'on' && isset($admin->settings['system_mailmerge_on']) && $admin->settings['system_mailmerge_on']) {
echo "<script>\n function mailmerge_overlib() {\n return overlib('<a style=\\'width: 150px\\' class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,\"yes\");\\' onmouseout=\\'unhiliteItem(this);\\' onclick=\\'return sListView.send_form(true, \"MailMerge\", \"index.php\", \"{$this->local_app_strings['LBL_LISTVIEW_NO_SELECTED']}\")\\' href=\\'#\\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_SELECTED']}</a>" . "<a style=\\'width: 150px\\' class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,\"yes\");\\' onmouseout=\\'unhiliteItem(this);\\' href=\\'index.php?action=index&module=MailMerge\\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_CURRENT']}</a>" . "<a style=\\'width: 150px\\' class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,\"yes\");\\' onmouseout=\\'unhiliteItem(this);\\' href=\\'index.php?action=index&module=MailMerge&entire=true\\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_ENTIRE']}</a>" . "', CAPTION, '" . $this->local_app_strings['LBL_MAILMERGE'] . "', STICKY, MOUSEOFF, 3000, CLOSETEXT, '<img border=0 style=\\'margin-left:2px; margin-right: 2px;\\' src=" . $this->local_image_path . "close.gif>', WIDTH, 150, CLOSETITLE, '" . $this->local_app_strings['LBL_ADDITIONAL_DETAILS_CLOSE_TITLE'] . "', CLOSECLICK, FGCLASS, 'olOptionsFgClass', " . "CGCLASS, 'olOptionsCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olOptionsCapFontClass', CLOSEFONTCLASS, 'olCloseFontClass');\n }\n </script>";
$merge_link = " | <a id='mailmerge_link' onclick='return mailmerge_overlib()'; href=\"#\">" . $this->local_app_strings['LBL_MAILMERGE'] . "</a>";
} else {
$merge_link = " ";
}
$selected_objects_span = " | {$this->local_app_strings['LBL_LISTVIEW_SELECTED_OBJECTS']}<input style='border: 0px; background: transparent; font-size: inherit; color: inherit' type='text' readonly name='selectCount[]' value='" . (!empty($select_entire_list) ? $row_count : 0) . "' />";
if ($_REQUEST['module'] == 'Home' || $this->local_current_module == 'Import' || $this->show_export_button == false || !empty($sugar_config['disable_export']) || !empty($sugar_config['admin_export_only']) && !(is_admin($current_user) || ACLController::moduleSupportsACL($_REQUEST['module']) && ACLAction::getUserAccessLevel($current_user->id, $_REQUEST['module'], 'access') == ACL_ALLOW_ENABLED && (ACLAction::getUserAccessLevel($current_user->id, $_REQUEST['module'], 'admin') == ACL_ALLOW_ADMIN || ACLAction::getUserAccessLevel($current_user->id, $_REQUEST['module'], 'admin') == ACL_ALLOW_ADMIN_DEV))) {
if ($_REQUEST['module'] != 'InboundEmail' && $_REQUEST['module'] != 'EmailMan' && $_REQUEST['module'] != 'iFrames') {
$selected_objects_span = '';
}
$export_link = " ";
$merge_link = " ";
} elseif ($_REQUEST['module'] != "Accounts" && $_REQUEST['module'] != "Cases" && $_REQUEST['module'] != "Contacts" && $_REQUEST['module'] != "Leads" && $_REQUEST['module'] != "Opportunities") {
$merge_link = " ";
}
if ($this->show_paging == true) {
if (!empty($sugar_config['disable_count_query'])) {
if ($row_count > $end_record) {
$row_count .= '+';
}
}
$html_text = '';
$html_text .= "<tr class='pagination'>\n";
$html_text .= "<td COLSPAN=\"{$col_count}\" align=\"right\">\n";
//$html_text .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td align=\"left\" >$export_link$merge_link$selected_objects_span</td>\n";
//$html_text .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td align=\"left\" >";
if ($subpanel_def != null) {
include_once 'include/SubPanel/SubPanelTiles.php';
$subpanelTiles = new SubPanelTiles($sugarbean);
$html_text .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td align=\"left\" >";
//attempt to get the query to recreate this subpanel
if (!empty($this->response)) {
$response =& $this->response;
} else {
$response = SugarBean::get_union_related_list($sugarbean, $this->sortby, $this->sort_order, $this->query_where, $current_offset, -1, -1, $this->query_limit, $subpanel_def);
$this->response = $response;
}
//if query is present, then pass it in as parameter
if (isset($response['query']) && !empty($response['query'])) {
$html_text .= $subpanelTiles->get_buttons($subpanel_def, $response['query']);
} else {
$html_text .= $subpanelTiles->get_buttons($subpanel_def);
}
} else {
$html_text .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td align=\"left\" nowrap>{$select_link} {$export_link} {$delete_link} {$selected_objects_span}";
}
$html_text .= "</td>\n<td nowrap align=\"right\">" . $start_link . " " . $previous_link . " <span class='pageNumbers'>(" . $start_record . " - " . $end_record . " " . $this->local_app_strings['LBL_LIST_OF'] . " " . $row_count . ")</span> " . $next_link . " " . $end_link . "</td></tr></table>\n";
$html_text .= "</td>\n";
$html_text .= "</tr>\n";
$this->xTemplate->assign("PAGINATION", $html_text);
}
//C.L. - Fix for 23461
if (empty($_REQUEST['action']) || $_REQUEST['action'] != 'Popup') {
$_SESSION['export_where'] = $this->query_where;
}
$this->xTemplate->parse($xtemplateSection . ".list_nav_row");
}
}
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:101,代码来源:ListView.php
示例8: getDetailViewForEmail2
//.........这里部分代码省略.........
global $app_strings, $app_list_strings;
global $mod_strings;
$smarty = new Sugar_Smarty();
// SETTING DEFAULTS
$focus = new Email();
$focus->retrieve($emailId);
$detailView->ss = new Sugar_Smarty();
$detailView = new DetailView();
$title = "";
$offset = 0;
if ($focus->type == 'out') {
$title = getClassicModuleTitle('Emails', array($mod_strings['LBL_SENT_MODULE_NAME'], $focus->name), true);
} elseif ($focus->type == 'draft') {
$title = getClassicModuleTitle('Emails', array($mod_strings['LBL_LIST_FORM_DRAFTS_TITLE'], $focus->name), true);
} elseif ($focus->type == 'inbound') {
$title = getClassicModuleTitle('Emails', array($mod_strings['LBL_INBOUND_TITLE'], $focus->name), true);
}
$smarty->assign("emailTitle", $title);
// DEFAULT TO TEXT IF NO HTML CONTENT:
$html = trim(from_html($focus->description_html));
if (empty($html)) {
$smarty->assign('SHOW_PLAINTEXT', 'true');
} else {
$smarty->assign('SHOW_PLAINTEXT', 'false');
}
//if not empty or set to test (from test campaigns)
if (!empty($focus->parent_type) && $focus->parent_type != 'test') {
$smarty->assign('PARENT_MODULE', $focus->parent_type);
$smarty->assign('PARENT_TYPE', $app_list_strings['record_type_display'][$focus->parent_type] . ":");
}
global $gridline;
$smarty->assign('MOD', $mod_strings);
$smarty->assign('APP', $app_strings);
$smarty->assign('GRIDLINE', $gridline);
$smarty->assign('PRINT_URL', 'index.php?' . $GLOBALS['request_string']);
$smarty->assign('ID', $focus->id);
$smarty->assign('TYPE', $focus->type);
$smarty->assign('PARENT_NAME', $focus->parent_name);
$smarty->assign('PARENT_ID', $focus->parent_id);
$smarty->assign('NAME', $focus->name);
$smarty->assign('ASSIGNED_TO', $focus->assigned_user_name);
$smarty->assign('DATE_MODIFIED', $focus->date_modified);
$smarty->assign('DATE_ENTERED', $focus->date_entered);
$smarty->assign('DATE_START', $focus->date_start);
$smarty->assign('TIME_START', $focus->time_start);
$smarty->assign('FROM', $focus->from_addr);
$smarty->assign('TO', nl2br($focus->to_addrs));
$smarty->assign('CC', nl2br($focus->cc_addrs));
$smarty->assign('BCC', nl2br($focus->bcc_addrs));
$smarty->assign('CREATED_BY', $focus->created_by_name);
$smarty->assign('MODIFIED_BY', $focus->modified_by_name);
$smarty->assign('DATE_SENT', $focus->date_entered);
$smarty->assign('EMAIL_NAME', 'RE: ' . $focus->name);
$smarty->assign("TAG", $focus->listviewACLHelper());
$smarty->assign("SUGAR_VERSION", $GLOBALS['sugar_version']);
$smarty->assign("JS_CUSTOM_VERSION", $GLOBALS['sugar_config']['js_custom_version']);
if (!empty($focus->reply_to_email)) {
$replyTo = "\n\t\t\t\t<tr>\n\t\t <td class=\"tabDetailViewDL\"><slot>" . $mod_strings['LBL_REPLY_TO_NAME'] . "</slot></td>\n\t\t <td colspan=3 class=\"tabDetailViewDF\"><slot>" . $focus->reply_to_addr . "</slot></td>\n\t\t </tr>";
$smarty->assign("REPLY_TO", $replyTo);
}
///////////////////////////////////////////////////////////////////////////////
//// JAVASCRIPT VARS
$jsVars = '';
$jsVars .= "var showRaw = '{$mod_strings['LBL_BUTTON_RAW_LABEL']}';";
$jsVars .= "var hideRaw = '{$mod_strings['LBL_BUTTON_RAW_LABEL_HIDE']}';";
$smarty->assign("JS_VARS", $jsVars);
///////////////////////////////////////////////////////////////////////////////
//// NOTES (attachements, etc.)
///////////////////////////////////////////////////////////////////////////////
$note = new Note();
$where = "notes.parent_id='{$focus->id}'";
//take in account if this is from campaign and the template id is stored in the macros.
if (isset($macro_values) && isset($macro_values['email_template_id'])) {
$where = "notes.parent_id='{$macro_values['email_template_id']}'";
}
$notes_list = $note->get_full_list("notes.name", $where, true);
if (!isset($notes_list)) {
$notes_list = array();
}
$attachments = '';
for ($i = 0; $i < count($notes_list); $i++) {
$the_note = $notes_list[$i];
$attachments .= "<a href=\"index.php?entryPoint=download&id={$the_note->id}&type=Notes\">" . $the_note->name . "</a><br />";
$focus->cid2Link($the_note->id, $the_note->file_mime_type);
}
$smarty->assign('DESCRIPTION', nl2br($focus->description));
$smarty->assign('DESCRIPTION_HTML', from_html($focus->description_html));
$smarty->assign("ATTACHMENTS", $attachments);
///////////////////////////////////////////////////////////////////////////////
//// SUBPANELS
///////////////////////////////////////////////////////////////////////////////
$show_subpanels = true;
if ($show_subpanels) {
require_once 'include/SubPanel/SubPanelTiles.php';
$subpanel = new SubPanelTiles($focus, 'Emails');
$smarty->assign("SUBPANEL", $subpanel->display());
}
$meta['html'] = $smarty->fetch("modules/Emails/templates/emailDetailView.tpl");
return $meta;
}
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:101,代码来源:EmailUI.php
示例9: processListNavigation
//.........这里部分代码省略.........
$onClick = "'location.href=\"{$end_URL}\";'";
}
$end_link = "<button type='button' name='listViewEndButton' class='button' title='{$this->local_app_strings['LNK_LIST_END']}' onClick=" . $onClick . ">" . SugarThemeRegistry::current()->getImage("end", "border='0' align='absmiddle'", null, null, '.gif', $this->local_app_strings['LNK_LIST_END']) . "</button>";
}
}
$GLOBALS['log']->info("Offset (next, current, prev)({$next_offset}, {$current_offset}, {$previous_offset})");
$GLOBALS['log']->info("Start/end records ({$start_record}, {$end_record})");
$end_record = $end_record - 1;
$script_href = "<a style=\\'width: 150px\\' name=\"thispage\" class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,\"yes\");\\' onmouseout=\\'unhiliteItem(this);\\' onclick=\\'if (document.MassUpdate.select_entire_list.value==1){document.MassUpdate.select_entire_list.value=0;sListView.check_all(document.MassUpdate, \"mass[]\", true, {$this->records_per_page})}else {sListView.check_all(document.MassUpdate, \"mass[]\", true)};\\' href=\\'#\\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_CURRENT']} ({$this->records_per_page})‎</a>" . "<a style=\\'width: 150px\\' name=\"selectall\" class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,\"yes\");\\' onmouseout=\\'unhiliteItem(this);\\' onclick=\\'sListView.check_entire_list(document.MassUpdate, \"mass[]\",true,{$row_count});\\' href=\\'#\\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_ENTIRE']} ({$row_count})‎</a>" . "<a style=\\'width: 150px\\' name=\"deselect\" class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,\"yes\");\\' onmouseout=\\'unhiliteItem(this);\\' onclick=\\'sListView.clear_all(document.MassUpdate, \"mass[]\", false);\\' href=\\'#\\'>{$this->local_app_strings['LBL_LISTVIEW_NONE']}</a>";
$close_inline_img = SugarThemeRegistry::current()->getImage('close_inline', 'border=0', null, null, ".gif", $app_strings['LBL_CLOSEINLINE']);
echo "<script>\n function select_dialog() {\n \tvar \$dialog = \$('<div></div>')\n\t\t\t\t\t.html('<a style=\\'width: 150px\\' name=\"thispage\" class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,\"yes\");\\' onmouseout=\\'unhiliteItem(this);\\' onclick=\\'if (document.MassUpdate.select_entire_list.value==1){document.MassUpdate.select_entire_list.value=0;sListView.check_all(document.MassUpdate, \"mass[]\", true, {$this->records_per_page})}else {sListView.check_all(document.MassUpdate, \"mass[]\", true)};\\' href=\\'javascript:void(0)\\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_CURRENT']} ({$this->records_per_page})‎</a>" . "<a style=\\'width: 150px\\' name=\"selectall\" class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,\"yes\");\\' onmouseout=\\'unhiliteItem(this);\\' onclick=\\'sListView.check_entire_list(document.MassUpdate, \"mass[]\",true,{$row_count});\\' href=\\'javascript:void(0)\\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_ENTIRE']} ({$row_count})‎</a>" . "<a style=\\'width: 150px\\' name=\"deselect\" class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,\"yes\");\\' onmouseout=\\'unhiliteItem(this);\\' onclick=\\'sListView.clear_all(document.MassUpdate, \"mass[]\", false);\\' href=\\'javascript:void(0)\\'>{$this->local_app_strings['LBL_LISTVIEW_NONE']}</a>')\n\t\t\t\t\t.dialog({\n\t\t\t\t\t\tautoOpen: false,\n\t\t\t\t\t\twidth: 150\n\t\t\t\t\t});\n\t\t\t\t\t\$dialog.dialog('open');\n\n }\n </script>";
if ($this->show_select_menu) {
$total_label = "";
$total = $row_count;
$pageTotal = $row_count > 0 ? $end_record - $start_record + 1 : 0;
if (!empty($GLOBALS['sugar_config']['disable_count_query']) && $GLOBALS['sugar_config']['disable_count_query'] === true && $total > $pageTotal) {
$this->show_plus = true;
$total = $pageTotal;
$total_label = $total . '+';
} else {
$this->show_plus = false;
$total_label = $total;
}
echo "<input type='hidden' name='show_plus' value='{$this->show_plus}'>\n";
//Bug#52931: Replace with actionMenu
//$select_link = "<a id='select_link' onclick='return select_dialog();' href=\"javascript:void(0)\">".$this->local_app_strings['LBL_LINK_SELECT']." ".SugarThemeRegistry::current()->getImage('MoreDetail', 'border=0', 11, 7, '.png', $app_strings['LBL_MOREDETAIL'])."</a>";
$menuItems = array("<input title=\"" . $app_strings['LBL_SELECT_ALL_TITLE'] . "\" type='checkbox' class='checkbox massall' name='massall' id='massall' value='' onclick='sListView.check_all(document.MassUpdate, \"mass[]\", this.checked);' /><a href='javascript: void(0);'></a>", "<a name='thispage' id='button_select_this_page' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' onmouseout='unhiliteItem(this);' onclick='if (document.MassUpdate.select_entire_list.value==1){document.MassUpdate.select_entire_list.value=0;sListView.check_all(document.MassUpdate, \"mass[]\", true, {$pageTotal})}else {sListView.check_all(document.MassUpdate, \"mass[]\", true)};' href='#'>{$app_strings['LBL_LISTVIEW_OPTION_CURRENT']} ({$pageTotal})‎</a>", "<a name='selectall' id='button_select_all' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' onmouseout='unhiliteItem(this);' onclick='sListView.check_entire_list(document.MassUpdate, \"mass[]\",true,{$total});' href='#'>{$app_strings['LBL_LISTVIEW_OPTION_ENTIRE']} ({$total_label})‎</a>", "<a name='deselect' id='button_deselect' class='menuItem' onmouseover='hiliteItem(this,\"yes\");' onmouseout='unhiliteItem(this);' onclick='sListView.clear_all(document.MassUpdate, \"mass[]\", false);' href='#'>{$app_strings['LBL_LISTVIEW_NONE']}</a>");
require_once 'include/Smarty/plugins/function.sugar_action_menu.php';
$select_link = smarty_function_sugar_action_menu(array('class' => 'clickMenu selectmenu', 'id' => 'selectLink', 'buttons' => $menuItems), $this->xTemplate);
} else {
$select_link = " ";
}
$export_link = '<input class="button" type="button" value="' . $this->local_app_strings['LBL_EXPORT'] . '" ' . 'onclick="return sListView.send_form(true, \'' . $_REQUEST['module'] . '\', \'index.php?entryPoint=export\',\'' . $this->local_app_strings['LBL_LISTVIEW_NO_SELECTED'] . '\')">';
if ($this->show_delete_button) {
$delete_link = '<input class="button" type="button" id="delete_button" name="Delete" value="' . $this->local_app_strings['LBL_DELETE_BUTTON_LABEL'] . '" onclick="return sListView.send_mass_update(\'selected\',\'' . $this->local_app_strings['LBL_LISTVIEW_NO_SELECTED'] . '\', 1)">';
} else {
$delete_link = ' ';
}
$admin = new Administration();
$admin->retrieveSettings('system');
$user_merge = $current_user->getPreference('mailmerge_on');
if ($user_merge == 'on' && isset($admin->settings['system_mailmerge_on']) && $admin->settings['system_mailmerge_on']) {
echo "<script>\n function mailmerge_dialog(el) {\n \tvar \$dialog = \$('<div></div>')\n\t\t\t\t\t.html('<a style=\\'width: 150px\\' class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,\"yes\");\\' onmouseout=\\'unhiliteItem(this);\\' onclick=\\'return sListView.send_form(true, \"MailMerge\", \"index.php\", \"{$this->local_app_strings['LBL_LISTVIEW_NO_SELECTED']}\")\\' href=\\'javascript:void(0)\\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_SELECTED']}</a>" . "<a style=\\'width: 150px\\' class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,\"yes\");\\' onmouseout=\\'unhiliteItem(this);\\' href=\\'index.php?action=index&module=MailMerge\\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_CURRENT']}</a>" . "<a style=\\'width: 150px\\' class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,\"yes\");\\' onmouseout=\\'unhiliteItem(this);\\' href=\\'index.php?action=index&module=MailMerge&entire=true\\'>{$this->local_app_strings['LBL_LISTVIEW_OPTION_ENTIRE']}</a>')\n\t\t\t\t\t.dialog({\n\t\t\t\t\t\tautoOpen: false,\n\t\t\t\t\t\ttitle: '" . $this->local_app_strings['LBL_MAILMERGE'] . "',\n\t\t\t\t\t\twidth: 150,\n\t\t\t\t\t\tposition: {\n\t\t\t\t\t\t my: myPos,\n\t\t\t\t\t\t at: atPos,\n\t\t\t\t\t\t of: \$(el)\n\t\t\t\t\t \t}\n\t\t\t\t\t});\n\n }\n </script>";
$merge_link = " | <a id='mailmerge_link' onclick='return mailmerge_dialog(this)'; href=\"javascript:void(0)\">" . $this->local_app_strings['LBL_MAILMERGE'] . "</a>";
} else {
$merge_link = " ";
}
$selected_objects_span = " | {$this->local_app_strings['LBL_LISTVIEW_SELECTED_OBJECTS']}<input style='border: 0px; background: transparent; font-size: inherit; color: inherit' type='text' readonly name='selectCount[]' value='" . (isset($_POST['mass']) ? count($_POST['mass']) : 0) . "' />";
if ($_REQUEST['module'] == 'Home' || $this->local_current_module == 'Import' || $this->show_export_button == false || !empty($sugar_config['disable_export']) || !empty($sugar_config['admin_export_only']) && !(is_admin($current_user) || ACLController::moduleSupportsACL($_REQUEST['module']) && ACLAction::getUserAccessLevel($current_user->id, $_REQUEST['module'], 'access') == ACL_ALLOW_ENABLED && (ACLAction::getUserAccessLevel($current_user->id, $_REQUEST['module'], 'admin') == ACL_ALLOW_ADMIN || ACLAction::getUserAccessLevel($current_user->id, $_REQUEST['module'], 'admin') == ACL_ALLOW_ADMIN_DEV))) {
if ($_REQUEST['module'] != 'InboundEmail' && $_REQUEST['module'] != 'EmailMan' && $_REQUEST['module'] != 'iFrames') {
$selected_objects_span = '';
}
$export_link = " ";
$merge_link = " ";
} elseif ($_REQUEST['module'] != "Accounts" && $_REQUEST['module'] != "Cases" && $_REQUEST['module'] != "Contacts" && $_REQUEST['module'] != "Leads" && $_REQUEST['module'] != "Opportunities") {
$merge_link = " ";
}
if ($this->show_paging == true) {
if (!empty($sugar_config['disable_count_query'])) {
if ($row_count > $end_record) {
$row_count .= '+';
}
}
$html_text = '';
$html_text .= "<tr class='pagination' role='presentation'>\n";
$html_text .= "<td COLSPAN=\"{$col_count}\" align=\"right\">\n";
//$html_text .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td align=\"left\" >$export_link$merge_link$selected_objects_span</td>\n";
//$html_text .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td align=\"left\" >";
if ($subpanel_def != null) {
include_once 'include/SubPanel/SubPanelTiles.php';
$subpanelTiles = new SubPanelTiles($sugarbean);
$html_text .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td align=\"left\" >";
//attempt to get the query to recreate this subpanel
if (!empty($this->response)) {
$response =& $this->response;
} else {
$response = SugarBean::get_union_related_list($sugarbean, $this->sortby, $this->sort_order, $this->query_where, $current_offset, -1, -1, $this->query_limit, $subpanel_def);
$this->response = $response;
}
//if query is present, then pass it in as parameter
if (isset($response['query']) && !empty($response['query'])) {
$html_text .= $subpanelTiles->get_buttons($subpanel_def, $response['query']);
} else {
$html_text .= $subpanelTiles->get_buttons($subpanel_def);
}
} else {
$html_text .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td align=\"left\" nowrap>{$select_link} {$export_link} {$delete_link} {$selected_objects_span}";
}
$html_text .= "</td>\n<td nowrap align=\"right\">" . $start_link . " " . $previous_link . " <span class='pageNumbers'>(" . $start_record . " - " . $end_record . " " . $this->local_app_strings['LBL_LIST_OF'] . " " . $row_count . ")</span> " . $next_link . " " . $end_link . "</td></tr></table>\n";
$html_text .= "</td>\n";
$html_text .= "</tr>\n";
$this->xTemplate->assign("PAGINATION", $html_text);
}
//C.L. - Fix for 23461
if (empty($_REQUEST['action']) || $_REQUEST['action'] != 'Popup') {
$_SESSION['export_where'] = $this->query_where;
}
$this->xTemplate->parse($xtemplateSection . ".list_nav_row");
}
}
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:101,代码来源:ListView.php
示例10: _displaySubPanels
/**
* @see SugarView::_displaySubPanels()
*/
protected function _displaySubPanels()
{
require_once 'include/SubPanel/SubPanelTiles.php';
$subpanel = new SubPanelTiles($this->bean, 'ProjectTemplates');
echo $subpanel->display(true, true);
}
开发者ID:omusico,项目名称:sugar_work,代码行数:9,代码来源:view.templatesdetail.php
示例11: DetailView
}
/*
* Your installation or use of this SugarCRM file is subject to the applicable
* terms available at
* http://support.sugarcrm.com/06_Customer_Center/10_Master_Subscription_Agreements/.
* If you do not agree to all of the applicable terms or do not have the
* authority to bind the entity as an authorized representative, then do not
* install or use this SugarCRM file.
*
* Copyright (C) SugarCRM Inc. All rights reserved.
*/
/**
* Created on Jul 17, 2006
* Ajax Procedure for loading all subpanels for a certain subpanel tab.
*/
require_once 'include/DetailView/DetailView.php';
$detailView = new DetailView();
$focus = BeanFactory::getBean($_REQUEST['loadModule']);
$focus->id = $_REQUEST['record'];
require_once 'include/SubPanel/SubPanelTiles.php';
$subpanel = new SubPanelTiles($focus, $_REQUEST['loadModule']);
if (!function_exists('get_form_header')) {
global $theme;
}
// set up data for subpanels
global $currentModule;
$currentModule = $_REQUEST['loadModule'];
$_REQUEST['action'] = 'DetailView';
//This line of code is critical. We need to ensure that the global controller bean is set to the $currentModule global variable
$GLOBALS['app']->controller->bean = $focus;
echo $subpanel->display(false);
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:LoadTabSubpanels.php
示例12: _displaySubPanels
/**
* Called from process(). This method will display subpanels.
*/
protected function _displaySubPanels()
{
if (!empty($this->bean->id) && (SugarAutoLoader::existingCustom('modules/' . $this->module . '/metadata/subpaneldefs.php') || SugarAutoLoader::loadExtension("layoutdefs",
|
请发表评论