diff --git a/htdocs/core/modules/modEventOrganization.class.php b/htdocs/core/modules/modEventOrganization.class.php
index 77d0cc0c81f..2204955ad5e 100644
--- a/htdocs/core/modules/modEventOrganization.class.php
+++ b/htdocs/core/modules/modEventOrganization.class.php
@@ -337,7 +337,82 @@ class modEventOrganization extends DolibarrModules
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
*/
-
+ $this->menu[$r++]=array(
+ 'fk_menu'=>'fk_mainmenu=project', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
+ 'type'=>'left', // This is a Left menu entry
+ 'titre'=>'EventOrganizationMenuLeft',
+ 'mainmenu'=>'project',
+ 'leftmenu'=>'eventorganization',
+ 'url'=>'',
+ 'langs'=>'eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
+ 'position'=>1000+$r,
+ 'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
+ 'perms'=>'$user->rights->eventorganization->read', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
+ 'target'=>'',
+ 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
+ );
+ $this->menu[$r++]=array(
+ 'fk_menu'=>'fk_mainmenu=project,fk_leftmenu=eventorganization', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
+ 'type'=>'left', // This is a Left menu entry
+ 'titre'=>'List',
+ 'url'=>'/projet/list.php?search_usage_event_organization=1&mainmenu=project',
+ 'langs'=>'eventorganization@eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
+ 'position'=>1000+$r,
+ 'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
+ 'perms'=>'$user->rights->eventorganization->read', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
+ 'target'=>'',
+ 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
+ );
+ $this->menu[$r++]=array(
+ 'fk_menu'=>'fk_mainmenu=project,fk_leftmenu=eventorganization', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
+ 'type'=>'left', // This is a Left menu entry
+ 'titre'=>'New',
+ 'url'=>'/projet/card.php?leftmenu=projects&action=create&usage_organize_event=1',
+ 'langs'=>'eventorganization@eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
+ 'position'=>1000+$r,
+ 'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
+ 'perms'=>'$user->rights->eventorganization->write', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
+ 'target'=>'',
+ 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
+ );
+ $this->menu[$r++]=array(
+ 'fk_menu'=>'fk_mainmenu=project', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
+ 'type'=>'left', // This is a Left menu entry
+ 'titre'=>'EventOrganizationMenuLeft',
+ 'mainmenu'=>'project',
+ 'leftmenu'=>'eventorganizationconforbooth',
+ 'url'=>'',
+ 'langs'=>'eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
+ 'position'=>1000+$r,
+ 'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
+ 'perms'=>'$user->rights->eventorganization->read', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
+ 'target'=>'',
+ 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
+ );
+ $this->menu[$r++]=array(
+ 'fk_menu'=>'fk_mainmenu=project,fk_leftmenu=eventorganizationconforbooth', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
+ 'type'=>'left', // This is a Left menu entry
+ 'titre'=>'List',
+ 'url'=>'htdocs/eventorganization/conferenceorbooth_list.php?mainmenu=project',
+ 'langs'=>'eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
+ 'position'=>1000+$r,
+ 'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
+ 'perms'=>'$user->rights->eventorganization->read', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
+ 'target'=>'',
+ 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
+ );
+ $this->menu[$r++]=array(
+ 'fk_menu'=>'fk_mainmenu=project,fk_leftmenu=eventorganizationconforbooth', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
+ 'type'=>'left', // This is a Left menu entry
+ 'titre'=>'New',
+ 'url'=>'/eventorganization/conferenceorbooth_card.php?leftmenu=projects&action=create',
+ 'langs'=>'eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
+ 'position'=>1000+$r,
+ 'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
+ 'perms'=>'$user->rights->eventorganization->write', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
+ 'target'=>'',
+ 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
+ );
/* END MODULEBUILDER LEFTMENU CONFERENCEORBOOTH */
// Exports profiles provided by this module
$r = 1;
diff --git a/htdocs/eventorganization/class/conferenceorbooth.class.php b/htdocs/eventorganization/class/conferenceorbooth.class.php
index 186bd57811b..7defb51f415 100644
--- a/htdocs/eventorganization/class/conferenceorbooth.class.php
+++ b/htdocs/eventorganization/class/conferenceorbooth.class.php
@@ -69,7 +69,7 @@ class ConferenceOrBooth extends ActionComm
const STATUS_CONFIRMED = 2;
const STATUS_NOT_QUALIFIED = 3;
const STATUS_DONE = 4;
- const STATUS_CANCELED = -1;
+ const STATUS_CANCELED = 9;
/**
@@ -104,18 +104,18 @@ class ConferenceOrBooth extends ActionComm
*/
public $fields=array(
'id' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
- 'ref' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
+ 'ref' => array('type'=>'integer', 'label'=>'Ref', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>2, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'help'=>"Help text", 'showoncombobox'=>'1',),
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty",),
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1,),
'note' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1,),
- 'fk_action' => array('type'=>'sellist:c_actioncomm:label:rowid::module LIKE (\'conference\',\'booth\'))', 'label'=>'Format', 'enabled'=>'1', 'position'=>60, 'notnull'=>1, 'visible'=>1,),
+ 'fk_action' => array('type'=>'sellist:c_actioncomm:libelle:id::module LIKE (\'%@eventorganization\')', 'label'=>'Format', 'enabled'=>'1', 'position'=>60, 'notnull'=>1, 'visible'=>1,),
'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
'fk_user_author' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
'fk_user_mod' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
- 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Brouillon', '1'=>'Validé', '9'=>'Annulé'),),
+ 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'EvntOrgDraft', '1'=>'EvntOrgSuggested', '2'=> 'EvntOrgConfirmed', '3' =>'EvntOrgNotQualified', '4' =>'EvntOrgDone', '9'=>'EvntOrgCancelled'),),
);
public $rowid;
public $id;
@@ -185,6 +185,9 @@ class ConferenceOrBooth extends ActionComm
public function create(User $user, $notrigger = false)
{
$this->setPercentageFromStatus();
+ $this->userownerid=$user->id;
+ $this->type_code=$this->fk_action;
+ $this->socid=$this->fk_soc;
return parent::create($user, $notrigger);
}
diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php
index 374ea25f68c..73b32abfa7d 100644
--- a/htdocs/eventorganization/conferenceorbooth_list.php
+++ b/htdocs/eventorganization/conferenceorbooth_list.php
@@ -205,11 +205,11 @@ $title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("ConferenceOrBoot
if ($projectid > 0) {
$project = new Project($db);
- $result=$project->fetch($projectid);
+ $result = $project->fetch($projectid);
if ($result < 0) {
setEventMessages(null, $project->errors, 'errors');
}
- $result=$project->fetch_thirdparty();
+ $result = $project->fetch_thirdparty();
if ($result < 0) {
setEventMessages(null, $project->errors, 'errors');
}
@@ -305,7 +305,7 @@ if ($projectid > 0) {
print '
';
}
if (!empty($conf->eventorganization->enabled)) {
- print 'usage_organize_event ? ' checked="checked"' : '')).'"> ';
+ print 'usage_organize_event ? ' checked="checked"' : '').'"> ';
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
}
@@ -555,7 +555,7 @@ print '';
print '';
print '';
-$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/eventorganization/conferenceorbooth_card.php', 1).'?action=create'.(!empty($projectid)?'&fk_project='.$projectid:'').'&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
+$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/eventorganization/conferenceorbooth_card.php', 1).'?action=create'.(!empty($project->id)?'&fk_project='.$project->id:'').(!empty($project->socid)?'&fk_soc='.$project->socid:'').'&backtopage='.urlencode($_SERVER['PHP_SELF']).(!empty($project->id)?'?projectid='.$project->id:''), '', $permissiontoadd);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang
index 0c7e4f047ce..5444ed59e3d 100644
--- a/htdocs/langs/en_US/eventorganization.lang
+++ b/htdocs/langs/en_US/eventorganization.lang
@@ -16,11 +16,16 @@
#
# Generic
#
-
ModuleEventOrganizationName = Event Organization
EventOrganizationDescription = Event Organization through Module Project
EventOrganizationDescriptionLong= Manage Event organization for conference, attendees, speaker, and attendees, with public subcription page
+#
+# Menu
+#
+EventOrganizationMenuLeft = Organized events
+EventOrganizationConferenceOrBoothMenuLeft = Conference Or Booth
+
#
# Admin page
#
@@ -70,3 +75,13 @@ PriceOfRegistrationHelp=Price of registration
PriceOfBooth=Price of subscription
PriceOfBoothHelp=Price of subscription
EventOrganizationICSLink=Link ICS for events
+
+#
+# Status
+#
+EvntOrgDraft = Draft
+EvntOrgSuggested = Suggested
+EvntOrgConfirmed = Confirmed
+EvntOrgNotQualified = Not Qualified
+EvntOrgDone = Done
+EvntOrgCancelled = Cancelled
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index 933abd53692..f34c33097ec 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -1198,8 +1198,8 @@ while ($i < min($num, $limit)) {
// Event Organization
if (!empty($arrayfields['p.usage_organize_event']['checked'])) {
print '