3 * Copyright 2016, Stéphane-Eymeric Bredtthauer - TrivialDev
5 * This file is part of FusionForge.
7 * FusionForge is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published
9 * by the Free Software Foundation; either version 2 of the License,
10 * or (at your option) any later version.
12 * FusionForge is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 require_once $gfplugins.'taskboard/common/TaskBoardFactory.class.php';
24 class TaskBoardFactoryHtml extends TaskBoardFactory {
25 function header($params=array()) {
28 if (!forge_get_config('use_tracker')) {
32 $group_id= $this->Group->getID();
34 $params['group']=$group_id;
35 if (!isset($params['title'])) {
36 $params['title']=sprintf(_('Taskboards for %s'), $this->Group->getPublicName());
38 $params['toptab']='taskboard';
40 $labels = array(_('View Taskboards'));
41 $links = array('plugins/taskboard/?group_id='.$group_id);
42 $attr = array(array('title' => _('Get the list of available taskboards')));
43 if (session_loggedin()) {
44 if (forge_check_perm('tracker_admin', $group_id)) {
45 $labels[] = _('Taskboards Administration');
46 $links[] = 'plugins/taskboard/admin/?group_id='.$group_id;
47 $attr[] = array('title' => _('Global administration for taskboards.'));
51 $params['submenu'] = $HTML->subMenu($labels, $links, $attr);
53 site_project_header($params);
56 function footer($params = array()) {
57 site_project_footer($params);