function display() { global $current_language; if (empty($this->container_id)) { $child_reports = ReportContainer::get_root_reports(); } else { $container = new ReportContainer(); $container->retrieve($this->container_id); $child_reports = $container->get_linked_beans("reports", "ZuckerReport"); } $mod_strings = return_module_language($current_language, "ZuckerReports"); require_once 'include/ListView/ListView.php'; $lv = new ListView(); $lv->initNewXTemplate('modules/ZuckerReportContainer/DetailView.html', $mod_strings); $lv->xTemplateAssign("DELETE_INLINE_PNG", get_image($image_path . 'delete_inline.png', 'align="absmiddle" alt="' . $app_strings['LNK_DELETE'] . '" border="0"')); $lv->xTemplateAssign("EDIT_INLINE_PNG", get_image($image_path . 'edit_inline.png', 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"')); $lv->xTemplateAssign("RETURN_URL", "&return_module=ZuckerReportContainer&return_action=DetailView&return_id=" . $container->id); $lv->setHeaderTitle(""); $lv->setHeaderText(""); ob_start(); $lv->processListViewTwo($child_reports, "reports", "REPORT"); $str = ob_get_clean(); ob_end_flush(); return parent::display() . $str; }
function ProcessSubPanelListView($xTemplatePath, &$mod_strings, $action, $curModule = "") { global $currentModule, $app_strings; if (empty($curModule)) { $curModule = $currentModule; } $ListView = new ListView(); $ListView->initNewXTemplate($xTemplatePath, $mod_strings); $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $curModule . "&return_action=DetailView&return_id=" . $this->focus->id); $ListView->xTemplateAssign("RECORD_ID", $this->focus->id); $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline.png', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT'])); $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline.png', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE'])); $ListView->setHeaderTitle($mod_strings['LBL_TEAM_MEMBERS']); $ListView->setHeaderText($this->getHeaderText($action, $curModule)); $ListView->processListView($this->users_list, "users", "USER"); }
function ProcessSubPanelListView($xTemplatePath, &$mod_strings, $action, $curModule = '') { global $currentModule, $app_strings; if (empty($curModule)) { $curModule = $currentModule; } $ListView = new ListView(); global $current_user; $header_text = ''; if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelView&from_module=Notes&record=" . $this->focus->id . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDITLAYOUT']) . "</a>"; } $ListView->initNewXTemplate($xTemplatePath, $mod_strings); $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $curModule . "&return_action=DetailView&return_id=" . $this->focus->id); $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_DELETE'])); $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT'])); $ListView->xTemplateAssign("RECORD_ID", $this->focus->id); $ListView->setHeaderTitle($mod_strings['LBL_MODULE_NAME'] . $header_text); $ListView->setHeaderText($this->getHeaderText($action, $curModule)); $ListView->processListView($this->notes_list, "notes", "NOTE"); }
function process_page() { global $theme; global $mod_strings; global $app_strings; global $currentModule; global $current_language; global $current_module_strings; if (!is_file(sugar_cached('jsLanguage/WorkFlow/') . $GLOBALS['current_language'] . '.js')) { require_once 'include/language/jsLanguage.php'; jsLanguage::createModuleStringsCache('WorkFlow', $GLOBALS['current_language']); } $javascript_language_files = getVersionedScript("cache/jsLanguage/WorkFlow/{$GLOBALS['current_language']}.js", $GLOBALS['sugar_config']['js_lang_version']); $current_module_strings = return_module_language($current_language, 'WorkFlowAlertShells'); $ListView = new ListView(); $header_text = ''; if (isset($_REQUEST['workflow_id'])) { $workflow = BeanFactory::getBean('WorkFlow', $_REQUEST['workflow_id']); //TODO GET ALL ALERTS HERE //$focus_alerts_list = $workflow->get_linked_beans('wf_alerts','WorkFlowAlertShell'); $alerts = BeanFactory::getBean('WorkFlowAlertShells'); $current_module_strings = return_module_language($current_language, $alerts->module_dir); insert_popup_header($theme); $ListView->initNewXTemplate('modules/WorkFlowAlertShells/Popup_picker.html', $current_module_strings); $ListView->xTemplateAssign("WORKFLOW_ID", $workflow->id); $ListView->xTemplateAssign("JAVASCRIPT_LANGUAGE_FILES", $javascript_language_files); $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id={$workflow->id}"); $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT'])); $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE'])); $ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME_COMBO'] . $header_text); //$ListView->setHeaderText($button); //$ListView->setQuery("workflow_alertshells.alert_type = 'Email'","","", "ALERT"); $list = $alerts->get_list("", "workflow_alertshells.alert_type = 'Email'"); $display_list = $this->cullFromList($list['list'], $workflow->base_module, $workflow->type); $ListView->processListViewTwo($display_list, "main", "ALERT"); insert_popup_footer(); } }
global $action; $theme_path = "themes/" . $theme . "/"; $image_path = $theme_path . "images/"; require_once $theme_path . 'layout_utils.php'; // focus_list is the means of passing data to a SubPanelView. global $focus_list; $button = "<form action='index.php' method='post' name='form' id='form'>\n"; $button .= "<input type='hidden' name='module' value='Project'>\n"; $button .= "<input type='hidden' name='relation_id' value='{$focus->id}'>\n"; $button .= "<input type='hidden' name='relation_type' value='{$currentModule}'>\n"; $button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n"; $button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n"; $button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n"; $button .= "<input type='hidden' name='action'>\n"; if (!empty($focus->object_name) && $focus->object_name == 'Opportunity') { $button .= "<input type='hidden' name='account_id' value='{$focus->account_id}'>\n"; $button .= "<input type='hidden' name='opportunity_name' value='{$focus->name}'>\n"; } $button .= "<input title='" . $app_strings['LBL_NEW_BUTTON_TITLE'] . "' accessyKey='" . $app_strings['LBL_NEW_BUTTON_KEY'] . "' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value=' " . $app_strings['LBL_NEW_BUTTON_LABEL'] . " '>\n"; $button .= "</form>\n"; $ListView = new ListView(); $ListView->initNewXTemplate('modules/ProductLogs/SubPanelView.html', $current_module_strings); $ListView->xTemplateAssign("EDIT_INLINE_PNG", get_image($image_path . 'edit_inline', 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"')); $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id=" . $focus->id); $ListView->setHeaderTitle($current_module_strings['LBL_PROJECT_SUBPANEL_TITLE']); $header_text = ''; if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=" . $_REQUEST['action'] . "&from_module=" . $_REQUEST['module'] . "&record=" . $_REQUEST['record'] . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>"; } $ListView->setHeaderTitle($current_module_strings['LBL_PROJECT_SUBPANEL_TITLE'] . $header_text); $ListView->processListView($focus_list, "main", "PROJECT");
* "Powered by SugarCRM". ********************************************************************************/ /********************************************************************************* * Description: TODO: To be written. * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. * All Rights Reserved. * Contributor(s): ______________________________________.. ********************************************************************************/ global $theme; global $sugar_config; global $current_language; $currentMax = $sugar_config['list_max_entries_per_page']; $sugar_config['list_max_entries_per_page'] = 10; $current_mod_strings = return_module_language($current_language, 'Emails'); $focus = new Email(); $ListView = new ListView(); $display_title = $current_mod_strings['LBL_LIST_TITLE_MY_INBOX'] . ': ' . $current_mod_strings['LBL_UNREAD_HOME']; $where = 'emails.deleted = 0 AND emails.assigned_user_id = \'' . $current_user->id . '\' AND emails.type = \'inbound\' AND emails.status = \'unread\''; $limit = 10; /////////////////////////////////////////////////////////////////////////////// //// OUTPUT /////////////////////////////////////////////////////////////////////////////// echo $focus->rolloverStyle; $ListView->initNewXTemplate('modules/Emails/ListViewHome.html', $current_mod_strings); $ListView->xTemplateAssign('ATTACHMENT_HEADER', SugarThemeRegistry::current()->getImage('attachment', "", "", "", '.gif', $mod_strings['LBL_ATTACHMENT'])); $ListView->setHeaderTitle($display_title); $ListView->setQuery($where, '', 'date_sent, date_entered DESC', "EMAIL"); $ListView->setAdditionalDetails(); $ListView->processListView($focus, 'main', 'EMAIL'); //echo $focus->quickCreateJS(); $sugar_config['list_max_entries_per_page'] = $currentMax;
function ProcessSubPanelListView($xTemplatePath, &$mod_strings) { global $app_strings; global $current_user; global $sugar_config; if (isset($this->listview)) { $ListView =& $this->listview; } else { $ListView = new ListView(); } $ListView->initNewXTemplate($xTemplatePath, $this->subpanel_defs->mod_strings); $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $this->parent_module . "&return_action=DetailView&return_id=" . $this->parent_bean->id); $ListView->xTemplateAssign("RELATED_MODULE", $this->parent_module); // TODO: what about unions? $ListView->xTemplateAssign("RECORD_ID", $this->parent_bean->id); $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT'])); $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LBL_DELETE_INLINE'])); $ListView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LBL_ID_FF_REMOVE'])); $header_text = ''; $ListView->xTemplateAssign("SUBPANEL_ID", $this->subpanel_id); $ListView->xTemplateAssign("SUBPANEL_SEARCH", $this->getSearchForm()); $display_sps = ''; if ($this->search_query == '' && empty($this->collections)) { $display_sps = 'display:none'; } $ListView->xTemplateAssign("DISPLAY_SPS", $display_sps); if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $exploded = explode('/', $xTemplatePath); $file_name = $exploded[sizeof($exploded) - 1]; $mod_name = $exploded[sizeof($exploded) - 2]; $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action={$file_name}&from_module={$mod_name}&mod_lang=" . $_REQUEST['module'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', 'Edit Layout') . "</a>"; } $ListView->setHeaderTitle(''); $ListView->setHeaderText(''); ob_start(); $ListView->is_dynamic = true; $ListView->records_per_page = $sugar_config['list_max_entries_per_subpanel'] + 0; if (isset($this->subpanel_defs->_instance_properties['records_per_page'])) { $ListView->records_per_page = $this->subpanel_defs->_instance_properties['records_per_page'] + 0; } $ListView->start_link_wrapper = "javascript:showSubPanel('" . $this->subpanel_id . "','"; $ListView->subpanel_id = $this->subpanel_id; $ListView->end_link_wrapper = "',true);"; if (!empty($this->layout_def_key)) { $ListView->end_link_wrapper = '&layout_def_key=' . $this->layout_def_key . $ListView->end_link_wrapper; } $where = ''; $ListView->setQuery($where, '', '', ''); $ListView->show_export_button = false; //function returns the query that was used to populate sub-panel data. $query = $ListView->process_dynamic_listview($this->parent_module, $this->parent_bean, $this->subpanel_defs); $this->subpanel_query = $query; $ob_contents = ob_get_contents(); ob_end_clean(); return $ob_contents; }
// for email previews if (!empty($_REQUEST['error'])) { $error = $app_list_strings['dom_email_errors'][$_REQUEST['error']]; } //_pp($where); if (!empty($assigned_to_sel)) { $whereClauses['emails.assigned_user_id'] = 'emails.assigned_user_id = \'' . $assigned_to_sel . '\''; } //_pp($whereClauses); // CONSTRUCT WHERE STRING FROM WHERECLAUSE ARRAY foreach ($whereClauses as $clause) { if ($where != '') { $where .= ' AND '; } $where .= $clause; } //echo $focus->quickCreateJS(); $ListView = new ListView(); // group distributionforms echo $focus->distributionForm($where); $ListView->shouldProcess = true; $ListView->show_mass_update = true; $ListView->show_mass_update_form = false; $ListView->initNewXTemplate('modules/Emails/ListViewGroupInbox.html', $mod_strings); $ListView->xTemplateAssign('ATTACHMENT_HEADER', SugarThemeRegistry::current()->getImage('attachment', "", "", "", '.gif', $mod_strings['LBL_ATTACHMENT'])); $ListView->xTemplateAssign('ERROR', $error); $ListView->xTemplateAssign('CHECK_MAIL', $focus->checkInbox('group')); $ListView->setHeaderTitle($display_title . $header_text); $ListView->setQuery($where, '', 'date_sent, date_entered DESC', 'EMAIL'); $ListView->setAdditionalDetails(); $ListView->processListView($focus, 'main', 'EMAIL');
// for email previews if (!empty($_REQUEST['error'])) { $error = $app_list_strings['dom_email_errors'][$_REQUEST['error']]; } //_pp($where); if (!empty($assigned_to_sel)) { $whereClauses['emails.assigned_user_id'] = 'emails.assigned_user_id = \'' . $assigned_to_sel . '\''; } //_pp($whereClauses); // CONSTRUCT WHERE STRING FROM WHERECLAUSE ARRAY foreach ($whereClauses as $clause) { if ($where != '') { $where .= ' AND '; } $where .= $clause; } //echo $focus->quickCreateJS(); $ListView = new ListView(); // group distributionforms echo $focus->distributionForm($where); $ListView->shouldProcess = true; $ListView->show_mass_update = true; $ListView->show_mass_update_form = false; $ListView->initNewXTemplate('modules/Emails/ListViewGroupInbox.html', $mod_strings); $ListView->xTemplateAssign('ATTACHMENT_HEADER', get_image('themes/' . $theme . '/images/attachment', "", "", "")); $ListView->xTemplateAssign('ERROR', $error); $ListView->xTemplateAssign('CHECK_MAIL', $focus->checkInbox('group')); $ListView->setHeaderTitle($display_title . $header_text); $ListView->setQuery($where, '', 'date_sent, date_entered DESC', 'EMAIL'); $ListView->setAdditionalDetails(); $ListView->processListView($focus, 'main', 'EMAIL');
* All Rights Reserved. * Contributor(s): ______________________________________.. ********************************************************************************/ global $theme; global $sugar_config; global $current_language; $currentMax = $sugar_config['list_max_entries_per_page']; $sugar_config['list_max_entries_per_page'] = 10; require_once 'XTemplate/xtpl.php'; require_once 'modules/Emails/Email.php'; require_once 'themes/' . $theme . '/layout_utils.php'; require_once 'include/ListView/ListView.php'; require_once 'include/utils.php'; $current_mod_strings = return_module_language($current_language, 'Emails'); $focus = new Email(); $ListView = new ListView(); $display_title = $current_mod_strings['LBL_LIST_TITLE_MY_INBOX'] . ': ' . $current_mod_strings['LBL_UNREAD_HOME']; $where = 'emails.deleted = 0 AND emails.assigned_user_id = \'' . $current_user->id . '\' AND emails.type = \'inbound\' AND emails.status = \'unread\''; $limit = 10; /////////////////////////////////////////////////////////////////////////////// //// OUTPUT /////////////////////////////////////////////////////////////////////////////// echo $focus->rolloverStyle; $ListView->initNewXTemplate('modules/Emails/ListViewHome.html', $current_mod_strings); $ListView->xTemplateAssign('ATTACHMENT_HEADER', get_image('themes/' . $theme . '/images/attachment', "", "", "")); $ListView->setHeaderTitle($display_title); $ListView->setQuery($where, '', 'date_sent, date_entered DESC', "EMAIL"); $ListView->setAdditionalDetails(); $ListView->processListView($focus, 'main', 'EMAIL'); //echo $focus->quickCreateJS(); $sugar_config['list_max_entries_per_page'] = $currentMax;
$edit_botton .= '<input type="hidden" name="module" value="Currencies">'; $edit_botton .= '<input type="hidden" name="record" value="' . $focus_id . '">'; $edit_botton .= '<input type="hidden" name="action">'; $edit_botton .= '<input type="hidden" name="edit">'; $edit_botton .= '<input type="hidden" name="return_module" value="Currencies">'; $edit_botton .= '<input type="hidden" name="return_action" value="index">'; $edit_botton .= '<input type="hidden" name="return_id" value="">'; $edit_botton .= '<input title="' . $app_strings['LBL_SAVE_BUTTON_TITLE'] . '" accessKey="' . $app_strings['LBL_SAVE_BUTTON_KEY'] . '" class="button" onclick="this.form.edit.value=\'true\';this.form.action.value=\'index\';return check_form(\'EditView\');" type="submit" name="button" value="' . $app_strings['LBL_SAVE_BUTTON_LABEL'] . '" > '; $edit_botton .= '<input title="' . $app_strings['LBL_CANCEL_BUTTON_TITLE'] . '" accessKey="' . $app_strings['LBL_CANCEL_BUTTON_KEY'] . '" class="button" onclick="this.form.edit.value=\'false\';this.form.action.value=\'index\';" type="submit" name="button" value="' . $app_strings['LBL_CANCEL_BUTTON_LABEL'] . '" > '; $header_text = ''; if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=ListView&from_module=" . $_REQUEST['module'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDIT_LAYOUT']) . "</a>"; } $ListView = new ListView(); $ListView->initNewXTemplate('modules/Currencies/ListView.html', $mod_strings); $ListView->xTemplateAssign('PRETABLE', $pretable); $ListView->xTemplateAssign('POSTTABLE', '</form>'); $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_DELETE'])); //$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']. $header_text ); $ListView->setHeaderText($merge_button); $ListView->processListView($lc->list, "main", "CURRENCY"); if (isset($_GET['record']) && !empty($_GET['record']) && !isset($_POST['edit'])) { $focus->retrieve($_GET['record']); $focus->conversion_rate = format_number($focus->conversion_rate, 10, 10); } if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=EditView&from_module=" . $_REQUEST['module'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDIT_LAYOUT']) . "</a>"; } if (empty($focus->id)) { echo get_form_header($app_strings['LBL_CREATE_BUTTON_LABEL'] . $header_text, $edit_botton, false); } else {
* In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by * SugarCRM" logo. If the display of the logo is not reasonably feasible for * technical reasons, the Appropriate Legal Notices must display the words * "Powered by SugarCRM". ********************************************************************************/ require_once 'modules/Schedulers/Job.php'; $header_text = ''; global $mod_strings; global $app_list_strings; global $app_strings; global $current_user; $focus = new Job(); $focus->retrieve(); $focus->get_list_view_data(); //_pp($_REQUEST); $where = ''; $limit = 20; $varName = $focus->object_name; $allowByOverride = true; if (!empty($_REQUEST['Schedulers_' . $varName . '_ORDER_BY'])) { $orderBy = $_REQUEST['Schedulers_' . $varName . '_ORDER_BY']; } else { $orderBy = $focus->order_by; } $listView = new ListView(); $listView->initNewXTemplate('modules/Schedulers/Scheduled.html', $mod_strings); $listView->setHeaderTitle($mod_strings['LBL_LIST_TITLE']); $listView->setQuery($where, $limit, $orderBy, $varName, $allowByOverride); $listView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE'])); $listView->processListView($focus, "main", "JOB");
global $theme; global $focus; global $action; // focus_alerts_lists is the means of passing data to a SubPanelView. global $focus_alertcomp_list; $button = "<form action='index.php' method='post' name='ComponentView' id='ComponentView'>\n"; $button .= "<input type='hidden' name='module' value='WorkFlowAlerts'>\n"; $button .= "<input type='hidden' name='parent_id' value='{$focus->id}'>\n<input type='hidden' name='alert_name' value='{$focus->name}'>\n"; $button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n"; $button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n"; $button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n"; $button .= "<input type='hidden' name='action'>\n"; $button .= "<input title='" . $app_strings['LBL_NEW_BUTTON_TITLE'] . "' class='button' type='button' name='New' value=' " . $app_strings['LBL_NEW_BUTTON_LABEL'] . "'"; $button .= "LANGUAGE=javascript onclick='window.open(\"index.php?module=WorkFlowAlerts&action=CreateStep1&sugar_body_only=true&form=ComponentView&parent_id={$focus->id}&base_module={$workflow_object->base_module}\",\"new\",\"width=400,height=500,resizable=1,scrollbars=1\");'"; $button .= ">\n"; $button .= "</form>\n"; $ListView = new ListView(); $header_text = ''; $ListView->initNewXTemplate('modules/WorkFlowAlerts/SubPanelView.html', $current_module_strings); $ListView->xTemplateAssign("PARENT_ID", $focus->id); $target_workflow_object = $workflow_object->get_parent_object(); $ListView->xTemplateAssign("BASE_MODULE", $target_workflow_object->base_module); $ListView->xTemplateAssign("WORKFLOW_ID", $workflow_object->id); //meta array drive line below $ListView->xTemplateAssign("LBL_LIST_STATEMENT", $current_module_strings[$focus->target_meta_array['statement_title']]); $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id={$_REQUEST['record']}"); $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT'])); $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE'])); $ListView->setHeaderTitle($current_module_strings[$focus->target_meta_array['sub_panel_title']] . $header_text); $ListView->setHeaderText($button); $ListView->processListView($focus_alertcomp_list, "main", "ALERTCOMP");
function execute($format = 'TABLE', $parameter_values = array()) { global $sugar_config, $current_user, $current_language; global $beanList, $beanFiles; $beanName = $beanList[$this->mainmodule]; $beanFile = $beanFiles[$beanName]; if (!empty($beanName) && !empty($beanFile)) { require_once $beanFile; $seed = new $beanName(); $filters = $this->get_filters(); $sql_where = array(); foreach ($filters as $filter) { $sql_where[] = $filter->create_where_clause($parameter_values); } $orders = $this->get_orders(); $sql_order = array(); foreach ($orders as $order) { $sql_order[] = $order->create_order_clause($parameter_values); } if ($this->filtertype == "AND") { $sql_join = " and "; } else { if ($this->filtertype == "OR") { $sql_join = " or "; } else { $sql_join = " and "; } } if (!empty($sql_join) && !empty($sql_where)) { $where_clause = "(" . join($sql_join, $sql_where) . ")"; } if (!empty($sql_order)) { $order_clause = join(", ", $sql_order); } if (!empty($this->customwhere1)) { $where_clause = $this->customwhere1 . " " . $where_clause; } if (!empty($this->customwhere2)) { $where_clause = $where_clause . " " . $this->customwhere1; } $rows = $seed->get_full_list($order_clause, $where_clause); if (empty($rows)) { $rows = array(); } $this->report_output .= "Found " . count($rows) . " rows<br/>"; if ($format == "TABLE" || $format == "HTML" || $format == "SIMPLEHTML" || $format == "CSV") { $list_data = array(); $list_fields = array(); foreach ($rows as $row) { $row_data = $row->get_list_view_data(); $row_data_mapped = array(); foreach (array_keys($row_data) as $key) { $row_data_mapped[strtoupper($this->mainmodule) . "_" . $key] = $row_data[$key]; } $list_data[] = new ListingRow($row_data_mapped); if (empty($list_fields)) { foreach (array_keys($row_data) as $key) { $list_fields[] = $key; } } } if ($format == "HTML" || $format == "TABLE") { if ($this->list_template == "default") { require_once 'include/ListView/ListViewSmarty.php'; if (file_exists('custom/modules/' . $this->mainmodule . '/metadata/listviewdefs.php')) { require_once 'custom/modules/' . $this->mainmodule . '/metadata/listviewdefs.php'; } else { require_once 'modules/' . $this->mainmodule . '/metadata/listviewdefs.php'; } $lv = new ListViewSmarty(); $displayColumns = array(); foreach ($listViewDefs[$this->mainmodule] as $col => $params) { if (!empty($params['default']) && $params['default']) { $displayColumns[$col] = $params; } } $lv->displayColumns = $displayColumns; $lv->setup($seed, 'include/ListView/ListViewGeneric.tpl', $where_clause, $params); ob_start(); echo $lv->display(); } else { require_once 'include/ListView/ListView.php'; $lv = new ListView(); if ($_REQUEST["is_scheduler"] = "true") { $lv->setDisplayHeaderAndFooter(false); } $lv->initNewXTemplate('modules/ZuckerListingTemplate/lists/' . $this->list_template, return_module_language($current_language, $this->mainmodule)); $lv->xTemplateAssign("SITE_URL", $sugar_config["site_url"]); ob_start(); $lv->processListViewTwo($list_data, "rows", "ROW"); } if ($format == "HTML") { $date = date("ymd_His"); $this->report_result_type = "FILE"; $this->report_result_name = $date . "_" . $this->name . ".html"; $this->report_result_name = strtolower(join("_", explode(" ", $this->report_result_name))); $this->report_result = $this->archive_dir . "/" . $this->report_result_name; $f = fopen($this->report_result, "w"); $c = file_get_contents("modules/ZuckerListingTemplate/lists/header.html"); $c = str_replace("{SITE_URL}", $sugar_config["site_url"], $c); $c = str_replace("{THEME_URL}", $sugar_config["site_url"] . "/themes/" . $theme, $c); fwrite($f, $c); fwrite($f, ob_get_clean()); fwrite($f, file_get_contents("modules/ZuckerListingTemplate/lists/footer.html")); fclose($f); } else { $this->report_result_type = "INLINE"; $this->report_result = ob_get_clean(); } } else { if ($format == "SIMPLEHTML") { $date = date("ymd_His"); $this->report_result_type = "FILE"; $this->report_result_name = $date . "_" . $this->name . ".html"; $this->report_result_name = strtolower(join("_", explode(" ", $this->report_result_name))); $this->report_result = $this->archive_dir . "/" . $this->report_result_name; $f = fopen($this->report_result, "w"); fwrite($f, "<!DOCTYPE html PUBLIC \"-//W3C//DTD html 4.01 Transitional//EN\">\n"); fwrite($f, "<html><body><table border=\"1\">"); if ($this->include_header && !empty($list_fields)) { fwrite($f, "\n<tr>"); foreach ($list_fields as $col_name) { fwrite($f, "<th>" . $col_name . "</th>"); } fwrite($f, "</tr>"); } foreach ($list_data as $list_row) { fwrite($f, "\n<tr>"); foreach (array_keys($list_row->list_view_data) as $col_name) { $field = $list_row->list_view_data[$col_name]; if (empty($field)) { fwrite($f, "<td> </td>"); } else { fwrite($f, "<td>" . $this->format_value_for_html($field) . "</td>"); } } fwrite($f, "</tr>"); } fwrite($f, "\n</table></body></html>"); fclose($f); } else { if ($format == "CSV") { $date = date("ymd_His"); $this->report_result_type = "FILE"; $this->report_result_name = $date . "_" . $this->name . ".csv"; $this->report_result_name = strtolower(join("_", explode(" ", $this->report_result_name))); $this->report_result = $this->archive_dir . "/" . $this->report_result_name; $f = fopen($this->report_result, "w"); if ($this->include_header && count($list_data) > 0) { $row = $list_data[0]; foreach (array_keys($row->list_view_data) as $col_name) { fwrite($f, $col_name); fwrite($f, $this->col_delim); } fwrite($f, $this->row_delim); } foreach ($list_data as $list_row) { foreach (array_keys($list_row->list_view_data) as $col_name) { $field = $list_row->list_view_data[$col_name]; $pieces = explode("\n", $field); $cleaned_pieces = array(); foreach ($pieces as $piece) { $cleaned_pieces[] = trim($piece); } fwrite($f, join(" ", $cleaned_pieces)); if ($i != count($list_row->list_view_data) - 1) { fwrite($f, $this->col_delim); } } fwrite($f, $this->row_delim); } fclose($f); } } } } else { if ($format == "PROSPECTLIST") { require_once "modules/ProspectLists/ProspectList.php"; $pl = new ProspectList(); $pl->name = empty($_REQUEST["prospect_list_name"]) ? $this->name : $_REQUEST["prospect_list_name"]; $pl->save(); foreach ($rows as $row) { if ($row->object_name == "Contact") { $pl->set_relationship('prospect_lists_prospects', array("related_type" => "Contacts", "related_id" => $row->id, 'prospect_list_id' => $pl->id)); } else { if ($row->object_name == "Lead") { $pl->set_relationship('prospect_lists_prospects', array("related_type" => "Leads", "related_id" => $row->id, 'prospect_list_id' => $pl->id)); } else { if ($row->object_name == "Prospect") { $pl->set_relationship('prospect_lists_prospects', array("related_type" => "Prospects", "related_id" => $row->id, 'prospect_list_id' => $pl->id)); } } } } $this->report_result = "index.php?module=ProspectLists&action=DetailView&record=" . $pl->id; $this->report_result_type = "FORWARD"; } } $result = true; } return $result; }
} else { $storeQuery->saveFromGet($currentModule); } $where = " base_module IS NOT NULL"; echo "<p><p>"; //echo get_form_header($mod_strings['LBL_ALERT_TEMPLATES']. $header_text, "", false); /////////////Display Alert Template Stuff// $template_form = new XTemplate('modules/WorkFlow/TemplateForm.html'); $template_form->assign("MOD", $current_module_strings); $template_form->assign("APP", $app_strings); $template_form->assign("BASE_MODULE", get_select_options_with_id($workflow_object->get_module_array(), "")); $template_form->parse("main"); $template_form->out("main"); global $title; $display_title = $mod_strings['LBL_ALERT_TEMPLATES']; if ($title) { $display_title = $title; } $ListView = new ListView(); $ListView->initNewXTemplate('modules/WorkFlow/WorkFlowListView.html', $current_module_strings); $ListView->setHeaderTitle($display_title . $header_text); $ListView->show_export_button = false; $ListView->show_delete_button = false; $ListView->show_select_menu = false; global $image_path; $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=WorkFlowListView"); $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE'])); $workflow_strings = return_module_language($current_language, 'WorkFlow'); $ListView->xTemplateAssign("NTC_REMOVE_ALERT", $workflow_strings['NTC_REMOVE_ALERT']); $ListView->setQuery($where, "", "email_templates.date_entered DESC", "EMAIL_TEMPLATE", true); $ListView->processListView($seedEmailTemplate, "main", "EMAIL_TEMPLATE");
ksort($customizable_modules); return $customizable_modules; } $customizable_modules = get_customizable_modules(); $module_options_html = get_select_options_with_id($customizable_modules, $module_name); global $current_language; $mod_strings = return_module_language($current_language, 'EditCustomFields'); global $app_strings; // the title label and arrow pointing to the module search form $header = get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false); $search_form->assign('header', $header); $search_form->assign('module_options', $module_options_html); $search_form->assign('mod', $mod_strings); $search_form->assign('app', $app_strings); $search_form->parse('main'); $search_form->out('main'); if (!empty($module_name)) { $theme_path = "themes/{$theme}"; $img_path = "{$theme_path}/images"; require_once 'modules/DynamicFields/DynamicField.php'; $seed_fields_meta_data = new FieldsMetaData(); $where_clause = "custom_module='{$module_name}'"; $listview = new ListView(); $listview->initNewXTemplate('modules/EditCustomFields/ListView.html', $mod_strings); $listview->setHeaderTitle($module_name . ' ' . $mod_strings['LBL_MODULE']); $listview->setQuery($where_clause, '', 'data_type', 'FIELDS_META_DATA'); $listview->xTemplateAssign('DELETE_INLINE_PNG', get_image("{$img_path}/delete_inline", 'align="absmiddle" alt="' . $app_strings['LNK_DELETE'] . '" border="0"')); $listview->xTemplateAssign('EDIT_INLINE_PNG', get_image("{$img_path}/edit_inline", 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"')); $listview->xTemplateAssign('return_module_name', $module_name); $listview->processListView($seed_fields_meta_data, 'main', 'FIELDS_META_DATA'); }
require_once 'XTemplate/xtpl.php'; require_once 'include/ListView/ListView.php'; require_once 'modules/Schedulers/Scheduler.php'; $header_text = ''; global $mod_strings; global $app_list_strings; global $app_strings; global $current_user; global $current_language; $current_module_strings = return_module_language($current_language, 'Schedulers'); $focus = new Scheduler(); $focus->checkCurl(); $where = ''; $limit = '0'; $varName = $focus->object_name; //'Scheduler' if (!empty($_REQUEST['Schedulers_SCHEDULER_ORDER_BY'])) { $orderBy = $_REQUEST['Schedulers_SCHEDULER_ORDER_BY']; } else { $orderBy = $focus->order_by; } $allowByOverride = true; $listView = new ListView(); $listView->show_mass_update = false; // don't want to mass delete all Schedules $listView->initNewXTemplate('modules/Schedulers/ListView.html', $current_module_strings); $listView->setHeaderTitle($current_module_strings['LBL_LIST_TITLE']); $listView->setQuery($where, $limit, $orderBy, $varName, $allowByOverride); $listView->xTemplateAssign("REMOVE_INLINE_PNG", get_image($image_path . 'delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_REMOVE'] . '" border="0"')); $listView->processListView($focus, "main", "SCHEDULER"); $focus->displayCronInstructions();
global $mod_strings; global $app_list_strings; global $current_user; $focus = new InboundEmail(); $focus->checkImap(); /////////////////////////////////////////////////////////////////////////////// //// I-E SYSTEM SETTINGS //// handle saving settings if (isset($_REQUEST['save']) && $_REQUEST['save'] == 'true') { $focus->saveInboundEmailSystemSettings('Case', $_REQUEST['inbound_email_case_macro']); } //// END I-E SYSTEM SETTINGS /////////////////////////////////////////////////////////////////////////////// if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $ListView->setHeaderText("<a href='index.php?action=index&module=DynamicLayout&from_action=ListView&from_module=" . $_REQUEST['module'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDIT_LAYOUT']) . "</a>"); } $where = ''; $limit = '0'; $orderBy = 'date_entered'; $varName = $focus->object_name; $allowByOverride = true; $listView = new ListView(); $listView->initNewXTemplate('modules/InboundEmail/ListView.html', $mod_strings); $listView->setHeaderTitle($mod_strings['LBL_MODULE_TITLE']); echo $focus->getSystemSettingsForm(); $listView->show_export_button = false; $listView->ignorePopulateOnly = TRUE; //Always show all records, ignore save_query performance setting. $listView->setQuery($where, $limit, $orderBy, 'InboundEmail', $allowByOverride); $listView->xTemplateAssign("EDIT_INLINE_IMG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT'])); $listView->processListView($focus, "main", "InboundEmail");
if (!empty($campaign_id)) { array_push($where_clauses, "campaign_id = '" . $GLOBALS['db']->quote($campaign_id) . "'"); } $where = ""; foreach ($where_clauses as $clause) { if ($where != "") { $where .= " and "; } $where .= $clause; } Log::info("Here is the where clause for the list view: {$where}"); } $ListView = new ListView(); $ListView->initNewXTemplate('modules/Campaigns/Schedule.html', $current_module_strings); if ($test) { $ListView->xTemplateAssign("SCHEDULE_MESSAGE_HEADER", $current_module_strings['LBL_SCHEDULE_MESSAGE_TEST']); } else { $ListView->xTemplateAssign("SCHEDULE_MESSAGE_HEADER", $current_module_strings['LBL_SCHEDULE_MESSAGE_EMAILS']); } //force multi-select popup $ListView->process_for_popups = true; $ListView->multi_select_popup = true; //end $ListView->mergeduplicates = false; $ListView->show_export_button = false; $ListView->show_select_menu = false; $ListView->show_delete_button = false; $ListView->setDisplayHeaderAndFooter(false); $ListView->xTemplateAssign("RETURN_MODULE", $_POST['return_module']); $ListView->xTemplateAssign("RETURN_ACTION", $_POST['return_action']); $ListView->xTemplateAssign("RETURN_ID", $_POST['record']);
$edit_botton .= '<input type="hidden" name="module" value="Currencies">'; $edit_botton .= '<input type="hidden" name="record" value="' . $focus_id . '">'; $edit_botton .= '<input type="hidden" name="action">'; $edit_botton .= '<input type="hidden" name="edit">'; $edit_botton .= '<input type="hidden" name="return_module" value="Currencies">'; $edit_botton .= '<input type="hidden" name="return_action" value="index">'; $edit_botton .= '<input type="hidden" name="return_id" value="">'; $edit_botton .= '<input title="' . $app_strings['LBL_SAVE_BUTTON_TITLE'] . '" accessKey="' . $app_strings['LBL_SAVE_BUTTON_KEY'] . '" class="button" onclick="this.form.edit.value=\'true\';this.form.action.value=\'index\';return check_form(\'EditView\');" type="submit" name="button" value="' . $app_strings['LBL_SAVE_BUTTON_LABEL'] . '" > '; $edit_botton .= '<input title="' . $app_strings['LBL_CLEAR_BUTTON_TITLE'] . '" accessKey="' . $app_strings['LBL_CLEAR_BUTTON_KEY'] . '" class="button" onclick="this.form.edit.value=\'false\';this.form.action.value=\'index\';" type="submit" name="button" value="' . $app_strings['LBL_CLEAR_BUTTON_LABEL'] . '" > '; $header_text = ''; if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=ListView&from_module=" . $_REQUEST['module'] . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>"; } $ListView = new ListView(); $ListView->initNewXTemplate('modules/Currencies/ListView.html', $mod_strings); $ListView->xTemplateAssign('PRETABLE', $pretable); $ListView->xTemplateAssign('POSTTABLE', '</form>'); $ListView->xTemplateAssign("DELETE_INLINE_PNG", get_image($image_path . 'delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_DELETE'] . '" border="0"')); $ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE'] . $header_text); $ListView->setHeaderText($merge_button); $ListView->processListView($lc->list, "main", "CURRENCY"); if (isset($_GET['record']) && !empty($_GET['record']) && !isset($_POST['edit'])) { $focus->retrieve($_GET['record']); $focus->conversion_rate = format_number($focus->conversion_rate, 10, 10); } if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=EditView&from_module=" . $_REQUEST['module'] . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>"; } echo get_form_header($mod_strings['LBL_CURRENCY'] . " " . $focus->name . $header_text, $edit_botton, false); $xtpl = new XTemplate('modules/Currencies/EditView.html'); $xtpl->assign("MOD", $mod_strings);
global $currentModule; global $theme; global $focus; global $action; // focus_list is the means of passing data to a SubPanelView. global $focus_list; $button = "<form action='index.php' method='post' name='UsersForm' id='UsersForm'>\n"; $button .= "<input type='hidden' name='module' value='Users'>\n"; if ($currentModule == 'Roles') { $button .= "<input type='hidden' name='record' value='{$focus->id}'>\n"; } $button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n"; $button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n"; $button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n"; $button .= "<input type='hidden' name='action'>\n"; $button .= "<input type='hidden' name='report_module'>\n"; $button .= "<input type='hidden' name='id'>\n"; if ($currentModule == 'Roles') { $button .= "<input title='" . $app_strings['LBL_SELECT_BUTTON_TITLE'] . " ' accessKey='" . $app_strings['LBL_SELECT_BUTTON_KEY'] . "' type='button' class='button' value=' " . $app_strings['LBL_SELECT_BUTTON_LABEL'] . " ' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Users&action=PopupUsers&html=Popup_Users_picker&form=UsersForm&record=" . $focus->id . "&form_submit=true&query=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'>\n"; } $button .= "</form>\n"; $ListView = new ListView(); $ListView->initNewXTemplate('modules/Roles/SubPanelViewUsers.html', $current_module_strings); $ListView->xTemplateAssign("ROLE_RECORD", $focus->id); $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"')); $ListView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_REMOVE'] . '" border="0"')); $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id=" . $focus->id); $ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME']); $ListView->setQuery("", "", "user_name", "USER"); $ListView->setHeaderText($button); $ListView->processListView($focus_list, "main", "USER");
$xtpl->out("main"); if (file_exists("modules/ZuckerWordTemplate/SubPanelView.php")) { include "modules/ZuckerWordTemplate/SubPanelView.php"; } echo "\n<p>\n"; $lv = new ListView(); $lv->setXTemplate($xtpl); $lv->xTemplateAssign("DELETE_INLINE_PNG", get_image($image_path . 'delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_DELETE'] . '" border="0"')); $lv->setHeaderTitle($current_module_strings['LBL_LISTING_FILTER_LIST']); $lv->show_export_button = false; $lv->processListView($focus->get_filters(), "filters", "FILTER"); echo "\n</p>\n"; echo "\n<p>\n"; $lv = new ListView(); $lv->setXTemplate($xtpl); $lv->xTemplateAssign("DELETE_INLINE_PNG", get_image($image_path . 'delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_DELETE'] . '" border="0"')); $lv->setHeaderTitle($current_module_strings['LBL_LISTING_ORDER_LIST']); $lv->show_export_button = false; $lv->processListView($focus->get_orders(), "orders", "ORDER"); echo "\n</p>\n"; if (is_admin($current_user)) { $field_select = $focus->get_full_fields_list(); asort($field_select); $rp = new ReportParameter(); $rps = $rp->get_full_list(); $param_select = array("" => ""); if (!empty($rps)) { foreach ($rps as $rp) { $param_select[$rp->id] = $rp->get_summary_text(); } }
global $currentModule; global $theme; global $focus; global $action; // focus_list is the means of passing data to a SubPanelView. global $focus_list; $button = "<form action='index.php' method='post' name='form' id='form'>\n"; $button .= "<input type='hidden' name='module' value='Project'>\n"; $button .= "<input type='hidden' name='relation_id' value='{$focus->id}'>\n"; $button .= "<input type='hidden' name='relation_type' value='{$currentModule}'>\n"; $button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n"; $button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n"; $button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n"; $button .= "<input type='hidden' name='action'>\n"; if (!empty($focus->object_name) && $focus->object_name == 'Opportunity') { $button .= "<input type='hidden' name='account_id' value='{$focus->account_id}'>\n"; $button .= "<input type='hidden' name='opportunity_name' value='{$focus->name}'>\n"; } $button .= "<input title='" . $app_strings['LBL_NEW_BUTTON_TITLE'] . "' accessyKey='" . $app_strings['LBL_NEW_BUTTON_KEY'] . "' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value=' " . $app_strings['LBL_NEW_BUTTON_LABEL'] . " '>\n"; $button .= "</form>\n"; $ListView = new ListView(); $ListView->initNewXTemplate('modules/Project/SubPanelView.html', $current_module_strings); $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT'])); $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id=" . $focus->id); $ListView->setHeaderTitle($current_module_strings['LBL_PROJECT_SUBPANEL_TITLE']); $header_text = ''; if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=" . $_REQUEST['action'] . "&from_module=" . $_REQUEST['module'] . "&record=" . $_REQUEST['record'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDITLAYOUT']) . "</a>"; } $ListView->setHeaderTitle($current_module_strings['LBL_PROJECT_SUBPANEL_TITLE'] . $header_text); $ListView->processListView($focus_list, "main", "PROJECT");
} $edit_botton = '<form name="EditView" method="POST" action="index.php" >'; $edit_botton .= '<input type="hidden" name="module" value="Currencies">'; $edit_botton .= '<input type="hidden" name="record" value="' . $focus_id . '">'; $edit_botton .= '<input type="hidden" name="action">'; $edit_botton .= '<input type="hidden" name="edit">'; $edit_botton .= '<input type="hidden" name="return_module" value="Currencies">'; $edit_botton .= '<input type="hidden" name="return_action" value="index">'; $edit_botton .= '<input type="hidden" name="return_id" value="">'; $header_text = ''; if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=ListView&from_module=" . $_REQUEST['module'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDIT_LAYOUT']) . "</a>"; } $ListView = new ListView(); $ListView->initNewXTemplate('modules/Currencies/ListView.html', $mod_strings); $ListView->xTemplateAssign('PRETABLE', $pretable); $ListView->xTemplateAssign('POSTTABLE', '</form>'); //$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']. $header_text ); $ListView->setHeaderText($merge_button); $ListView->processListView($lc->list, "main", "CURRENCY"); if (isset($_GET['record']) && !empty($_GET['record']) && !isset($_POST['edit'])) { $focus->retrieve($_GET['record']); $focus->conversion_rate = format_number($focus->conversion_rate, 10, 10); } if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=EditView&from_module=" . $_REQUEST['module'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDIT_LAYOUT']) . "</a>"; } if (empty($focus->id)) { echo get_form_header($app_strings['LBL_CREATE_BUTTON_LABEL'] . ' Currency' . $header_text, $edit_botton, false); } else { echo get_form_header($app_strings['LBL_EDIT_BUTTON_LABEL'] . " » " . $focus->name . $header_text, $edit_botton, false);
$GLOBALS['log']->info("Release list view"); global $theme; $button = "<form border='0' action='index.php' method='post' name='form'>\n"; $button .= "<input type='hidden' name='module' value='Releases'>\n"; $button .= "<input type='hidden' name='action' value='EditView'>\n"; $button .= "<input type='hidden' name='edit' value='true'>\n"; $button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n"; $button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n"; $button .= "<input title='" . $app_strings['LBL_NEW_BUTTON_TITLE'] . "' accessyKey='" . $app_strings['LBL_NEW_BUTTON_KEY'] . "' class='button' type='submit' name='New' value=' " . $app_strings['LBL_NEW_BUTTON_LABEL'] . " '>\n"; $button .= "</form>\n"; $ListView = new ListView(); if ((is_admin($current_user) || is_admin_for_module($GLOBALS['current_user'], 'Bugs')) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=ListView&from_module=" . $_REQUEST['module'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>"; } $ListView->initNewXTemplate('modules/Releases/ListView.html', $mod_strings); $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_DELETE'] . '" border="0"')); $ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE'] . $header_text); $ListView->setHeaderText($button); $ListView->show_export_button = false; $ListView->show_mass_update = false; $ListView->show_delete_button = false; $ListView->show_select_menu = false; $ListView->setQuery("", "", "list_order", "RELEASE"); $ListView->processListView($focus, "main", "RELEASE"); if ($is_edit) { $edit_button = "<form name='EditView' method='POST' action='index.php'>\n"; $edit_button .= "<input type='hidden' name='module' value='Releases'>\n"; $edit_button .= "<input type='hidden' name='record' value='{$focus->id}'>\n"; $edit_button .= "<input type='hidden' name='action'>\n"; $edit_button .= "<input type='hidden' name='edit'>\n"; $edit_button .= "<input type='hidden' name='isDuplicate'>\n";
* "Powered by SugarCRM". ********************************************************************************/ /********************************************************************************* * Description: TODO: To be written. * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. * All Rights Reserved. * Contributor(s): ______________________________________.. ********************************************************************************/ global $theme; global $sugar_config; global $current_language; $currentMax = $sugar_config['list_max_entries_per_page']; $sugar_config['list_max_entries_per_page'] = 10; $current_mod_strings = return_module_language($current_language, 'Emails'); $focus = new Email(); $ListView = new ListView(); $display_title = $current_mod_strings['LBL_LIST_TITLE_MY_INBOX'] . ': ' . $current_mod_strings['LBL_UNREAD_HOME']; $where = 'emails.deleted = 0 AND emails.assigned_user_id = \'' . $current_user->id . '\' AND emails.type = \'inbound\' AND emails.status = \'unread\''; $limit = 10; /////////////////////////////////////////////////////////////////////////////// //// OUTPUT /////////////////////////////////////////////////////////////////////////////// echo $focus->rolloverStyle; $ListView->initNewXTemplate('modules/Emails/ListViewHome.html', $current_mod_strings); $ListView->xTemplateAssign('ATTACHMENT_HEADER', SugarThemeRegistry::current()->getImage('attachment', "", "", "")); $ListView->setHeaderTitle($display_title); $ListView->setQuery($where, '', 'date_sent, date_entered DESC', "EMAIL"); $ListView->setAdditionalDetails(); $ListView->processListView($focus, 'main', 'EMAIL'); //echo $focus->quickCreateJS(); $sugar_config['list_max_entries_per_page'] = $currentMax;
global $focus; global $action; /////////////////////////////////////// /// /// SETUP PARENT POPUP $popup_request_data = array('call_back_function' => 'set_return_and_save', 'form_name' => 'DetailView', 'field_to_name_array' => array('id' => 'opportunity_id')); $json = getJSONobj(); $encoded_popup_request_data = $json->encode($popup_request_data); // /////////////////////////////////////// // focus_list is the means of passing data to a SubPanelView. global $focus_list; $button = "<form action='index.php' method='post' name='form' id='form'>\n"; $button .= "<input type='hidden' name='module' value='Opportunities'>\n"; $button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n"; $button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n"; $button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n"; $button .= "<input type='hidden' name='action'>\n"; $button .= "<input title='" . $app_strings['LBL_SELECT_BUTTON_TITLE'] . "' accessyKey='" . $app_strings['LBL_SELECT_BUTTON_KEY'] . "' type='button' class='button' value=' " . $app_strings['LBL_SELECT_BUTTON_LABEL'] . " ' name='button' onclick='open_popup(\"Opportunities\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n"; $button .= "</form>\n"; $header_text = ''; if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelView&from_module=Opportunities&record=" . $_REQUEST['record'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>"; } $ListView = new ListView(); $ListView->initNewXTemplate('modules/Opportunities/SubPanelViewProjects.html', $current_module_strings); $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id={$_REQUEST['record']}"); $ListView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_REMOVE'] . '" border="0"')); $ListView->setHeaderTitle($project_module_strings['LBL_OPPORTUNITY_SUBPANEL_TITLE'] . $header_text); $ListView->setHeaderText($button); $ListView->processListView($focus_list, "main", "OPPORTUNITY");
/////////////////////////////////////// /// /// SETUP PARENT POPUP $popup_request_data = array('call_back_function' => 'set_return_and_save', 'form_name' => 'DetailView', 'field_to_name_array' => array('id' => 'machine_id')); $json = getJSONobj(); $encoded_popup_request_data = $json->encode($popup_request_data); // /////////////////////////////////////// $button .= "<input title='" . $app_strings['LBL_SELECT_BUTTON_TITLE'] . "' accessKey='" . $app_strings['LBL_SELECT_BUTTON_KEY'] . "' type='button' class='button' value=' " . $app_strings['LBL_SELECT_BUTTON_LABEL'] . " ' name='button' onclick='open_popup(\"Machines\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n"; // ." ' name='button' onclick='window.open(\"index.php?module=Machines&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true&account_id=$focus->account_id&account_name=".urlencode($focus->account_name)."\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'>\n"; } $button .= "</form>\n"; $ListView = new ListView(); $header_text = ''; if ($currentModule == 'Bugs') { if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelViewBug&from_module=Machines&record=" . $_REQUEST['record'] . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>"; } $ListView->initNewXTemplate('modules/Machines/SubPanelViewBug.html', $current_module_strings); } else { if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelView&from_module=Machines&record=" . $_REQUEST['record'] . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>"; } $ListView->initNewXTemplate('modules/Machines/SubPanelView.html', $current_module_strings); } $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id={$_REQUEST['record']}"); $ListView->xTemplateAssign("EDIT_INLINE_PNG", get_image($image_path . 'edit_inline', 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"')); $ListView->xTemplateAssign("DELETE_INLINE_PNG", get_image($image_path . 'delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_REMOVE'] . '" border="0"')); $ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME'] . $header_text); $ListView->setHeaderText($button); $ListView->processListView($focus_list, "main", "MACHINE");
$button = "<form action='index.php' method='post' name='form' id='form'>\n"; $button .= "<input type='hidden' name='module' value='WorkFlowAlertShells'>\n"; $button .= "<input type='hidden' name='module_tab' value='WorkFlow'>\n"; $button .= "<input type='hidden' name='workflow_id' value='{$focus->id}'>\n<input type='hidden' name='alert_name' value='{$focus->name}'>\n"; $button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n"; $button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n"; $button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n"; $button .= "<input type='hidden' name='action' value='EditView';>\n"; require_once 'include/SugarSmarty/plugins/function.sugar_action_menu.php'; $button .= smarty_function_sugar_action_menu(array('id' => 'ACLRoles_EditView_action_menu', 'buttons' => $buttons), $xtpl); //$button .= "<input title='".$current_module_strings['LBL_NEW_BUTTON_TITLE_ACTION']."' class='button' type='button' name='New' value=' ".$current_module_strings['LBL_NEW_BUTTON_LABEL_ACTION']."'"; //$button .= "LANGUAGE=javascript onclick='window.open(\"index.php?module=WorkFlowActionShells&action=CreateStep1&html=CreateStep1&form=ComponentView&form_submit=false&query=true&sugar_body_only=true&workflow_id=$focus->id\",\"new\",\"width=400,height=500,resizable=1,scrollbars=1\");'"; //$button .= ">\n"; $button .= "</form>"; $admin = Administration::getSettings(); $mail_server = trim($admin->settings['mail_smtpserver']); if (empty($mail_server) && !empty($focus_alerts_list)) { echo "<BR><font color='red'><b>" . $mod_strings['LBL_LACK_OF_NOTIFICATIONS_ON'] . "</b></font><BR>"; } //ALERT SUBPANEL //$focus_alerts_list2 = array_merge($focus_alerts_list, $focus_actions_list); $ListView = new ListView(); $header_text = ''; $ListView->initNewXTemplate('modules/WorkFlowAlertShells/SubPanelView.html', $current_module_strings); $ListView->xTemplateAssign("WORKFLOW_ID", $focus->id); $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id={$_REQUEST['record']}"); $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT'])); $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE'])); $ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME_COMBO'] . $header_text); $ListView->setHeaderText($button); $ListView->processListView($focus_alerts_list, "main", "ALERT");
$button .= "<input type='hidden' name='module' value='ZuckerReportContainer'>\n"; $button .= "<input type='hidden' name='action'>\n"; $button .= "<input type='hidden' name='record'>\n"; $button .= "<input type='hidden' name='parent_id'>\n"; if (!empty($container->id)) { $button .= "<input class='button' onclick='this.form.action.value=\"DetailView\"; this.form.record.value=\"" . $container->parent_id . "\"' type='submit' value=' " . $mod_strings['LBL_CONTAINER_UP'] . " '>\n"; } $button .= "<input name='name' size='20' maxlength='50' type='text'/>\n"; $button .= "<input class='button' onclick='this.form.action.value=\"New\"; this.form.parent_id.value=\"" . $container->id . "\"; return verify_container_data(this.form);' type='submit' value=' " . $mod_strings['LBL_CONTAINER_NEW'] . " '>\n"; $button .= "</form>\n"; if (empty($container->id)) { $child_containers = ReportContainer::get_root_containers(); $child_reports = ReportContainer::get_root_reports(); } else { $child_containers = $container->get_linked_beans("containers", "ReportContainer"); $child_reports = $container->get_linked_beans("reports", "ZuckerReport"); } $child_containers = SimpleTeams::filterBeanList($child_containers); require_once 'include/ListView/ListView.php'; $lv = new ListView(); $lv->initNewXTemplate('modules/ZuckerReportContainer/DetailView.html', $mod_strings); $lv->xTemplateAssign("DELETE_INLINE_PNG", get_image($image_path . 'delete_inline.png', 'align="absmiddle" alt="' . $app_strings['LNK_DELETE'] . '" border="0"')); $lv->xTemplateAssign("EDIT_INLINE_PNG", get_image($image_path . 'edit_inline.png', 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"')); $lv->xTemplateAssign("RETURN_URL", "&return_module=ZuckerReportContainer&return_action=DetailView&return_id=" . $container->id); $lv->setHeaderTitle($mod_strings['LBL_SUBCONTAINERS']); $lv->setHeaderText($button); $lv->processListViewTwo($child_containers, "containers", "CONTAINER"); $lv->setHeaderTitle($mod_strings['LBL_SUBREPORTS']); $lv->setHeaderText(""); $lv->processListViewTwo($child_reports, "reports", "REPORT"); echo get_validate_js();