From 51f342c81a3ba8e36395ac83315ffa0bcc661776 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Oct 2021 12:20:51 +0200 Subject: [PATCH] Clean code --- htdocs/public/project/index.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/htdocs/public/project/index.php b/htdocs/public/project/index.php index 3990e31ba2f..3926d443f93 100644 --- a/htdocs/public/project/index.php +++ b/htdocs/public/project/index.php @@ -205,19 +205,27 @@ print "\n"; // Show all action buttons print '
'; + // Output introduction text +$foundaction = 0; if ($project->accept_booth_suggestions) { - print ''; + $foundaction++; + print ''; print '

'; } -if ($project->accept_conference_suggestions) { - print ''; +if ($project->accept_conference_suggestions == 1 || $project->accept_conference_suggestions == 2) { // Can suggest conferences + $foundaction++; + print ''; print '

'; } -print ''; - - +if ($project->accept_conference_suggestions == 2 || $project->accept_conference_suggestions == 3) { // Can vote for conferences + $foundaction++; + print ''; +} +if (! $foundaction) { + print ''.$langs->trans("NoPublicActionsAllowedForThisEvent").''; +} print ''."\n";