private function getHeader() { $html = ''; $repoId = $this->repository->getId(); $creator = $this->repository->getCreator(); $parent = $this->repository->getParent(); $access = $this->repository->getAccess(); $creatorName = ''; if (!empty($creator)) { $creatorName = UserHelper::instance()->getLinkOnUserFromUserId($creator->getId()); } // Access type $accessType = $this->getAccessType($access, $this->repository->getBackend() instanceof Git_Backend_Gitolite); $html .= '<h1>' . $accessType . $this->repository->getFullName() . '</h1>'; if (!empty($parent)) { $html .= '<div id="plugin_git_repo_parent">'; $html .= $GLOBALS['Language']->getText('plugin_git', 'view_repo_parent_' . $this->repository->getBackendType(), $parent->getHTMLLink($this->url_manager)); $html .= '</div>'; } return $html; }
/** * @return array */ private function buildPanes(GitRepository $repository) { $panes = array(new GitViews_RepoManagement_Pane_GeneralSettings($repository, $this->request)); if ($repository->getBackendType() == GitDao::BACKEND_GITOLITE) { $panes[] = new GitViews_RepoManagement_Pane_Gerrit($repository, $this->request, $this->driver_factory, $this->gerrit_servers, $this->gerrit_config_templates); } $panes[] = new GitViews_RepoManagement_Pane_AccessControl($repository, $this->request); $mirrors = $this->mirror_data_mapper->fetchAllForProject($repository->getProject()); if (count($mirrors) > 0) { $repository_mirrors = $this->mirror_data_mapper->fetchAllRepositoryMirrors($repository); $panes[] = new GitViews_RepoManagement_Pane_Mirroring($repository, $this->request, $mirrors, $repository_mirrors); } $panes[] = new GitViews_RepoManagement_Pane_Notification($repository, $this->request); $panes[] = new GitViews_RepoManagement_Pane_Delete($repository, $this->request); $indexed_panes = array(); foreach ($panes as $pane) { if ($pane->canBeDisplayed()) { $indexed_panes[$pane->getIdentifier()] = $pane; } } return $indexed_panes; }