function get_list_view_data() { global $app_strings, $mod_strings; global $app_list_strings; global $mod_strings; global $beanList; global $current_module_strings2; global $current_user; /* ///Determine Natural Language to display if($this->action_type=='new'){ $natural_language = $current_module_strings['LBL_ACTION_NEW']." ".$beanList[$this->action_module]; } if($this->action_type=='update_rel'){ $workflow_object = $this->get_workflow_object(); $rel_module = $workflow_object->get_rel_module($this->rel_module); $natural_language = $current_module_strings['LBL_ACTION_UPDATE_REL']." ".$rel_module; unset($workflow_object); } if($this->action_type=='update'){ $natural_language = $current_module_strings['LBL_ACTION_UPDATE']." ".$current_module_strings['LBL_RECORD']; } */ //begin - rsmith include_once 'include/ListView/ProcessView.php'; $ProcessView = new ProcessView($this->get_workflow_object(), $this); $results = $ProcessView->get_action_shell_display_text($this, false); $result = $results["RESULT_ARRAY"]; $table_html = "<table id='tbl_{$this->id}' style='display:none'>"; foreach ($result as $key => $value) { if (isset($value["ACTION_DISPLAY_TEXT"])) { if ($value["ACTION_DISPLAY_TEXT"] === false) { $table_html .= "<tr><td>"; $table_html .= "<span class='error'>" . translate('LBL_ACTION_ERROR') . "</span>"; $table_html .= "</td></tr>"; if (empty($this->hasError)) { $this->hasError = true; echo '<p class="error"><b>' . translate('LBL_ACTION_ERRORS') . '</b></p>'; } } else { $table_html .= "<tr><td>"; $table_html .= "<li>" . $mod_strings['LBL_SET'] . " " . $value["FIELD_NAME"] . " " . $mod_strings['LBL_AS'] . " " . $value["ACTION_DISPLAY_TEXT"]; $table_html .= "</td></tr>"; } } } $table_html .= "</table>"; //end - rsmith $temp_array = array(); //Grab event $ProcessView->local_strings = $current_module_strings2; //BEGIN WFLOW PLUGINS global $process_dictionary; get_plugin("workflow", "action_createstep1", $this); //END WFLOW PLUGINS $prev_display_text = $ProcessView->get_prev_text("ActionsCreateStep1", $this->action_type); unset($ProcessView); //$natural_language = "<i>".$current_module_strings['LBL_LIST_STATEMENT_CONTENT']."</i>"; $natural_language = "<b>" . $prev_display_text . "</b>"; $temp_array['HREF_EDIT'] = "'javascript:get_popup(\"" . $this->parent_id . "\",\"" . $this->id . "\",\"CreateStep2\",\"\",\"\",\"400\",\"500\")'"; $temp_array['HREF_DELETE'] = "index.php?action=Delete&module=WorkFlowActionShells&record=" . $this->id . ""; $temp_array['TYPE'] = $current_module_strings2['LBL_MODULE_NAME']; $temp_array['STATEMENT'] = "<i>" . $natural_language . "</i>"; $temp_array['DETAILS_TABLE'] = $table_html; //$temp_array['ACTION_DESCRIPTION'] = "<i>".$natural_language."</i>"; $temp_array['ID'] = $this->id; //Component information for either invitees (Meetings & Calls ONLY) if ($this->action_module == "Meetings" || $this->action_module == "Calls" || $this->action_module == "meetings" || $this->action_module == "calls") { $recipient_icon = SugarThemeRegistry::current()->getImage('Users', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE']); $bridge_list = $this->get_linked_beans("action_bridge", "WorkFlow"); if (!empty($bridge_list)) { $alertshell_list = $bridge_list[0]->get_linked_beans("alerts", "WorkFlowAlertShell"); if (!empty($alertshell_list)) { //check for any invitees $invitees_list = $alertshell_list[0]->get_linked_beans('alert_components', 'WorkFlowAlert'); if (empty($invitees_list)) { $invitee_notice = "<font color='red'><b>" . $mod_strings['LBL_INVITEE_NOTICE'] . " " . $app_list_strings['moduleListSingular'][ucfirst($this->action_module)] . " </b></font><BR>"; $temp_array['STATEMENT_NOTICE'] = $invitee_notice; } $temp_array['COMPONENT_HREF_EDIT'] = 'index.php?action=DetailView&module=WorkFlowAlertShells&module_tab=WorkFlow&record=' . $alertshell_list[0]->id . '&workflow_id=' . $alertshell_list[0]->parent_id; $temp_array['COMPONENT_STATEMENT'] = $recipient_icon . $mod_strings['LBL_INVITEES']; } } } //BEGIN WFLOW PLUGINS $list_data_array = get_plugin("workflow", "action_listview", $this); if (!empty($list_data_array['action_processed']) && $list_data_array['action_processed'] == true) { //a custom plugin was found with data foreach ($list_data_array['list_data'] as $list_key => $list_value) { $temp_array[$list_key] = $list_value; //loop through and fill the temp_array } } //END WFLOW PLUGINS return $temp_array; }
$form->assign("ID", $focus->id); $form->assign("WORKFLOW_ID", $_REQUEST['workflow_id']); $form->assign("ACTION_MODULE", $focus->action_module); $form->assign("ACTION_TYPE", $focus->action_type); $form->assign("REL_MODULE", $focus->rel_module); $form->assign("JAVASCRIPT_LANGUAGE_FILES", $javascript_language_files); $form->assign("MODULE_NAME", $currentModule); //$form->assign("FORM", $_REQUEST['form']); $form->assign("GRIDLINE", $gridline); insert_popup_header($theme); $form->parse("embeded"); $form->out("embeded"); //rsmith require_once 'include/ListView/ProcessView.php'; $ProcessView = new ProcessView($seed_object, $focus); $results = $ProcessView->get_action_shell_display_text($focus, true); $result = $results["RESULT_ARRAY"]; $field_count = 0; foreach ($result as $value) { if (isset($value['FIELD_NAME'])) { foreach ($value as $aKey => $aVal) { $form->assign($aKey, $aVal); } $form->parse("main.lang_field"); ++$field_count; } } //rsmith $form->assign("TARGET_MODULE", $results["TEMP_MODULE_DIR"]); $form->assign("TOTAL_FIELD_COUNT", $field_count); //SET Previous Display Text