/** * Construct ProjectExporterOutputBilder * * @param Project $project * @param Smarty $smarty */ function __construct(&$project, &$smarty, $module_name, $export_modules = null) { $this->active_project = $project; $this->smarty = $smarty; if ($module_name) { $this->smarty->assign('url_prefix', '../'); } else { $this->smarty->assign('url_prefix', './'); } $this->module_name = $module_name; $this->main_output_folder = PROJECT_EXPORT_PATH . '/project_' . $this->active_project->getId(); $this->setExportableModules($export_modules); $this->smarty->assign(array("active_project" => $project, 'project_group' => $this->active_project->getGroup(), 'project_company' => $this->active_project->getCompany(), 'project_leader' => $this->active_project->getLeader(), 'active_module' => $module_name ? $module_name : 'system', 'exporting_milestones' => in_array('milestones', $export_modules))); $this->html_footer = $this->get_footer(); $this->html_header = $this->get_header(); $this->html_sidebar = $this->get_sidebar(); require_once PROJECT_EXPORTER_MODULE_PATH . '/models/ProjectExporterExecutionLog.class.php'; $this->execution_log = new ProjectExporterExecutionLog(); }
/** * Display project info * */ function index() { $this->addBreadcrumb(lang('Overview')); $this->smarty->assign(array("page_back_url" => assemble_url('mobile_access_projects'), "project_leader" => $this->active_project->getLeader(), "project_group" => $this->active_project->getGroup(), "project_company" => $this->active_project->getCompany(), "late_and_today" => ProjectObjects::findLateAndToday($this->logged_user, $this->active_project, get_day_project_object_types()), "recent_activities" => ActivityLogs::findProjectActivitiesByUser($this->active_project, $this->logged_user, 15), 'upcoming_objects' => ProjectObjects::findUpcoming($this->logged_user, $this->active_project, get_day_project_object_types()))); }