// +----------------------------------------------------------------------+
require_once('initialize.php');
-import('form.Form');
import('ttGroupHelper');
// Access checks.
}
// End of access checks.
+$showFiles = $user->isPluginEnabled('at');
+
if($user->can('manage_projects')) {
- $active_projects = ttGroupHelper::getActiveProjects();
- $inactive_projects = ttGroupHelper::getInactiveProjects();
+ $active_projects = $showFiles ? ttGroupHelper::getActiveProjectsWithFiles() : ttGroupHelper::getActiveProjects();
+ $inactive_projects = $showFiles ? ttGroupHelper::getInactiveProjectsWithFiles() : ttGroupHelper::getInactiveProjects();
} else
$active_projects = $user->getAssignedProjects();
$smarty->assign('active_projects', $active_projects);
$smarty->assign('inactive_projects', $inactive_projects);
+$smarty->assign('show_files', $user->isPluginEnabled('at'));
$smarty->assign('title', $i18n->get('title.projects'));
$smarty->assign('content_page_name', 'projects.tpl');
$smarty->display('index.tpl');