function project_action($group = '') { if (!$group) { $groups = \firegit\git\Manager::getGroups(); $this->setLayout($this->projectLayouts)->set(array('pageTitle' => '项目分组', 'subNavType' => 'list', 'groups' => $groups))->setView('guanli/project/index.phtml'); return; } $repos = \firegit\git\Manager::getReposByGroup($group); $this->setLayout($this->projectLayouts)->set(array('pageTitle' => $group . '项目列表', 'group' => $group, 'repos' => $repos))->setView('guanli/project/detail.phtml'); }