diff --git a/htdocs/eventorganization/class/conferenceorbooth.class.php b/htdocs/eventorganization/class/conferenceorbooth.class.php
index f4661a1d2ab..4f3fa42b51f 100644
--- a/htdocs/eventorganization/class/conferenceorbooth.class.php
+++ b/htdocs/eventorganization/class/conferenceorbooth.class.php
@@ -574,7 +574,7 @@ class ConferenceOrBooth extends ActionComm
$label = $langs->trans("ShowConferenceOrBooth");
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
}
- $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
+ //$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"';
} else {
$linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
index dbc1e853d2a..4def01d2c7f 100644
--- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php
+++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
@@ -61,7 +61,7 @@ class ConferenceOrBoothAttendee extends CommonObject
/**
* @var string String with name of icon for conferenceorboothattendee. Must be the part after the 'object_' into object_conferenceorboothattendee.png
*/
- public $picto = 'conferenceorboothattendee@eventorganization';
+ public $picto = 'contact';
const STATUS_DRAFT = 0;
@@ -736,6 +736,10 @@ class ConferenceOrBoothAttendee extends CommonObject
if ($add_save_lastsearch_values) {
$url .= '&save_lastsearch_values=1';
}
+
+ if ($option == 'conforboothid') {
+ $url .= '&conforboothid='.$this->fk_actioncomm;
+ }
}
$linkclose = '';
diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php
index d2bffd27a93..85bdd52905f 100644
--- a/htdocs/eventorganization/conferenceorbooth_list.php
+++ b/htdocs/eventorganization/conferenceorbooth_list.php
@@ -735,6 +735,8 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
print '
';
if ($key == 'status') {
print $object->getLibStatut(5);
+ } elseif ($key == 'ref') {
+ print $object->getNomUrl(1);
} else {
print $object->showOutputField($val, $key, $object->$key, '');
}
diff --git a/htdocs/eventorganization/conferenceorboothattendee_card.php b/htdocs/eventorganization/conferenceorboothattendee_card.php
index dae9ca32a01..7b012a42d8e 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_card.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_card.php
@@ -260,7 +260,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$res = $object->fetch_optionals();
$head = conferenceorboothattendeePrepareHead($object);
- print dol_get_fiche_head(array(), 'card', $langs->trans("ConferenceOrBoothAttendee"), -1, $object->picto);
+ print dol_get_fiche_head($head, 'card', $langs->trans("ConferenceOrBoothAttendee"), -1, $object->picto);
$formconfirm = '';
@@ -310,7 +310,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Object card
// ------------------------------------------------------------
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = ''.$langs->trans("BackToList").'';
$morehtmlref = '';
/*
@@ -439,24 +439,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (empty($user->socid)) {
print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle');
}
-
- // Back to draft
- if ($object->status == $object::STATUS_VALIDATED) {
- print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes', '', $permissiontoadd);
- }
-
- print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit', '', $permissiontoadd);
-
- // Validate
- if ($object->status == $object::STATUS_DRAFT) {
- if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) {
- print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes', '', $permissiontoadd);
- } else {
- $langs->load("errors");
- //print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes', '', 0);
- print ' '.$langs->trans("Validate").'';
- }
- }
+ print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&conforboothid='.$confOrBooth->id.'&action=edit', '', $permissiontoadd);
// Clone
print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=scrumsprint', '', $permissiontoadd);
@@ -512,20 +495,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
- print ' ';
+ print ' ';
- $MAXEVENT = 10;
-
- $morehtmlright = ' ';
- $morehtmlright .= $langs->trans("SeeAll");
- $morehtmlright .= '';
-
- // List of actions on element
- include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
- $formactions = new FormActions($db);
- $somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright);
-
- print ' ';
+ print '';
}
//Select mail models is same action as presend
diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php
index 8a6c510f255..66e1ce86b5f 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_list.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_list.php
@@ -202,6 +202,13 @@ if (empty($reshook)) {
$form = new Form($db);
$now = dol_now();
+$confOrBooth = new ConferenceOrBooth($db);
+if ($conf_or_booth_id > 0) {
+ $result = $confOrBooth->fetch($conf_or_booth_id);
+ if ($result < 0) {
+ setEventMessages(null, $confOrBooth->errors, 'errors');
+ }
+}
// Build and execute select
// --------------------------------------------------------------------
@@ -219,7 +226,7 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje
$sql .= preg_replace('/^,/', '', $hookmanager->resPrint);
$sql = preg_replace('/,\s*$/', '', $sql);
$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
-$sql .= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm as a on a.id=t.fk_actioncomm";
+$sql .= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm as a on a.id=t.fk_actioncomm AND a.id=".$confOrBooth->id;
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)";
}
@@ -316,25 +323,18 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
//$help_url="EN:Module_ConferenceOrBoothAttendee|FR:Module_ConferenceOrBoothAttendee_FR|ES:Módulo_ConferenceOrBoothAttendee";
$help_url = '';
-$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("ConferenceOrBoothAttendees"));
-//$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("ConferenceOrBooths"));
+$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("ConferenceOrBoothAttendee"));
$morejs = array();
$morecss = array();
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'classforhorizontalscrolloftabs');
-if ($conf_or_booth_id > 0) {
- $confOrBooth = new ConferenceOrBooth($db);
- $result = $confOrBooth->fetch($conf_or_booth_id);
- if ($result < 0) {
- setEventMessages(null, $confOrBooth->errors, 'errors');
- }
-
+if ($confOrBooth->id > 0) {
$head = conferenceorboothPrepareHead($confOrBooth);
print dol_get_fiche_head($head, 'attendees', $langs->trans("ConferenceOrBooth"), -1, $object->picto);
//$help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
- $title = $langs->trans("ConferenceOrBooths") . ' - ' . $langs->trans("ConferenceOrBoothsAttendees") . ' - ' . $confOrBooth->id;
+ $title = $langs->trans("ConferenceOrBooth") . ' - ' . $langs->trans("Attendees") . ' - ' . $confOrBooth->id;
$object_evt=$object;
$object=$confOrBooth;
@@ -588,6 +588,8 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
print ' | ';
if ($key == 'status') {
print $object->getLibStatut(5);
+ } elseif ($key == 'ref') {
+ print $object->getNomUrl(1, 'conforboothid');
} else {
print $object->showOutputField($val, $key, $object->$key, '');
}
diff --git a/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php b/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php
index 2c65ebbe5db..f43eaa83f1a 100644
--- a/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php
+++ b/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php
@@ -116,4 +116,10 @@ function conferenceorboothattendeePrepareHead($object)
$head[$h][1] = $langs->trans("Card");
$head[$h][2] = 'card';
$h++;
+
+ complete_head_from_modules($conf, $langs, $object, $head, $h, 'conferenceorboothattendee@eventorganization');
+
+ complete_head_from_modules($conf, $langs, $object, $head, $h, 'conferenceorboothattendee@eventorganization', 'remove');
+
+ return $head;
}
|