X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=projects.php;h=6088af495ee3d1aaa58e575d62febc2d5bd11cc2;hb=b53f880dcd61797fd2e6609477add03ca757d813;hp=97a86ba631b1a51d6c97dc532e48eb24e63a3cb6;hpb=cec2e1b0941c16302bedad01bfb8455baf13e0f8;p=timetracker.git diff --git a/projects.php b/projects.php index 97a86ba6..6088af49 100644 --- a/projects.php +++ b/projects.php @@ -27,7 +27,6 @@ // +----------------------------------------------------------------------+ require_once('initialize.php'); -import('form.Form'); import('ttGroupHelper'); // Access checks. @@ -41,15 +40,17 @@ if (MODE_PROJECTS != $user->getTrackingMode() && MODE_PROJECTS_AND_TASKS != $use } // 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('show_files', $showFiles); $smarty->assign('title', $i18n->get('title.projects')); $smarty->assign('content_page_name', 'projects.tpl'); $smarty->display('index.tpl');