Commit 3922f3e4 authored by Romain Therville's avatar Romain Therville 🐭
Browse files

Update for the project view

The projects count has been updated to ignore the hidden projects if
they do not appear in the list.

issue #154
parent 8645bb68
......@@ -154,9 +154,11 @@ class tx_nG6_pi1 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
} else {
if( $is_current_user_superadmin ){
$projects = tx_nG6_db::select_superadmin_projects();
$visible_projects = NULL;
$projects = tx_nG6_db::select_all_user_projects($user_id, 'tx_nG6_project.uid DESC');
//$projects = tx_nG6_db::select_all_user_projects($user_id, '');
$visible_projects = tx_nG6_db::get_user_projects($user_id);
......@@ -201,6 +203,7 @@ class tx_nG6_pi1 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
$smarty->assign('single_project_display', $single_project_display);
$smarty->assign('is_ng6_admin', tx_nG6_db::is_ng6_administrator($user_id) || tx_nG6_db::is_user_ng6_superadmin($user_id) ? true : false);
$smarty->assign('is_ng6_superadmin', tx_nG6_db::is_user_ng6_superadmin($user_id) ? true : false);
$smarty->assign('visible_projects', $visible_projects);
// If it's a single project, add runs and analysis information
if ($single_project_display) {
......@@ -301,7 +301,12 @@ along with this program. If not, see <>.
<div class="ng6-content-header-right">
You have access to <strong>{$projects|@count}</strong> projects.
{if $is_ng6_superadmin}
You have access to <strong>{$projects|@count}</strong> projects.
You have access to <strong>{$visible_projects|@count}</strong> projects.
<br />
{assign var="project_size" value="<span id='size' class='tx-nG6-mini-wait'></span>"}
Raw data and analysis results use <strong>{$project_size}</strong> on the hard drive for all projects.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment