diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang index 1940c9674c1..8f36876fddc 100644 --- a/htdocs/langs/en_US/eventorganization.lang +++ b/htdocs/langs/en_US/eventorganization.lang @@ -102,6 +102,8 @@ EvntOrgRegistrationWelcomeMessage = Welcome on the conference or booth suggestio EvntOrgRegistrationConfHelpMessage = Here, you can suggest a new conference for the project EvntOrgRegistrationBoothHelpMessage = Here, you can suggest a new booth for the project EvntOrgVoteHelpMessage = Here, you can view and vote for the suggested events for the project +ListOfSuggestedConferences = List of suggested conferences +ListOfSuggestedBooths = List of suggested booths SuggestConference = Suggest a new conference SuggestBooth = Suggest a booth ViewAndVote = View and vote for suggested events diff --git a/htdocs/public/project/viewandvote.php b/htdocs/public/project/viewandvote.php index fe7d4d2ed59..89cdca7591b 100644 --- a/htdocs/public/project/viewandvote.php +++ b/htdocs/public/project/viewandvote.php @@ -63,6 +63,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; +require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; // Hook to be used by external payment modules (ie Payzen, ...) include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($db); @@ -102,10 +103,62 @@ if ($resultproject < 0) { /* * Actions */ +$tmpthirdparty = new Societe($db); -$listOfEvents = 'oui'; +$listOfConferences = $listOfBooths = ''.$langs->trans('Label').' + '.$langs->trans('Type').' + '.$langs->trans('DateStart').' + '.$langs->trans('DateEnd').' + '.$langs->trans('Thirdparty').' + '.$langs->trans('Note').''; +// For conferences +$sql = "SELECT a.id, a.fk_action, a.datep, a.datep2, a.label, a.fk_soc, a.note, ca.libelle + FROM ".MAIN_DB_PREFIX."actioncomm as a + INNER JOIN ".MAIN_DB_PREFIX."c_actioncomm as ca ON (a.fk_action=ca.id) + WHERE ca.module='conference@eventorganization' + AND a.status<2"; +$result = $db->query($sql); + +$i = 0; +while ($i < $db->num_rows($result)) { + $obj = $db->fetch_object($result); + + $resultthirdparty = $tmpthirdparty->fetch($obj->fk_soc); + if ($resultthirdparty) { + $thirdpartyname = $tmpthirdparty->name; + } else { + $thirdpartyname = ''; + } + + $listOfConferences .= ''.$obj->label.''.$obj->libelle.''.$obj->datep.''.$obj->datep2.''.$thirdpartyname.''.$obj->note.''; + $listOfConferences .= ''; + $i++; +} + +// For booths +$sql = "SELECT a.id, a.fk_action, a.datep, a.datep2, a.label, a.fk_soc, a.note, ca.libelle + FROM ".MAIN_DB_PREFIX."actioncomm as a + INNER JOIN ".MAIN_DB_PREFIX."c_actioncomm as ca ON (a.fk_action=ca.id) + WHERE ca.module='booth@eventorganization' + AND a.status<2"; +$result = $db->query($sql); +$i = 0; +while ($i < $db->num_rows($result)) { + $obj = $db->fetch_object($result); + + $resultthirdparty = $tmpthirdparty->fetch($obj->fk_soc); + if ($resultthirdparty) { + $thirdpartyname = $tmpthirdparty->name; + } else { + $thirdpartyname = ''; + } + + $listOfBooths .= ''.$obj->label.''.$obj->libelle.''.$obj->datep.''.$obj->datep2.''.$thirdpartyname.''.$obj->note.''; + $listOfBooths .= ''; + $i++; +} /* * View @@ -170,16 +223,26 @@ if ($urllogo) { } print ''; } - -print ''."\n"; - +print '
'."\n"; $text = ''."\n"; -$text .= ''."\n"; +$text .= ''."\n"; $text .= ''."\n";; - print $text; +print '

'.$langs->trans("EvntOrgRegistrationWelcomeMessage").'
'.$langs->trans("EvntOrgVoteHelpMessage").' '.$id.'.

'.$langs->trans("EvntOrgVoteHelpMessage").' : "'.$project->title.'".

'.$project->note_public.'

'."\n"; -print $listOfEvents; +print dol_get_fiche_head(''); + +print ''."\n"; +print ''; +print $listOfConferences.'
'; +print '
'.$langs->trans("ListOfSuggestedConferences").'
'."\n"; + + +print ''."\n"; +print ''; +print $listOfBooths.'
'; +print '
'.$langs->trans("ListOfSuggestedBooths").'
'."\n"; +print dol_get_fiche_end(); // Output payment summary form print ''; @@ -196,7 +259,7 @@ print "\n"; // Show all action buttons print '
'; -print ''; +//print '';