本文整理汇总了PHP中return_module_language函数的典型用法代码示例。如果您正苦于以下问题:PHP return_module_language函数的具体用法?PHP return_module_language怎么用?PHP return_module_language使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了return_module_language函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
global $beanList, $beanFiles;
include 'include/modules.php';
//Reload langauge strings
$GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
$GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
$GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], 'Accounts');
//Create an anonymous user for login purposes/
$this->_user = new User();
$this->_user->retrieve('1');
$GLOBALS['current_user'] = $this->_user;
self::$helperObject = new APIv3Helper();
if (file_exists(sugar_cached('modules/unified_search_modules.php'))) {
$this->unified_search_modules_content = file_get_contents(sugar_cached('modules/unified_search_modules.php'));
unlink(sugar_cached('modules/unified_search_modules.php'));
}
require_once 'modules/Home/UnifiedSearchAdvanced.php';
$unifiedSearchAdvanced = new UnifiedSearchAdvanced();
$_REQUEST['enabled_modules'] = 'Accounts,Contacts,Opportunities';
$unifiedSearchAdvanced->saveGlobalSearchSettings();
$GLOBALS['db']->query("DELETE FROM accounts WHERE name like 'UNIT TEST%' ");
$GLOBALS['db']->query("DELETE FROM opportunities WHERE name like 'UNIT TEST%' ");
$GLOBALS['db']->query("DELETE FROM contacts WHERE first_name like 'UNIT TEST%' ");
$GLOBALS['db']->query("DELETE FROM calls WHERE name like 'UNIT TEST%' ");
$GLOBALS['db']->query("DELETE FROM tasks WHERE name like 'UNIT TEST%' ");
$GLOBALS['db']->query("DELETE FROM meetings WHERE name like 'UNIT TEST%' ");
//$this->useOutputBuffering = false;
}
示例2: show_error_import
function show_error_import($message)
{
global $current_language;
$import_mod_strings = return_module_language($current_language, "Import");
global $theme;
global $log;
global $mod_strings;
global $app_strings;
global $current_user;
include 'themes/' . $theme . '/header.php';
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$log->info("Upload Error");
$smarty = new CRMSmarty();
$smarty->assign("MOD", $import_mod_strings);
$smarty->assign("APP", $app_strings);
if (isset($_REQUEST['return_module'])) {
$smarty->assign("RETURN_MODULE", $_REQUEST['return_module']);
}
if (isset($_REQUEST['return_action'])) {
$smarty->assign("RETURN_ACTION", $_REQUEST['return_action']);
}
$smarty->assign("THEME", $theme);
$category = getParenttab();
$smarty->assign("CATEGORY", $category);
$smarty->assign("IMAGE_PATH", $image_path);
//$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
$smarty->assign("MODULE", "SalesOrder");
$smarty->assign("MESSAGE", $message);
$smarty->display('SalesOrder/Importerror.tpl');
}
示例3: additionalDetailsProjectTask
function additionalDetailsProjectTask($fields)
{
static $mod_strings;
if (empty($mod_strings)) {
global $current_language;
$mod_strings = return_module_language($current_language, 'ProjectTask');
}
$overlib_string = '';
if (!empty($fields['PRIORITY'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_PRIORITY'] . '</b> ' . $fields['PRIORITY'] . '<br>';
}
if (!empty($fields['PERCENT_COMPLETE'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_PERCENT_COMPLETE'] . '</b> ' . $fields['PERCENT_COMPLETE'] . '%<br>';
}
if (!empty($fields['ESTIMATED_EFFORT'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_ESTIMATED_EFFORT'] . '</b> ' . $fields['ESTIMATED_EFFORT'] . '<br>';
}
if (!empty($fields['ACTUAL_EFFORT'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_ACTUAL_EFFORT'] . '</b> ' . $fields['ACTUAL_EFFORT'] . '<br>';
}
if (!empty($fields['TASK_NUMBER'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_TASK_NUMBER'] . '</b> ' . $fields['TASK_NUMBER'] . '<br>';
}
if (!empty($fields['DATE_START'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_DATE_START'] . '</b> ' . $fields['DATE_START'] . ' ' . $fields['TIME_START'] . '<br>';
}
if (!empty($fields['DESCRIPTION'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
if (strlen($fields['DESCRIPTION']) > 300) {
$overlib_string .= '...';
}
}
return array('fieldToAddTo' => 'NAME', 'string' => $overlib_string, 'editLink' => "index.php?action=EditView&module=ProjectTask&return_module=ProjectTask&record={$fields['ID']}", 'viewLink' => "index.php?action=DetailView&module=ProjectTask&return_module=ProjectTask&record={$fields['ID']}");
}
示例4: additionalDetailsContact
function additionalDetailsContact($fields)
{
static $mod_strings;
if (empty($mod_strings)) {
global $current_language;
$mod_strings = return_module_language($current_language, 'Contacts');
}
$overlib_string = '';
if (!empty($fields['ID'])) {
$overlib_string .= '<input type="hidden" value="' . $fields['ID'];
$overlib_string .= '">';
}
$overlib_string .= '<h2><img src="index.php?entryPoint=getImage&themeName=' . SugarThemeRegistry::current()->name . '&imageName=Contacts.gif"/> ' . $mod_strings['LBL_CONTACT'] . '</h2>';
if (!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) || !empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) || !empty($fields['PRIMARY_ADDRESS_COUNTRY'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>';
}
if (!empty($fields['PRIMARY_ADDRESS_STREET'])) {
$overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>';
}
if (!empty($fields['PRIMARY_ADDRESS_STREET_2'])) {
$overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'] . '<br>';
}
if (!empty($fields['PRIMARY_ADDRESS_STREET_3'])) {
$overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'] . '<br>';
}
if (!empty($fields['PRIMARY_ADDRESS_CITY'])) {
$overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', ';
}
if (!empty($fields['PRIMARY_ADDRESS_STATE'])) {
$overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' ';
}
if (!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) {
$overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' ';
}
if (!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) {
$overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>';
}
if (strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) {
$overlib_string .= '<br>';
}
if (!empty($fields['PHONE_MOBILE'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>';
}
if (!empty($fields['PHONE_HOME'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>';
}
if (!empty($fields['PHONE_OTHER'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>';
}
if (!empty($fields['DATE_MODIFIED'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_DATE_MODIFIED'] . '</b> ' . $fields['DATE_MODIFIED'] . '<br>';
}
if (!empty($fields['DESCRIPTION'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
if (strlen($fields['DESCRIPTION']) > 300) {
$overlib_string .= '...';
}
}
return array('fieldToAddTo' => 'NAME', 'string' => $overlib_string, 'editLink' => "index.php?action=EditView&module=Contacts&return_module=Contacts&record={$fields['ID']}", 'viewLink' => "index.php?action=DetailView&module=Contacts&return_module=Contacts&record={$fields['ID']}");
}
示例5: displayScript
function displayScript()
{
global $current_language;
$mod_strings = return_module_language($current_language, 'Emails');
$script = <<<EOQ
<script>
function quick_create_overlib(id, theme) {
return overlib('<a style=\\'width: 150px\\' class=\\'menuItem\\' onmouseover=\\'hiliteItem(this,"yes");\\' onmouseout=\\'unhiliteItem(this);\\' href=\\'index.php?module=Cases&action=EditView&inbound_email_id=' + id + '\\'>' +
"<img border='0' src='themes/" + theme + "/images/Cases.gif' style='margin-right:5px'>" + '{$mod_strings['LBL_LIST_CASE']}' + '</a>' +
"<a style='width: 150px' class='menuItem' onmouseover='hiliteItem(this,\\"yes\\");' onmouseout='unhiliteItem(this);' href='index.php?module=Leads&action=EditView&inbound_email_id=" + id + "'>" +
"<img border='0' src='themes/" + theme + "/images/Leads.gif' style='margin-right:5px'>"
+ '{$mod_strings['LBL_LIST_LEAD']}' + "</a>" +
"<a style='width: 150px' class='menuItem' onmouseover='hiliteItem(this,\\"yes\\");' onmouseout='unhiliteItem(this);' href='index.php?module=Contacts&action=EditView&inbound_email_id=" + id + "'>" +
"<img border='0' src='themes/" + theme + "/images/Contacts.gif' style='margin-right:5px'>"
+ '{$mod_strings['LBL_LIST_CONTACT']}' + "</a>" +
"<a style='width: 150px' class='menuItem' onmouseover='hiliteItem(this,\\"yes\\");' onmouseout='unhiliteItem(this);' href='index.php?module=Bugs&action=EditView&inbound_email_id=" + id + "'>"+
"<img border='0' src='themes/" + theme + "/images/Bugs.gif' style='margin-right:5px'>"
+ '{$mod_strings['LBL_LIST_BUG']}' + "</a>" +
"<a style='width: 150px' class='menuItem' onmouseover='hiliteItem(this,\\"yes\\");' onmouseout='unhiliteItem(this);' href='index.php?module=Tasks&action=EditView&inbound_email_id=" + id + "'>" +
"<img border='0' src='themes/" + theme + "/images/Tasks.gif' style='margin-right:5px'>"
+ '{$mod_strings['LBL_LIST_TASK']}' + "</a>"
, CAPTION, '{$mod_strings['LBL_QUICK_CREATE']}'
, STICKY, MOUSEOFF, 3000, CLOSETEXT, '<img border=0 src="themes/' + theme + '/images/close_inline.gif">', WIDTH, 150, CLOSETITLE, SUGAR.language.get('app_strings', 'LBL_ADDITIONAL_DETAILS_CLOSE_TITLE'), CLOSECLICK, FGCLASS, 'olOptionsFgClass',
CGCLASS, 'olOptionsCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olOptionsCapFontClass', CLOSEFONTCLASS, 'olOptionsCloseFontClass');
}
</script>
EOQ;
return $script;
}
示例6: displayOptions
public function displayOptions()
{
ob_start();
global $current_language, $app_list_strings;
$mod_strings = return_module_language($current_language, 'AOR_Reports');
$optionsSmarty = new Sugar_Smarty();
$optionsSmarty->assign('MOD', $mod_strings);
$optionsSmarty->assign('id', $this->id);
$optionsSmarty->assign('dashletTitle', $this->title);
$optionsSmarty->assign('aor_report_id', $this->report->id);
$optionsSmarty->assign('aor_report_name', $this->report->name);
$optionsSmarty->assign('onlyCharts', $this->onlyCharts);
$charts = array();
if (!empty($this->report->id)) {
foreach ($this->report->get_linked_beans('aor_charts', 'AOR_Charts') as $chart) {
$charts[$chart->id] = $chart->name;
}
}
$conditions = getConditionsAsParameters($this->report, $this->params);
$optionsSmarty->assign('parameters', $conditions);
$chartOptions = get_select_options_with_id($charts, $this->charts);
$optionsSmarty->assign('chartOptions', $chartOptions);
$optionsTemplate = get_custom_file_if_exists('modules/AOR_Reports/Dashlets/AORReportsDashlet/dashletConfigure.tpl');
ob_clean();
return $optionsSmarty->fetch($optionsTemplate);
}
示例7: additionalDetailsCall
function additionalDetailsCall($fields)
{
static $mod_strings;
if (empty($mod_strings)) {
global $current_language;
$mod_strings = return_module_language($current_language, 'Calls');
}
$overlib_string = '';
if (!empty($fields['DATE_START']) && !empty($fields['TIME_START'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_DATE_TIME'] . '</b> ' . $fields['DATE_START'] . ' ' . $fields['TIME_START'] . '<br>';
}
if (isset($fields['DURATION_HOURS']) && isset($fields['DURATION_MINUTES'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_DURATION'] . '</b> ' . $fields['DURATION_HOURS'] . $mod_strings['LBL_HOURS_ABBREV'] . ' ' . $fields['DURATION_MINUTES'] . $mod_strings['LBL_MINSS_ABBREV'] . '<br>';
}
if (!empty($fields['DESCRIPTION'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
if (strlen($fields['DESCRIPTION']) > 300) {
$overlib_string .= '...';
}
$overlib_string .= '<br>';
}
$editLink = "index.php?action=EditView&module=Calls&record={$fields['ID']}";
$viewLink = "index.php?action=DetailView&module=Calls&record={$fields['ID']}";
$return_module = empty($_REQUEST['module']) ? 'Calls' : $_REQUEST['module'];
$return_action = empty($_REQUEST['action']) ? 'ListView' : $_REQUEST['action'];
$editLink .= "&return_module={$return_module}&return_action={$return_action}";
$viewLink .= "&return_module={$return_module}&return_action={$return_action}";
return array('fieldToAddTo' => 'NAME', 'string' => $overlib_string, 'editLink' => $editLink, 'viewLink' => $viewLink);
}
示例8: additionalDetailsCampaign
function additionalDetailsCampaign($fields)
{
static $mod_strings;
if (empty($mod_strings)) {
global $current_language;
$mod_strings = return_module_language($current_language, 'Campaigns');
}
$overlib_string = '';
if (!empty($fields['START_DATE'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_CAMPAIGN_START_DATE'] . '</b> ' . $fields['START_DATE'] . '<br>';
}
if (!empty($fields['TRACKER_TEXT'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_TRACKER_TEXT'] . '</b> ' . $fields['TRACKER_TEXT'] . '<br>';
}
if (!empty($fields['REFER_URL'])) {
$overlib_string .= '<a target=_blank href=' . $fields['REFER_URL'] . '>' . $fields['REFER_URL'] . '</a><br>';
}
if (!empty($fields['OBJECTIVE'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_CAMPAIGN_OBJECTIVE'] . '</b> ' . substr($fields['OBJECTIVE'], 0, 300);
if (strlen($fields['OBJECTIVE']) > 300) {
$overlib_string .= '...';
}
$overlib_string .= '<br>';
}
if (!empty($fields['CONTENT'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_CAMPAIGN_CONTENT'] . '</b> ' . substr($fields['CONTENT'], 0, 300);
if (strlen($fields['CONTENT']) > 300) {
$overlib_string .= '...';
}
}
return array('fieldToAddTo' => 'NAME', 'string' => $overlib_string, 'editLink' => "index.php?action=EditView&module=Campaigns&return_module=Campaigns&record={$fields['ID']}", 'viewLink' => "index.php?action=DetailView&module=Campaigns&return_module=Campaigns&record={$fields['ID']}");
}
示例9: process
function process()
{
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
$mod_strings = return_module_language($current_language, 'ProjectTask');
parent::process();
if ($this->viaAJAX) {
// override for ajax call
$this->ss->assign('saveOnclick', "onclick='if(check_form(\"projectTaskQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"projecttask\"); else return false;'");
$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_projecttask\")';");
}
$this->ss->assign('viaAJAX', $this->viaAJAX);
$this->javascript = new javascript();
$this->javascript->setFormName('projectTaskQuickCreate');
$focus = new ProjectTask();
$this->javascript->setSugarBean($focus);
$this->javascript->addAllFields('');
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
$this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['project_task_status_options'], $focus->status));
$json = getJSONobj();
///////////////////////////////////////
///
/// SETUP PARENT POPUP
$popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'projectTypeQuickCreate', 'field_to_name_array' => array('id' => 'parent_id', 'name' => 'parent_name'));
$encoded_parent_popup_request_data = $json->encode($popup_request_data);
$this->ss->assign('encoded_parent_popup_request_data', $encoded_parent_popup_request_data);
$popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'projectTaskQuickCreate', 'field_to_name_array' => array('id' => 'account_id', 'name' => 'account_name'));
$encoded_popup_request_data = $json->encode($popup_request_data);
$this->ss->assign('encoded_popup_request_data', $encoded_popup_request_data);
}
示例10: additionalDetailsTask
function additionalDetailsTask($fields)
{
static $mod_strings;
if (empty($mod_strings)) {
global $current_language;
$mod_strings = return_module_language($current_language, 'Tasks');
}
$overlib_string = '';
if (!empty($fields['DATE_START'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_START_DATE_AND_TIME'] . '</b> ' . $fields['DATE_START'] . '<br>';
}
if (!empty($fields['DATE_DUE'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_DUE_DATE_AND_TIME'] . '</b> ' . $fields['DATE_DUE'] . '<br>';
}
if (!empty($fields['PRIORITY'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_PRIORITY'] . '</b> ' . $fields['PRIORITY'] . '<br>';
}
if (!empty($fields['STATUS'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_STATUS'] . '</b> ' . $fields['STATUS'] . '<br>';
}
if (!empty($fields['DESCRIPTION'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
if (strlen($fields['DESCRIPTION']) > 300) {
$overlib_string .= '...';
}
}
$editLink = "index.php?action=EditView&module=Tasks&record={$fields['ID']}";
$viewLink = "index.php?action=DetailView&module=Tasks&record={$fields['ID']}";
return array('fieldToAddTo' => 'NAME', 'string' => $overlib_string, 'editLink' => $editLink, 'viewLink' => $viewLink);
}
示例11: vtDisplayWorkflowList
function vtDisplayWorkflowList($adb, $request, $requestUrl, $app_strings, $current_language)
{
global $theme;
$image_path = "themes/{$theme}/images/";
$module = new VTWorkflowApplication("workflowlist");
$util = new VTWorkflowUtils();
$mod = return_module_language($current_language, $module->name);
if (!$util->checkAdminAccess()) {
$errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']);
$util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']);
return;
}
$smarty = new vtigerCRM_Smarty();
$wfs = new VTWorkflowManager($adb);
$smarty->assign("moduleNames", $util->vtGetModules($adb));
$smarty->assign("returnUrl", $requestUrl);
$listModule = $request['list_module'];
$smarty->assign("listModule", $listModule);
if ($listModule == null || strtolower($listModule) == "all") {
$smarty->assign("workflows", $wfs->getWorkflows());
} else {
$smarty->assign("workflows", $wfs->getWorkflowsForModule($listModule));
}
$smarty->assign("MOD", array_merge(return_module_language($current_language, 'Settings'), return_module_language($current_language, $module->name)));
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("MODULE_NAME", $module->label);
$smarty->assign("PAGE_NAME", $mod['LBL_WORKFLOW_LIST']);
$smarty->assign("PAGE_TITLE", $mod['LBL_AVAILABLE_WORKLIST_LIST']);
$smarty->assign("module", $module);
$smarty->assign('MODULE', $module->name);
$smarty->assign("CRON_TASK", Vtiger_Cron::getInstance('Workflow'));
$smarty->display("{$module->name}/ListWorkflows.tpl");
}
示例12: setUp
public function setUp()
{
$this->markTestIncomplete("Disabling after discussing with Eddy. Eddy will take a look at why this is breaking Stack 66 build");
//create user
$this->user = SugarTestUserUtilities::createAnonymousUser();
$this->user->default_team_name = 'global';
$this->user->is_admin = 1;
$this->user->save();
$this->user->retrieve($this->user->id);
$GLOBALS['current_user'] = $this->user;
//set some global values that will help with the view
$_REQUEST['action'] = $GLOBALS['action'] = 'DetailView';
$_REQUEST['module'] = $GLOBALS['module'] = 'Opportunities';
$GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
$GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], "Opportunities");
//create opportunity
$name = 'Test_51980_' . time();
$this->opp = new Opportunity();
$this->opp->name = $name;
$this->opp->amount = '1000000';
$this->opp->account_id = '1';
$this->opp->team_id = '1';
$this->opp->currency_id = -99;
$this->opp->save();
}
示例13: fill_in_additional_detail_fields
function fill_in_additional_detail_fields()
{
global $current_language;
$mod_strings = return_module_language($current_language, "ZuckerListingTemplate");
$this->module_desc = $this->module_name;
$this->order_desc = $this->get_summary_text();
}
示例14: fill_in_additional_detail_fields
function fill_in_additional_detail_fields()
{
global $theme;
global $current_language;
global $timedate;
global $app_list_strings;
$this->uploadfile = $this->filename;
$mod_strings = return_module_language($current_language, $this->object_name);
global $img_name;
global $img_name_bare;
if (!$this->file_ext) {
$img_name = SugarThemeRegistry::current()->getImageURL(strtolower($this->file_ext) . "_image_inline.gif");
$img_name_bare = strtolower($this->file_ext) . "_image_inline";
}
//set default file name.
if (!empty($img_name) && file_exists($img_name)) {
$img_name = $img_name_bare;
} else {
$img_name = "def_image_inline";
//todo change the default image.
}
$this->file_url_noimage = basename(UploadFile::get_url($this->filename, $this->id));
if (!empty($this->status_id)) {
$this->status = $app_list_strings['document_status_dom'][$this->status_id];
}
}
示例15: additionalDetailsTask
function additionalDetailsTask($fields)
{
static $mod_strings;
global $app_list_strings;
if (empty($mod_strings)) {
global $current_language;
$mod_strings = return_module_language($current_language, 'Tasks');
}
$overlib_string = '';
if (!empty($fields['DATE_START'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_START_DATE_AND_TIME'] . '</b> ' . $fields['DATE_START'] . '<br>';
}
if (!empty($fields['PRIORITY'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_PRIORITY'] . '</b> ' . $app_list_strings['task_priority_dom'][$fields['PRIORITY']] . '<br>';
}
if (!empty($fields['STATUS'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_STATUS'] . '</b> ' . $app_list_strings['task_status_dom'][$fields['STATUS']] . '<br>';
}
if (!empty($fields['DESCRIPTION'])) {
$overlib_string .= '<b>' . $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
if (strlen($fields['DESCRIPTION']) > 300) {
$overlib_string .= '...';
}
}
$editLink = "index.php?action=EditView&module=Tasks&record={$fields['ID']}";
$viewLink = "index.php?action=DetailView&module=Tasks&record={$fields['ID']}";
$return_module = empty($_REQUEST['module']) ? 'Tasks' : $_REQUEST['module'];
$return_action = empty($_REQUEST['action']) ? 'ListView' : $_REQUEST['action'];
$editLink .= "&return_module={$return_module}&return_action={$return_action}";
$viewLink .= "&return_module={$return_module}&return_action={$return_action}";
return array('fieldToAddTo' => 'NAME', 'string' => $overlib_string, 'editLink' => $editLink, 'viewLink' => $viewLink);
}