本文整理汇总了PHP中DetailView::processListNavigation方法的典型用法代码示例。如果您正苦于以下问题:PHP DetailView::processListNavigation方法的具体用法?PHP DetailView::processListNavigation怎么用?PHP DetailView::processListNavigation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DetailView
的用法示例。
在下文中一共展示了DetailView::processListNavigation方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
$xtpl->assign('NAME', $focus->name);
$xtpl->assign('ID', $focus->id);
$xtpl->assign("DESCRIPTION", nl2br($focus->description));
if ($focus->status == 1) {
$status = "Active";
} else {
$status = "Inactive";
}
//UI Parameters
$xtpl->assign('FIRE_ORDER', $app_list_strings['wflow_fire_order_dom'][$focus->fire_order]);
$xtpl->assign('STATUS', $app_list_strings['user_status_dom'][$status]);
$xtpl->assign('TYPE', $app_list_strings['wflow_type_dom'][$focus->type]);
$xtpl->assign('RECORD_TYPE', $app_list_strings['wflow_record_type_dom'][$focus->record_type]);
$xtpl->assign('BASE_MODULE', $app_list_strings['moduleList'][$focus->base_module]);
$detailView->processListNavigation($xtpl, "WORKFLOW", $offset, $focus->is_AuditEnabled());
global $current_user;
// adding custom fields:
require_once 'modules/DynamicFields/templates/Files/DetailView.php';
$buttons = array('<input title="' . $app_strings['LBL_EDIT_BUTTON_TITLE'] . '" accessKey="' . $app_strings['LBL_EDIT_BUTTON_KEY'] . '" class="button" onclick="this.form.return_module.value=\'WorkFlow\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'' . $focus->id . '\'; this.form.action.value=\'EditView\'" type="submit" name="EditWorkFlow" id="EditWorkFlow" value="' . $app_strings['LBL_EDIT_BUTTON_LABEL'] . '"> ', '<input title="' . $app_strings['LBL_DUPLICATE_BUTTON_TITLE'] . '" accessKey="' . $app_strings['LBL_DUPLICATE_BUTTON_KEY'] . '" class="button" onclick="this.form.return_module.value=\'WorkFlow\'; this.form.return_action.value=\'index\'; this.form.isDuplicate.value=true; this.form.action.value=\'EditView\'" type="submit" name="DuplicateWorkFlow" id="DuplicateWorkFlow" value="' . $app_strings['LBL_DUPLICATE_BUTTON_LABEL'] . '">', '<input title="' . $app_strings['LBL_DELETE_BUTTON_TITLE'] . '" accessKey="' . $app_strings['LBL_DELETE_BUTTON_KEY'] . '" class="button" onclick="this.form.return_module.value=\'WorkFlow\'; this.form.return_action.value=\'ListView\'; this.form.action.value=\'Delete\'; return confirm(\'' . $app_strings['NTC_DELETE_CONFIRMATION'] . '\')" type="submit" name="DeleteWorkFlow" id="DeleteWorkFlow" value="' . $app_strings['LBL_DELETE_BUTTON_LABEL'] . '">');
$javascript = new javascript();
require_once 'include/SugarSmarty/plugins/function.sugar_action_menu.php';
$action_buttons = smarty_function_sugar_action_menu(array('id' => 'ACLRoles_EditView_action_menu', 'buttons' => $buttons), $xtpl);
$javascript->addActionMenu();
$xtpl->assign('ACTION_MENU', $action_buttons);
$xtpl->parse("main");
$xtpl->out("main");
//Sub Panels
$sub_xtpl = $xtpl;
$old_contents = ob_get_contents();
ob_end_clean();
示例2: submit
$currency->retrieve($focus->currency_id);
if ($currency->deleted != 1) {
$smarty->assign("CURRENCY", $currency->iso4217 . ' ' . $currency->symbol);
} else {
$smarty->assign("CURRENCY", $currency->getDefaultISO4217() . ' ' . $currency->getDefaultCurrencySymbol());
}
} else {
$smarty->assign("CURRENCY", $currency->getDefaultISO4217() . ' ' . $currency->getDefaultCurrencySymbol());
}
global $current_user;
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
$smarty->assign("ADMIN_EDIT", "<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_EDIT_LAYOUT']) . "</a>");
}
global $xtpl;
$xtpl = $smarty;
$detailView->processListNavigation($xtpl, "CAMPAIGN", $offset, $focus->is_AuditEnabled());
// adding custom fields:
require_once 'modules/DynamicFields/templates/Files/DetailView.php';
//if this is a newsletter, we need to build dropdown
$selected_marketing_id = '';
if (isset($focus->campaign_type)) {
//we need to build the dropdown of related marketing values
$options_str = "<select onchange= \"this.form.module.value='Campaigns';this.form.action.value='TrackDetailView'; submit()\" name='mkt_id'>";
$latest_marketing_id = '';
if (isset($_REQUEST['mkt_id'])) {
$selected_marketing_id = $_REQUEST['mkt_id'];
}
$options_str .= '<option value="all">--None--</option>';
//query for all email marketing records related to this campaign
$latest_marketing_query = "select id, name, date_modified from email_marketing where campaign_id = '{$focus->id}' order by date_modified desc";
//build string with value(s) retrieved
示例3: translate
$sugar_smarty->assign('SHOW_DOWNLOADS_TAB', $enable_download_tab);
///////////////////////////////////////////////////////////////////////////////
//// TO SUPPORT LEGACY XTEMPLATES
$sugar_smarty->assign('FIRST_NAME', $focus->first_name);
$sugar_smarty->assign('LAST_NAME', $focus->last_name);
//// END SUPPORT LEGACY XTEMPLATES
///////////////////////////////////////////////////////////////////////////////
$status = '';
if (!empty($focus->status)) {
// jc:#12261 - while not apparent, replaced the explicit reference to the
// app_strings['user_status_dom'] element with a call to the ultility translate
// function to retrieved the mapped value for User::status
$status = translate('user_status_dom', '', $focus->status);
}
$sugar_smarty->assign("STATUS", $status);
$detailView->processListNavigation($sugar_smarty, "USER", $offset);
$reminder_time = $focus->getPreference('reminder_time');
if (empty($reminder_time)) {
$reminder_time = -1;
}
if ($reminder_time != -1) {
$sugar_smarty->assign("REMINDER_CHECKED", 'checked');
$sugar_smarty->assign("REMINDER_TIME", translate('reminder_time_options', '', $reminder_time));
}
// Display the good usertype
$user_type_label = $mod_strings['LBL_REGULAR_USER'];
$usertype = 'RegularUser';
if ((is_admin($current_user) || $_REQUEST['record'] == $current_user->id || $current_user->isAdminForModule('Users')) && $focus->is_admin == '1') {
$user_type_label = $mod_strings['LBL_ADMIN_USER'];
$usertype = 'Administrator';
}
示例4: SubPanelTiles
$xtpl->assign('clientrequest_due_date', $clientrequest->due_date);
$xtpl->parse('main.ClientRequest');
}
/*$xtpl->assign('fsize_h', $focus->fsize_h);
$xtpl->assign('fsize_w', $focus->fsize_w);*/
//$xtpl->assign('volume', $focus->volume);
$xtpl->assign('samples', $focus->samples);
$xtpl->assign('file', $focus->file);
$xtpl->assign('deadline', $focus->deadline);
$xtpl->assign('date_entered', $focus->date_entered);
$xtpl->assign('date_modified', $focus->date_modified);
$focus->check_component_clientorders();
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
$xtpl->assign('ADMIN_EDIT', '<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>');
}
$detailView->processListNavigation($xtpl, "CLIENTORDERS", $offset);
// adding custom fields
require_once 'modules/DynamicFields/templates/Files/DetailView.php';
$xtpl->parse('main.open_source');
$xtpl->parse('main');
$xtpl->out('main');
$sub_xtpl = $xtpl;
$old_contents = ob_get_contents();
ob_end_clean();
ob_start();
echo $old_contents;
require_once 'include/SubPanel/SubPanelTiles.php';
$subpanel = new SubPanelTiles($focus, 'ClientOrders');
echo $subpanel->display();
require_once 'modules/SavedSearch/SavedSearch.php';
$savedSearch = new SavedSearch();
示例5: Currency
$currency = new Currency();
if (isset($focus->currency_id) && !empty($focus->currency_id)) {
$currency->retrieve($focus->currency_id);
if ($currency->deleted != 1) {
$xtpl->assign("CURRENCY", $currency->iso4217 . ' ' . $currency->symbol);
} else {
$xtpl->assign("CURRENCY", $currency->getDefaultISO4217() . ' ' . $currency->getDefaultCurrencySymbol());
}
} else {
$xtpl->assign("CURRENCY", $currency->getDefaultISO4217() . ' ' . $currency->getDefaultCurrencySymbol());
}
global $current_user;
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
$xtpl->assign("ADMIN_EDIT", "<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>");
}
$detailView->processListNavigation($xtpl, "OPPORTUNITY", $offset, $focus->is_AuditEnabled());
// adding custom fields:
require_once 'modules/DynamicFields/templates/Files/DetailView.php';
$xtpl->parse("main.open_source");
$xtpl->parse("main");
$xtpl->out("main");
$sub_xtpl = $xtpl;
$old_contents = ob_get_contents();
ob_end_clean();
ob_start();
echo $old_contents;
require_once 'include/SubPanel/SubPanelTiles.php';
$subpanel = new SubPanelTiles($focus, 'Opportunities');
echo $subpanel->display();
echo ACLController::addJavascript($focus->module_dir, '', $focus->assigned_user_name == $current_user->user_name);
require_once 'modules/SavedSearch/SavedSearch.php';
示例6: count
$xtpl->assign('active_checked', 'checked="checked"');
}
if (!empty($focus->default) && $focus->default == 'on') {
$xtpl->assign('default_checked', 'checked="checked"');
}
$xtpl->assign('description', nl2br(url2html($focus->description)));
$pricelistrows = $focus->getPaperwastelineRows();
for ($i = 0; $i < count($pricelistrows); $i++) {
$fieldcount = count($pricelistrows[$i]);
$xtpl->assign("PAPERWASTEROWS", $focus->getPaperwastelineRow($pricelistrows[$i], $i, false));
$xtpl->parse("main.row1");
}
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
$xtpl->assign('ADMIN_EDIT', '<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>');
}
$detailView->processListNavigation($xtpl, "PAPERWASTE", $offset);
// adding custom fields
require_once 'modules/DynamicFields/templates/Files/DetailView.php';
$xtpl->parse('main.open_source');
$xtpl->parse('main');
$xtpl->out('main');
$sub_xtpl = $xtpl;
$old_contents = ob_get_contents();
ob_end_clean();
ob_start();
echo $old_contents;
/*
require_once('include/SubPanel/SubPanelTiles.php');
$subpanel = new SubPanelTiles($focus, 'Paperwaste');
echo $subpanel->display();
*/
示例7: XTemplate
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
$GLOBALS['log']->info("Employee detail view");
$xtpl = new XTemplate('modules/Employees/DetailView.html');
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$xtpl->assign("THEME", $theme);
$xtpl->assign("GRIDLINE", $gridline);
$xtpl->assign("IMAGE_PATH", $image_path);
$xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
$xtpl->assign("ID", $focus->id);
$xtpl->assign("FIRST_NAME", $focus->first_name);
$xtpl->assign("LAST_NAME", $focus->last_name);
$detailView->processListNavigation($xtpl, "EMPLOYEE", $offset);
// adding custom fields:
require_once 'modules/DynamicFields/templates/Files/DetailView.php';
if (is_admin($current_user)) {
$employee_status = '<tr>';
$employee_status .= '<td valign="top" class="tabDetailViewDL"><slot>' . $mod_strings['LBL_EMPLOYEE_STATUS'] . '</slot></td>';
$employee_status .= '<td valign="top" class="tabDetailViewDF"><slot>' . (!empty($app_list_strings['employee_status_dom'][$focus->employee_status]) ? $app_list_strings['employee_status_dom'][$focus->employee_status] : '') . '</slot></td>';
$employee_status .= '<td valign="top" class="tabDetailViewDL"><slot> </slot></td>';
$employee_status .= '<td valign="top" class="tabDetailViewDF"><slot> </slot></td>';
$employee_status .= '</tr>';
} else {
$employee_status = '';
}
$xtpl->assign("EMPLOYEE_STATUS", $employee_status);
$buttons = '';
//set the edit button if user is admin or owner of record
示例8: Products
$xtpl->assign("CREATED_BY", $focus->created_by_name);
$product = new Products();
$product->retrieve($focus->product_id);
$xtpl->assign("pnum", $product->pnum);
$xtpl->assign("product_name", $product->name);
$xtpl->assign("product_id", $product->id);
$xtpl->assign("account_name", $product->account_name);
$xtpl->assign("account_id", $product->account_id);
$xtpl->assign("contact_name", $product->contact_name);
$xtpl->assign("contact_id", $product->contact_id);
$xtpl->assign('status', $app_list_strings['product_status'][$focus->get_status($focus->product_id)]);
$xtpl->assign('description', nl2br(url2html($focus->description)));
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
$xtpl->assign('ADMIN_EDIT', '<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>');
}
$detailView->processListNavigation($xtpl, "PRODUCTLOG", $offset);
// adding custom fields
require_once 'modules/DynamicFields/templates/Files/DetailView.php';
$xtpl->parse('main.open_source');
$xtpl->parse('main');
$xtpl->out('main');
$sub_xtpl = $xtpl;
$old_contents = ob_get_contents();
ob_end_clean();
ob_start();
echo $old_contents;
/*
require_once('include/SubPanel/SubPanelTiles.php');
$subpanel = new SubPanelTiles($focus, 'Project');
echo $subpanel->display();
*/
示例9: array
$xtpl->assign("DATE_ENTERED", $focus->date_entered);
global $current_user;
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
$xtpl->assign("ADMIN_EDIT", "<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>");
}
// copy to contacts
if (ACLController::checkAccess('Contacts', 'edit', true)) {
$push_billing = '<input class="button" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . '" type="button" onclick=\'open_popup("Contacts", 600, 600, "&supplier_name=' . $focus->name . '&html=change_address' . '&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('', '', '<br>'), $focus->billing_address_street) . '&primary_address_city=' . $focus->billing_address_city . '&primary_address_state=' . $focus->billing_address_state . '&primary_address_postalcode=' . $focus->billing_address_postalcode . '&primary_address_country=' . $focus->billing_address_country . '", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE'] . '">';
$push_shipping = '<input class="button" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . '" type="button" onclick=\'open_popup("Contacts", 600, 600, "&supplier_name=' . $focus->name . '&html=change_address' . '&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('', '', '<br>'), $focus->shipping_address_street) . '&primary_address_city=' . $focus->shipping_address_city . '&primary_address_state=' . $focus->shipping_address_state . '&primary_address_postalcode=' . $focus->shipping_address_postalcode . '&primary_address_country=' . $focus->shipping_address_country . '", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE'] . '">';
} else {
$push_billing = '';
$push_shipping = '';
}
$xtpl->assign("PUSH_CONTACTS_BILLING", $push_billing);
$xtpl->assign("PUSH_CONTACTS_SHIPPING", $push_shipping);
$detailView->processListNavigation($xtpl, "SUPPLIER", $offset, $focus->is_AuditEnabled());
// adding custom fields:
require_once 'modules/DynamicFields/templates/Files/DetailView.php';
$xtpl->parse("main.open_source");
$xtpl->parse("main");
$xtpl->out("main");
$sub_xtpl = $xtpl;
require_once 'include/SubPanel/SubPanelTiles.php';
$subpanel = new SubPanelTiles($focus, 'Suppliers');
echo $subpanel->display();
require_once 'modules/SavedSearch/SavedSearch.php';
$savedSearch = new SavedSearch();
$json = getJSONobj();
$savedSearchSelects = $json->encode(array($GLOBALS['app_strings']['LBL_SAVED_SEARCH_SHORTCUT'] . '<br>' . $savedSearch->getSelect('Suppliers')));
$str = "<script>\nYAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, {$savedSearchSelects});\n</script>";
echo $str;
示例10: Note
//// JAVASCRIPT VARS
$jsVars = '';
$jsVars .= "var showRaw = '{$mod_strings['LBL_BUTTON_RAW_LABEL']}';";
$jsVars .= "var hideRaw = '{$mod_strings['LBL_BUTTON_RAW_LABEL_HIDE']}';";
$xtpl->assign("JS_VARS", $jsVars);
// ADMIN EDIT
global $current_user;
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
$xtpl->assign("ADMIN_EDIT", "<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>");
}
if (isset($_REQUEST['offset']) && !empty($_REQUEST['offset'])) {
$offset = $_REQUEST['offset'];
} else {
$offset = 1;
}
$detailView->processListNavigation($xtpl, "EMAIL", $offset, false);
// adding custom fields:
require_once 'modules/DynamicFields/templates/Files/DetailView.php';
$do_open = true;
if ($do_open) {
$xtpl->parse("main.open_source");
}
///////////////////////////////////////////////////////////////////////////////
//// NOTES (attachements, etc.)
///////////////////////////////////////////////////////////////////////////////
$note = new Note();
$where = "notes.parent_id='{$focus->id}'";
$notes_list = $note->get_full_list("notes.name", $where, true);
if (!isset($notes_list)) {
$notes_list = array();
}
示例11: Lead
$xtpl->assign("PRIMARY_ADDRESS_POSTALCODE", $focus->primary_address_postalcode);
$xtpl->assign("PRIMARY_ADDRESS_COUNTRY", $focus->primary_address_country);
$xtpl->assign("ALT_ADDRESS_STREET", nl2br($focus->alt_address_street));
if (empty($focus->alt_address_state)) {
$xtpl->assign("ALT_ADDRESS_CITY", $focus->alt_address_city);
} else {
$xtpl->assign("ALT_ADDRESS_CITY", $focus->alt_address_city . ', ');
}
$xtpl->assign("ALT_ADDRESS_STATE", $focus->alt_address_state);
$xtpl->assign("ALT_ADDRESS_POSTALCODE", $focus->alt_address_postalcode);
$xtpl->assign("ALT_ADDRESS_COUNTRY", $focus->alt_address_country);
$xtpl->assign("DESCRIPTION", nl2br(url2html($focus->description)));
$xtpl->assign("DATE_MODIFIED", $focus->date_modified);
$xtpl->assign("DATE_ENTERED", $focus->date_entered);
$xtpl->assign("ACCOUNT_NAME", $focus->account_name);
$detailView->processListNavigation($xtpl, "PROSPECT", $offset);
// adding custom fields:
require_once 'modules/DynamicFields/templates/Files/DetailView.php';
$xtpl->parse("main.open_source");
$preform = "<table width='100%' border='1' cellspacing='0' cellpadding='0'><tr><td><table width='100%'><tr><td>";
$displayPreform = false;
//$tags = $focus->listviewACLHelper();
if (isset($focus->lead_id) && !empty($focus->lead_id)) {
//get lead name
$lead = new Lead();
$lead->retrieve($focus->lead_id);
//$tag = $tags['LEAD'];
$displayPreform = true;
$preform .= $mod_strings["LBL_CONVERTED_LEAD"] . " <a href='index.php?module=Leads&action=DetailView&record=" . $focus->lead_id . "'>" . $lead->name . "</a>";
}
$preform .= "</td></tr></table></td></tr></table>";
示例12:
$xtpl->assign("STATUS", $app_list_strings['document_status_dom'][$focus->status_id]);
$xtpl->assign("DESCRIPTION", from_html($focus->description));
$xtpl->assign("FILE_URL", $focus->file_url);
$xtpl->assign("ACTIVE_DATE", $focus->active_date);
$xtpl->assign("EXP_DATE", $focus->exp_date);
$xtpl->assign("FILE_NAME", $focus->filename);
$xtpl->assign("SAVE_FILE", $save_file);
$xtpl->assign("FILE_URL_NOIMAGE", $focus->file_url_noimage);
$xtpl->assign("LAST_REV_CREATOR", $focus->last_rev_created_name);
if (isset($focus->last_rev_create_date)) {
$xtpl->assign("LAST_REV_DATE", $focus->last_rev_create_date);
} else {
$xtpl->assign("LAST_REV_DATE", "");
}
$xtpl->assign("DOCUMENT_REVISION_ID", $focus->document_revision_id);
$detailView->processListNavigation($xtpl, "DOCUMENT", $offset);
$xtpl->parse("main.open_source");
if (!empty($focus->related_doc_id)) {
$xtpl->assign("RELATED_DOCUMENT_NAME", Document::get_document_name($focus->related_doc_id));
}
if (!empty($focus->related_doc_rev_id)) {
$xtpl->assign("RELATED_DOC_REV_ID", $focus->related_doc_rev_id);
$xtpl->assign("RELATED_DOCUMENT_VERSION", DocumentRevision::get_document_revision_name($focus->related_doc_rev_id));
}
if (!empty($focus->is_template) && $focus->is_template == 1) {
$xtpl->assign("IS_TEMPLATE_CHECKED", "checked");
}
if (!empty($focus->template_type)) {
$xtpl->assign("TEMPLATE_TYPE", $app_list_strings['document_template_type_dom'][$focus->template_type]);
}
// adding custom fields:
示例13: getClassicModuleTitle
global $app_strings;
global $app_list_strings;
global $current_user;
$focus = BeanFactory::getBean('Holidays');
$detailView = new DetailView();
$offset = 0;
if (isset($_REQUEST['offset']) or isset($_REQUEST['record'])) {
$result = $detailView->processSugarBean("HOLIDAY", $focus, $offset);
if ($result == null) {
sugar_die($app_strings['ERROR_NO_RECORD']);
}
$focus = $result;
} else {
header("Location: index.php?module=Accounts&action=index");
}
echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME']), true);
$GLOBALS['log']->info("Holiday detail view");
$xtpl = new XTemplate('modules/Holidays/DetailView.html');
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$xtpl->assign("GRIDLINE", $gridline);
$xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
$xtpl->assign("ID", $focus->id);
$xtpl->assign("RETURN_MODULE", "Holidays");
$xtpl->assign("RETURN_ACTION", "DetailView");
$xtpl->assign("ACTION", "EditView");
$xtpl->assign("NAME", $focus->holiday_date);
$xtpl->assign("DESCRIPTION", nl2br(url2html($focus->description)));
$detailView->processListNavigation($xtpl, "HOLIDAY", $offset);
$xtpl->parse("main");
$xtpl->out("main");