3 * FusionForge SCM Library
5 * Copyright 2004-2005 (c) GForge LLC, Tim Perdue
6 * Copyright 2010 (c), Franck Villaume - Capgemini
7 * Copyright (C) 2010-2011 Alain Peyrat - Alcatel-Lucent
8 * Copyright 2012, Franck Villaume - TrivialDev
9 * http://fusionforge.org
11 * This file is part of FusionForge. FusionForge is free software;
12 * you can redistribute it and/or modify it under the terms of the
13 * GNU General Public License as published by the Free Software
14 * Foundation; either version 2 of the Licence, or (at your option)
17 * FusionForge is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License along
23 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 function scm_header($params) {
29 if (!forge_get_config('use_scm')) {
33 $project = group_get_object($params['group']);
34 if (!$project || !is_object($project)) {
36 } elseif ($project->isError()) {
37 exit_error($project->getErrorMessage(),'scm');
40 if (!$project->usesSCM()) {
46 if (session_loggedin()) {
47 $params['TITLES'][] = _('View Source Code');
48 $params['DIRS'][] = '/scm/?group_id='.$params['group'];
49 $params['TOOLTIPS'][] = array('title' => _('Online Source code browsing'), 'class' => 'tabtitle');
50 $params['TITLES'][] = _('Reporting');
51 $params['DIRS'][] = '/scm/reporting/?group_id='.$params['group'];
52 $params['TOOLTIPS'][] = array('title' => _('Global statistics on this SCM repository'), 'class' => 'tabtitle');
53 $params['TITLES'][] = _('Administration');
54 $params['DIRS'][] = '/scm/admin/?group_id='.$params['group'];
55 $params['TOOLTIPS'][] = array('title' => _('Administration page : enable / disable options'), 'class' => 'tabtitle');
57 if (forge_check_perm('project_admin', $project->getID())) {
58 $params['submenu'] = $HTML->subMenu(
66 $params['toptab'] = 'scm';
67 site_project_header($params);
68 echo '<div id="scm" class="scm">';
71 function scm_footer() {
73 site_project_footer(array());
78 // c-file-style: "bsd"