/** * Frontpage * * @param TBGRequest $request */ public function runIndex(TBGRequest $request) { if (TBGSettings::isSingleProjectTracker()) { if (($projects = TBGProject::getAllRootProjects(false)) && ($project = array_shift($projects))) { $this->forward(TBGContext::getRouting()->generate('project_dashboard', array('project_key' => $project->getKey()))); } } $this->forward403unless($this->getUser()->hasPageAccess('home')); $this->links = TBGContext::getMainLinks(); $this->show_project_list = TBGSettings::isFrontpageProjectListVisible(); $this->show_project_config_link = $this->getUser()->canAccessConfigurationPage(TBGSettings::CONFIGURATION_SECTION_PROJECTS); if ($this->show_project_list || $this->show_project_config_link) { $projects = TBGProject::getAllRootProjects(false); foreach ($projects as $k => $project) { if (!$project->hasAccess()) { unset($projects[$k]); } } $this->projects = $projects; $this->project_count = count($this->projects); } }
disabled<?php } ?> > <option value=1<?php if (TBGSettings::isFrontpageProjectListVisible()) { ?> selected<?php } ?> ><?php echo __('Yes'); ?> </option> <option value=0<?php if (!TBGSettings::isFrontpageProjectListVisible()) { ?> selected<?php } ?> ><?php echo __('No'); ?> </option> </select> </td> </tr> <tr> <td class="config_explanation" colspan="2"><?php echo __('Whether the project overview list should appear on the frontpage or not'); ?>