当前位置: 首页>>代码示例>>PHP>>正文


PHP SugarBean::get_union_related_list方法代码示例

本文整理汇总了PHP中SugarBean::get_union_related_list方法的典型用法代码示例。如果您正苦于以下问题:PHP SugarBean::get_union_related_list方法的具体用法?PHP SugarBean::get_union_related_list怎么用?PHP SugarBean::get_union_related_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SugarBean的用法示例。


在下文中一共展示了SugarBean::get_union_related_list方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testGetUnionRelatedList

 public function testGetUnionRelatedList()
 {
     $subpanel = array('order' => 20, 'sort_order' => 'desc', 'sort_by' => 'date_entered', 'type' => 'collection', 'subpanel_name' => 'history', 'top_buttons' => array(), 'collection_list' => array('meetings' => array('module' => 'Meetings', 'subpanel_name' => 'ForHistory', 'get_subpanel_data' => 'meetings'), 'emails' => array('module' => 'Emails', 'subpanel_name' => 'ForHistory', 'get_subpanel_data' => 'emails', 'get_distinct_data' => true), 'linkedemails_contacts' => array('module' => 'Emails', 'subpanel_name' => 'ForHistory', 'generate_select' => true, 'get_distinct_data' => true, 'get_subpanel_data' => 'function:GetUnionRelatedTest_get_select', 'function_parameters' => array('import_function_file' => __FILE__))));
     $subpanel_def = new aSubPanel("testpanel", $subpanel, $this->bean);
     $query = $this->bean->get_union_related_list($this->bean, "", '', "", 0, 5, -1, 0, $subpanel_def);
     $result = $this->bean->db->query($query["query"]);
     $this->assertNotEmpty($result, "Bad query: {$query["query"]}");
 }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:8,代码来源:GetUnionRelatedTest.php

示例2: 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']}&nbsp;&#x28;{$this->records_per_page}&#x29;&#x200E;</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']}&nbsp;&#x28;{$row_count}&#x29;&#x200E;</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'] . "&nbsp;<img src='" . SugarThemeRegistry::current()->getImageURL('MoreDetail.png') . "' width='11' height='7' border='0''>" . "</a>";
         } else {
             $select_link = "&nbsp;";
         }
         // 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'")."&nbsp;".$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 = '&nbsp;';
         }
         $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 = "&nbsp;|&nbsp;<a id='mailmerge_link' onclick='return mailmerge_overlib()'; href=\"#\">" . $this->local_app_strings['LBL_MAILMERGE'] . "</a>";
         } else {
             $merge_link = "&nbsp;";
         }
         $selected_objects_span = "&nbsp;|&nbsp;{$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 = "&nbsp;";
             $merge_link = "&nbsp;";
         } elseif ($_REQUEST['module'] != "Accounts" && $_REQUEST['module'] != "Cases" && $_REQUEST['module'] != "Contacts" && $_REQUEST['module'] != "Leads" && $_REQUEST['module'] != "Opportunities") {
             $merge_link = "&nbsp;";
         }
         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}&nbsp;{$export_link}&nbsp;{$delete_link}&nbsp;{$selected_objects_span}";
             }
             $html_text .= "</td>\n<td nowrap align=\"right\">" . $start_link . "&nbsp;&nbsp;" . $previous_link . "&nbsp;&nbsp;<span class='pageNumbers'>(" . $start_record . " - " . $end_record . " " . $this->local_app_strings['LBL_LIST_OF'] . " " . $row_count . ")</span>&nbsp;&nbsp;" . $next_link . "&nbsp;&nbsp;" . $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

示例3: 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']}&nbsp;&#x28;{$this->records_per_page}&#x29;&#x200E;</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']}&nbsp;&#x28;{$row_count}&#x29;&#x200E;</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']}&nbsp;&#x28;{$this->records_per_page}&#x29;&#x200E;</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']}&nbsp;&#x28;{$row_count}&#x29;&#x200E;</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']."&nbsp;".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']}&nbsp;&#x28;{$pageTotal}&#x29;&#x200E;</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']}&nbsp;&#x28;{$total_label}&#x29;&#x200E;</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 = "&nbsp;";
         }
         $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 = '&nbsp;';
         }
         $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 = "&nbsp;|&nbsp;<a id='mailmerge_link' onclick='return mailmerge_dialog(this)'; href=\"javascript:void(0)\">" . $this->local_app_strings['LBL_MAILMERGE'] . "</a>";
         } else {
             $merge_link = "&nbsp;";
         }
         $selected_objects_span = "&nbsp;|&nbsp;{$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 = "&nbsp;";
             $merge_link = "&nbsp;";
         } elseif ($_REQUEST['module'] != "Accounts" && $_REQUEST['module'] != "Cases" && $_REQUEST['module'] != "Contacts" && $_REQUEST['module'] != "Leads" && $_REQUEST['module'] != "Opportunities") {
             $merge_link = "&nbsp;";
         }
         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}&nbsp;{$export_link}&nbsp;{$delete_link}&nbsp;{$selected_objects_span}";
             }
             $html_text .= "</td>\n<td nowrap align=\"right\">" . $start_link . "&nbsp;&nbsp;" . $previous_link . "&nbsp;&nbsp;<span class='pageNumbers'>(" . $start_record . " - " . $end_record . " " . $this->local_app_strings['LBL_LIST_OF'] . " " . $row_count . ")</span>&nbsp;&nbsp;" . $next_link . "&nbsp;&nbsp;" . $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

示例4: add_to_prospect_list

function add_to_prospect_list($query_panel, $parent_module, $parent_type, $parent_id, $child_id, $link_attribute, $link_type, $parent)
{
    $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:' . $query_panel);
    $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:' . $parent_module);
    $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:' . $parent_type);
    $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:' . $parent_id);
    $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:' . $child_id);
    $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:' . $link_attribute);
    $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:' . $link_type);
    require_once 'include/SubPanel/SubPanelTiles.php';
    if (!class_exists($parent_type)) {
        require_once 'modules/' . cleanDirName($parent_module) . '/' . cleanDirName($parent_type) . '.php';
    }
    $focus = new $parent_type();
    $focus->retrieve($parent_id);
    if (empty($focus->id)) {
        return false;
    }
    if (empty($parent)) {
        return false;
    }
    //if link_type is default then load relationship once and add all the child ids.
    $relationship_attribute = $link_attribute;
    //find all prospects based on the query
    $subpanel = new SubPanelTiles($parent, $parent->module_dir);
    $thisPanel = $subpanel->subpanel_definitions->load_subpanel($query_panel);
    if (empty($thisPanel)) {
        return false;
    }
    // bugfix #57850  filter prospect list based on marketing_id (if it's present)
    if (isset($_REQUEST['marketing_id']) && $_REQUEST['marketing_id'] != 'all') {
        $thisPanel->_instance_properties['function_parameters']['EMAIL_MARKETING_ID_VALUE'] = $_REQUEST['marketing_id'];
    }
    $result = SugarBean::get_union_related_list($parent, '', '', '', 0, -99, -99, '', $thisPanel);
    if (!empty($result['list'])) {
        foreach ($result['list'] as $object) {
            if ($link_type != 'default') {
                $relationship_attribute = strtolower($object->{$link_attribute});
            }
            $GLOBALS['log']->debug('add_prospects_to_prospect_list:relationship_attribute:' . $relationship_attribute);
            // load relationship for the first time or on change of relationship atribute.
            if (empty($focus->{$relationship_attribute})) {
                $focus->load_relationship($relationship_attribute);
            }
            //add
            $focus->{$relationship_attribute}->add($object->{$child_id});
        }
    }
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:49,代码来源:formbase.php

示例5: add_prospects_to_prospect_list

function add_prospects_to_prospect_list($query_panel, $parent_module, $parent_type, $parent_id, $child_id, $link_attribute, $link_type, $parent)
{
    $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:' . $query_panel);
    $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:' . $parent_module);
    $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:' . $parent_type);
    $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:' . $parent_id);
    $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:' . $child_id);
    $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:' . $link_attribute);
    $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:' . $link_type);
    require_once 'include/SubPanel/SubPanelTiles.php';
    if (!class_exists($parent_type)) {
        require_once 'modules/' . cleanDirName($parent_module) . '/' . cleanDirName($parent_type) . '.php';
    }
    $focus = new $parent_type();
    $focus->retrieve($parent_id);
    if (empty($focus->id)) {
        return false;
    }
    if (empty($parent)) {
        return false;
    }
    //if link_type is default then load relationship once and add all the child ids.
    $relationship_attribute = $link_attribute;
    //find all prospects based on the query
    $subpanel = new SubPanelTiles($parent, $parent->module_dir);
    $thisPanel = $subpanel->subpanel_definitions->load_subpanel($query_panel);
    if (empty($thisPanel)) {
        return false;
    }
    $result = SugarBean::get_union_related_list($parent, '', '', '', 0, -1, -1, '', $thisPanel);
    if (!empty($result['list'])) {
        foreach ($result['list'] as $object) {
            if ($link_type != 'default') {
                $relationship_attribute = strtolower($object->{$link_attribute});
            }
            $GLOBALS['log']->debug('add_prospects_to_prospect_list:relationship_attribute:' . $relationship_attribute);
            // load relationship for the first time or on change of relationship atribute.
            if (empty($focus->{$relationship_attribute})) {
                $focus->load_relationship($relationship_attribute);
            }
            //add
            $focus->{$relationship_attribute}->add($object->{$child_id});
        }
    }
}
开发者ID:vsanth,项目名称:dynamic-crm,代码行数:45,代码来源:Save2.php

示例6: testSubPanelDataIsSorted

 /**
  * @param string $order
  * @param string $function
  * @dataProvider getOrders
  */
 public function testSubPanelDataIsSorted($order, $function)
 {
     // create a minimum required subpanel definition
     $subPanel = new aSubPanel(null, array('module' => 'Opportunities', 'subpanel_name' => null, 'get_subpanel_data' => 'opportunities'), $this->contact);
     // fetch subpanel data
     $response = SugarBean::get_union_related_list($this->contact, 'account_name', $order, '', 0, -1, -1, 0, $subPanel);
     $this->assertArrayHasKey('list', $response);
     $account_names = array();
     /** @var Opportunity $opportunity */
     foreach ($response['list'] as $opportunity) {
         $account_names[] = $opportunity->account_name;
     }
     $sorted = $account_names;
     $function($sorted);
     // ensure that opportunities are sorted by account name in the needed order
     $this->assertSame($sorted, $account_names);
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:22,代码来源:Bug56652Test.php

示例7: processUnionBeans

 function processUnionBeans($sugarbean, $subpanel_def)
 {
     $current_offset = $this->getOffset('CELL');
     $response = array();
     if (isset($_REQUEST['sort_order'])) {
         $this->sort_order = $_REQUEST['sort_order'];
     }
     $this->sort_order = 'asc';
     if (isset($_REQUEST['sort_order'])) {
         $this->sort_order = $_REQUEST['sort_order'];
     } else {
         if (isset($subpanel_def->_instance_properties['sort_order'])) {
             $sort_order = $subpanel_def->_instance_properties['sort_order'];
         }
         if (isset($_SESSION['last_sub' . $this->subpanel_module . '_url']) && $_SESSION['last_sub' . $this->subpanel_module . '_url'] == $this->getBaseURL('CELL')) {
             if (isset($_SESSION['last_sub' . $this->subpanel_module . '_order']) && $_SESSION['last_sub' . $this->subpanel_module . '_order'] == 'asc') {
                 $this->sort_order = 'desc';
             }
         } elseif (isset($sort_order)) {
             $this->sort_order = $sort_order;
         }
     }
     if (isset($subpanel_def->_instance_properties['sort_by'])) {
         $this->query_orderby = $subpanel_def->_instance_properties['sort_by'];
     }
     $this->getOrderBy('CELL', $this->query_orderby, $this->sort_order);
     $_SESSION['last_sub' . $this->subpanel_module . '_order'] = $this->sort_order;
     $_SESSION['last_sub' . $this->subpanel_module . '_url'] = $this->getBaseURL('CELL');
     $response = SugarBean::get_union_related_list($sugarbean, $this->sortby, $this->sort_order, $this->query_where, $current_offset, -1, -1, $this->query_limit, $subpanel_def);
     $list = $response['list'];
     $row_count = $response['row_count'];
     $next_offset = $response['next_offset'];
     $previous_offset = $response['previous_offset'];
     if (!empty($response['current_offset'])) {
         $current_offset = $response['current_offset'];
     }
     global $list_view_row_count;
     $list_view_row_count = $row_count;
     $this->processListNavigation('dyn_list_view', 'CELL', $current_offset, $next_offset, $previous_offset, $row_count);
     return array('list' => $list, 'parent_data' => $response['parent_data'], 'query' => $response['query']);
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:41,代码来源:ListView.php


注:本文中的SugarBean::get_union_related_list方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。