diff --git a/htdocs/eventorganization/conferenceorbooth_card.php b/htdocs/eventorganization/conferenceorbooth_card.php index 47b70c2a3a3..a38315cb804 100644 --- a/htdocs/eventorganization/conferenceorbooth_card.php +++ b/htdocs/eventorganization/conferenceorbooth_card.php @@ -129,14 +129,18 @@ if ($reshook < 0) { if (empty($reshook)) { $error = 0; - $backurlforlist = dol_buildpath('/eventorganization/conferenceorbooth_list.php', 1); + if (!empty($withproject)) { + $backurlforlist = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_list.php?withproject=1&fk_project='.((int) $fk_project); + } else { + $backurlforlist = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_list.php'; + } if (empty($backtopage) || ($cancel && empty($id))) { if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { $backtopage = $backurlforlist; } else { - $backtopage = dol_buildpath('/eventorganization/conferenceorbooth_card.php', 1).'?id='.($id > 0 ? $id : '__ID__').($withproject ? '&withproject=1' : ''); + $backtopage = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_card.php?fk_project='.((int) $fk_project).'&id='.($id > 0 ? $id : '__ID__').($withproject ? '&withproject=1' : ''); } } } @@ -271,17 +275,6 @@ if (!empty($withproject)) { print ''; } - // Visibility - print '
| '.$langs->trans("Description").' | '; - print dol_htmlentitiesbr($projectstatic->description); - print ' |
| '.$langs->trans("Categories").' | '; @@ -346,6 +345,11 @@ if (!empty($withproject)) { print " |
| '.$langs->trans("Description").' | '; + print dol_htmlentitiesbr($projectstatic->description); + print ' |
| '; $typeofdata = 'checkbox:'.($projectstatic->accept_conference_suggestions ? ' checked="checked"' : ''); $htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp"); @@ -380,6 +384,20 @@ if (!empty($withproject)) { print $form->editfieldval($form->textwithpicto($langs->trans('MaxNbOfAttendees'), ''), 'max_attendees', $projectstatic->max_attendees, $projectstatic, $permissiontoadd, 'integer:3', '', null, null, '', 0, '', 'projectid'); print " | |
| '.$langs->trans("EventOrganizationICSLinkProject").' | '; + // Define $urlwithroot + $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); + $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; + + // Show message + $message = 'entity : ""); + $message .= '&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...')); + $message .= "&project=".$projectid.'&module='.urlencode('project@eventorganization').'&file='.urlencode('calendar-'.$project->ref.'.ics').'&output=file">'.$langs->trans('DownloadICSLink').img_picto('', 'download', 'class="paddingleft"').''; + print $message; + print " |
| '.$langs->trans("EventOrganizationICSLink").' | ';
// Define $urlwithroot
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
@@ -421,7 +439,7 @@ if (!empty($withproject)) {
//print ' ';
//print '';
print '';
- print ''.img_picto('', 'globe').'';
+ print ''.img_picto('', 'globe').'';
//print ' ';
//print ajax_autoselect("linkregister");
print ' |
| '.$langs->trans("Visibility").' | '; - if ($projectstatic->public) { - print $langs->trans('SharedProject'); - } else { - print $langs->trans('PrivateProject'); + // Budget + print ' |
| '.$langs->trans("Budget").' | '; + if (strcmp($projectstatic->budget_amount, '')) { + print ''.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).''; } print ' |
| '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").' | '; + // Date start - end project + print ' |
| '.$langs->trans("Dates").' ('.$langs->trans("Project").') | '; $start = dol_print_date($projectstatic->date_start, 'day'); print($start ? $start : '?'); $end = dol_print_date($projectstatic->date_end, 'day'); @@ -322,13 +334,34 @@ if (!empty($withproject)) { } print ' |
| '.$langs->trans("Budget").' | '; - if (strcmp($projectstatic->budget_amount, '')) { - print price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency); + // Date start - end of event + print ' |
| '.$langs->trans("Dates").' ('.$langs->trans("Event").') | '; + $start = dol_print_date($projectstatic->date_start_event, 'day'); + print($start ? $start : '?'); + $end = dol_print_date($projectstatic->date_end_event, 'day'); + print ' - '; + print($end ? $end : '?'); + if ($projectstatic->hasDelay()) { + print img_warning("Late"); } print ' |
| '.$langs->trans("Visibility").' | '; + if ($projectstatic->public == 0) { + print img_picto($langs->trans('PrivateProject'), 'private', 'class="paddingrightonly"'); + print $langs->trans("PrivateProject"); + } else { + print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"'); + print $langs->trans("SharedProject"); + } + print ' |
| '.$langs->trans("Location").' | '; + print $projectstatic->location; + print ' |
| '.$langs->trans("Categories").' | '; + print $form->showCategories($projectstatic->id, Categorie::TYPE_PROJECT, 1); + print " | '.$langs->trans("Description").' | '; print nl2br($projectstatic->description); print ' | '; - // Categories - if (isModEnabled('category')) { - print '
| '.$langs->trans("Categories").' | '; - print $form->showCategories($projectstatic->id, 'project', 1); - print " |
| '; $typeofdata = 'checkbox:'.($projectstatic->accept_conference_suggestions ? ' checked="checked"' : ''); $htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp"); @@ -382,14 +415,34 @@ if (!empty($withproject)) { print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', $projectstatic->price_registration, $projectstatic, 0, 'amount', '', null, null, '', 0, '', 'projectid'); print " | |
| '.$langs->trans("EventOrganizationICSLink").' | '; + print ' |
| '; + print $form->editfieldkey($form->textwithpicto($langs->trans('MaxNbOfAttendees'), ''), 'max_attendees', '', $projectstatic, $permissiontoadd, 'integer:3', '', 0, 0, 'projectid'); + print ' | '; + print $form->editfieldval($form->textwithpicto($langs->trans('MaxNbOfAttendees'), ''), 'max_attendees', $projectstatic->max_attendees, $projectstatic, $permissiontoadd, 'integer:3', '', null, null, '', 0, '', 'projectid'); + print " |
| '.$langs->trans("EventOrganizationICSLinkProject").' | '; // Define $urlwithroot $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // Show message $message = 'entity : ""); - $message .= '&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...'); + $message .= '&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...')); + $message .= "&project=".$projectid.'&module='.urlencode('project@eventorganization').'&file='.urlencode('calendar-'.$project->ref.'.ics').'&output=file">'.$langs->trans('DownloadICSLink').img_picto('', 'download', 'class="paddingleft"').''; + print $message; + print " |
| '.$langs->trans("EventOrganizationICSLink").' | '; + // Define $urlwithroot + $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); + $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; + + // Show message + $message = 'entity : ""); + $message .= '&exportkey='.urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY', '...')); $message .= "&project=".$projectstatic->id.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').img_picto('', 'download', 'class="paddingleft"').''; print $message; print " | ';
- $linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.$projectstatic->id;
- $encodedsecurekey = dol_hash(getDolGlobalString("EVENTORGANIZATION_SECUREKEY").'conferenceorbooth'.$projectstatic->id, 'md5');
+ $linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.((int) $projectstatic->id);
+ $encodedsecurekey = dol_hash(getDolGlobalString("EVENTORGANIZATION_SECUREKEY").'conferenceorbooth'.((int) $projectstatic->id), 'md5');
$linksuggest .= '&securekey='.urlencode($encodedsecurekey);
//print ' ';
//print '';
print '';
- print ''.img_picto('', 'globe').'';
+ print ''.img_picto('', 'globe').'';
//print ' ';
//print ajax_autoselect("linkregister");
print ' | ';
@@ -440,8 +493,8 @@ if (!empty($withproject)) {
print '