retrieve($_REQUEST['record']); if($result == null) { sugar_die($app_strings['ERROR_NO_RECORD']); } $is_edit=true; } if(isset($_REQUEST['edit']) && $_REQUEST['edit']=='true') { $is_edit=true; //Only allow admins to enter this screen if (!is_admin($current_user)&& !is_admin_for_module($GLOBALS['current_user'],'Bugs')) { $GLOBALS['log']->error("Non-admin user ($current_user->user_name) attempted to enter the Releases edit screen"); session_destroy(); include('modules/Users/Logout.php'); } } $GLOBALS['log']->info("Release list view"); global $theme; $button = "
\n"; $button .= "\n"; $button .= "\n"; $button .= "\n"; $button .= "\n"; $button .= "\n"; $button .= "\n"; $button .= "
\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 = " ".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'").""; } $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 ="
\n"; $edit_button .="\n"; $edit_button .="\n"; $edit_button .="\n"; $edit_button .="\n"; $edit_button .="\n"; $edit_button .="\n"; $edit_button .="\n"; $edit_button .="\n"; $edit_button .=''; $edit_button .=' '; if((is_admin($current_user) || is_admin_for_module($GLOBALS['current_user'],'Bugs')) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){ $header_text = " ".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'").""; } echo get_form_header($mod_strings['LBL_RELEASE']." ".$focus->name . ' ' . $header_text,$edit_button , false); $GLOBALS['log']->info("Releases edit view"); $xtpl=new XTemplate ('modules/Releases/EditView.html'); $xtpl->assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); if (isset($_REQUEST['return_module'])) $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); if (isset($_REQUEST['return_action'])) $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']); if (isset($_REQUEST['return_id'])) $xtpl->assign("RETURN_ID", $_REQUEST['return_id']); $xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']); $xtpl->assign("JAVASCRIPT", get_set_focus_js()); $xtpl->assign("ID", $focus->id); $xtpl->assign('NAME', $focus->name); $xtpl->assign('STATUS', $focus->status); if (empty($focus->list_order)) $xtpl->assign('LIST_ORDER', count($focus->get_releases(FALSE, 'All'))+1); else $xtpl->assign('LIST_ORDER', $focus->list_order); $xtpl->assign('STATUS_OPTIONS', get_select_options_with_id($app_list_strings['release_status_dom'], $focus->status)); // adding custom fields: require_once('modules/DynamicFields/templates/Files/EditView.php'); $xtpl->parse("main"); $xtpl->out("main"); $javascript = new javascript(); $javascript->setFormName('EditView'); $javascript->setSugarBean($focus); $javascript->addAllFields(''); echo $javascript->getScript(); } ?>