function displayList(&$layout_def)
 {
     $module = '';
     $record = '';
     if (isset($layout_def['varname'])) {
         $key = strtoupper($layout_def['varname']);
     } else {
         $key = $this->_get_column_alias($layout_def);
         $key = strtoupper($key);
     }
     if (empty($layout_def['fields'][$key])) {
         return "";
     } else {
         $value = $layout_def['fields'][$key];
     }
     if (empty($layout_def['target_record_key'])) {
         $record = $layout_def['fields']['ID'];
     } else {
         $record_key = strtoupper($layout_def['target_record_key']);
         $record = $layout_def['fields'][$record_key];
     }
     if (!empty($layout_def['target_module_key'])) {
         if (!empty($layout_def['fields'][strtoupper($layout_def['target_module_key'])])) {
             $module = $layout_def['fields'][strtoupper($layout_def['target_module_key'])];
         }
     }
     if (empty($module)) {
         if (empty($layout_def['target_module'])) {
             $module = $layout_def['module'];
         } else {
             $module = $layout_def['target_module'];
         }
     }
     $action = 'DetailView';
     $value = $layout_def['fields'][$key];
     global $current_user;
     if (isset($layout_def['custom']) && $layout_def['custom'] == true && $key == "BEAN_NAME") {
         $productlog = new ProductLog();
         $productlog->retrieve($layout_def['fields']['ID']);
         $module = $productlog->bean_name;
         if ($productlog->bean_name == 'Quote') {
             $module = 'Quotes';
         }
         $record = $layout_def['fields']['BEAN_ID'];
         return '<a href="index.php?module=' . $module . '&action=' . $action . '&record=' . $record . '" class="listViewTdLinkS1">' . "{$value}</a>";
     } elseif ($layout_def['DetailView'] && !$layout_def['owner_module'] || $layout_def['DetailView'] && !ACLController::moduleSupportsACL($layout_def['owner_module']) || ACLController::checkAccess($layout_def['owner_module'], 'view', $layout_def['owner_id'] == $current_user->id)) {
         return '<a href="index.php?module=' . $module . '&action=' . $action . '&record=' . $record . '" class="listViewTdLinkS1">' . "{$value}</a>";
     } else {
         return $value;
     }
 }
 * requirements.
 *
 * The Original Code is: SugarCRM Open Source
 * The Initial Developer of the Original Code is SugarCRM, Inc.
 * Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
 * All Rights Reserved.
 * Contributor(s): ______________________________________.
 */
require_once 'modules/ProductLogs/ProductLog.php';
$sugarbean = new ProductLog();
// perform the delete if given a record to delete
if (empty($_REQUEST['record'])) {
    $GLOBALS['log']->info('delete called without a record id specified');
} else {
    $record = $_REQUEST['record'];
    $sugarbean->retrieve($record);
    if (!$sugarbean->ACLAccess('Delete')) {
        ACLController::displayNoAccess(true);
        sugar_cleanup(true);
    }
    $GLOBALS['log']->info("deleting record: {$record}");
    $sugarbean->mark_deleted($record);
}
// handle the return location variables
$return_module = empty($_REQUEST['return_module']) ? 'Project' : $_REQUEST['return_module'];
$return_action = empty($_REQUEST['return_action']) ? 'index' : $_REQUEST['return_action'];
$return_id = empty($_REQUEST['return_id']) ? '' : $_REQUEST['return_id'];
$return_location = "index.php?module={$return_module}&action={$return_action}";
// append the return_id if given
if (!empty($return_id)) {
    $return_location .= "&record={$return_id}";
 * Contributor(s): ______________________________________.
 */
require_once 'XTemplate/xtpl.php';
require_once 'data/Tracker.php';
require_once 'modules/ProductLogs/ProductLog.php';
require_once 'include/time.php';
require_once 'modules/ProductLogs/Forms.php';
global $timedate;
global $app_strings;
global $app_list_strings;
global $current_language;
global $current_user;
global $sugar_version, $sugar_config;
$focus = new ProductLog();
if (!empty($_REQUEST['record'])) {
    $focus->retrieve($_REQUEST['record']);
}
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'] . ": " . $focus->name, true);
echo "\n</p>\n";
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
$GLOBALS['log']->info("ProductLogs detail view");
$xtpl = new XTemplate('modules/ProductLogs/EditView.html');
/// Users Popup
$json = getJSONobj();
$popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'EditView', 'field_to_name_array' => array('id' => 'assigned_user_id', 'user_name' => 'assigned_user_name'));
$xtpl->assign('encoded_users_popup_request_data', $json->encode($popup_request_data));
///