示例#1
0
 disabled<?php 
}
?>
>
                <option value=1<?php 
if (\thebuggenie\core\framework\Settings::isFrontpageProjectListVisible()) {
    ?>
 selected<?php 
}
?>
><?php 
echo __('Yes');
?>
</option>
                <option value=0<?php 
if (!\thebuggenie\core\framework\Settings::isFrontpageProjectListVisible()) {
    ?>
 selected<?php 
}
?>
><?php 
echo __('No');
?>
</option>
            </select>
            <?php 
echo config_explanation(__('Whether the project overview list should appear on the frontpage or not'));
?>
        </td>
    </tr>
    <tr>
示例#2
0
 /**
  * Frontpage
  *
  * @param \thebuggenie\core\framework\Request $request
  */
 public function runIndex(framework\Request $request)
 {
     if (framework\Settings::isSingleProjectTracker()) {
         if (($projects = entities\Project::getAllRootProjects(false)) && ($project = array_shift($projects))) {
             $this->forward(framework\Context::getRouting()->generate('project_dashboard', array('project_key' => $project->getKey())));
         }
     }
     $this->forward403unless($this->getUser()->hasPageAccess('home'));
     $this->links = tables\Links::getTable()->getMainLinks();
     $this->show_project_list = framework\Settings::isFrontpageProjectListVisible();
     $this->show_project_config_link = $this->getUser()->canAccessConfigurationPage(framework\Settings::CONFIGURATION_SECTION_PROJECTS);
     if ($this->show_project_list || $this->show_project_config_link) {
         $projects = entities\Project::getAllRootProjects(false);
         foreach ($projects as $k => $project) {
             if (!$project->hasAccess()) {
                 unset($projects[$k]);
             }
         }
         $this->projects = $projects;
         $this->project_count = count($this->projects);
     }
 }