categories for actioncomm
This commit is contained in:
parent
39229b7a99
commit
05ab4f79ef
@ -54,6 +54,7 @@ class Categorie extends CommonObject
|
||||
const TYPE_ACCOUNT = 'bank_account';
|
||||
const TYPE_BANK_LINE = 'bank_line';
|
||||
const TYPE_WAREHOUSE = 'warehouse';
|
||||
const TYPE_ACTIONCOMM = 'actioncomm';
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
@ -77,6 +78,7 @@ class Categorie extends CommonObject
|
||||
'user' => 7,
|
||||
'bank_line' => 8,
|
||||
'warehouse' => 9,
|
||||
'actioncomm' => 9,
|
||||
);
|
||||
|
||||
/**
|
||||
@ -93,6 +95,7 @@ class Categorie extends CommonObject
|
||||
7 => 'user',
|
||||
8 => 'bank_line',
|
||||
9 => 'warehouse',
|
||||
10 => 'actioncomm',
|
||||
);
|
||||
|
||||
/**
|
||||
@ -111,6 +114,7 @@ class Categorie extends CommonObject
|
||||
'bank_account' => 'account',
|
||||
'project' => 'project',
|
||||
'warehouse'=> 'warehouse',
|
||||
'actioncomm' => 'actioncomm',
|
||||
);
|
||||
|
||||
/**
|
||||
@ -129,6 +133,7 @@ class Categorie extends CommonObject
|
||||
'bank_account'=> 'account',
|
||||
'project' => 'project',
|
||||
'warehouse'=> 'warehouse',
|
||||
'actioncomm' => 'warehouse',
|
||||
);
|
||||
|
||||
/**
|
||||
@ -147,6 +152,7 @@ class Categorie extends CommonObject
|
||||
'bank_account' => 'Account',
|
||||
'project' => 'Project',
|
||||
'warehouse'=> 'Entrepot',
|
||||
'actioncomm' => 'ActionComm',
|
||||
);
|
||||
|
||||
/**
|
||||
@ -164,6 +170,7 @@ class Categorie extends CommonObject
|
||||
'account' => 'bank_account',
|
||||
'project' => 'projet',
|
||||
'warehouse'=> 'entrepot',
|
||||
'actioncomm' => 'actioncomm',
|
||||
);
|
||||
|
||||
/**
|
||||
@ -214,6 +221,7 @@ class Categorie extends CommonObject
|
||||
* @see Categorie::TYPE_PROJECT
|
||||
* @see Categorie::TYPE_BANK_LINE
|
||||
* @see Categorie::TYPE_WAREHOUSE
|
||||
* @see Categorie::TYPE_ACTIONCOMM
|
||||
*/
|
||||
public $type;
|
||||
|
||||
|
||||
@ -59,7 +59,13 @@ elseif ($type == Categorie::TYPE_ACCOUNT) { $title=$langs->trans("AccountsCate
|
||||
elseif ($type == Categorie::TYPE_PROJECT) { $title=$langs->trans("ProjectsCategoriesArea"); $typetext='project'; }
|
||||
elseif ($type == Categorie::TYPE_USER) { $title=$langs->trans("UsersCategoriesArea"); $typetext='user'; }
|
||||
elseif ($type == Categorie::TYPE_WAREHOUSE) { $title=$langs->trans("StocksCategoriesArea"); $typetext='warehouse'; }
|
||||
else { $title=$langs->trans("CategoriesArea"); $typetext='unknown'; }
|
||||
elseif ($type == Categorie::TYPE_ACTIONCOMM) {
|
||||
$title = $langs->trans("ActionCommCategoriesArea");
|
||||
$typetext = 'actioncomm';
|
||||
} else {
|
||||
$title = $langs->trans("CategoriesArea");
|
||||
$typetext = 'unknown';
|
||||
}
|
||||
|
||||
$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
|
||||
$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
|
||||
|
||||
@ -219,165 +219,206 @@ class modAgenda extends DolibarrModules
|
||||
);
|
||||
$r++;
|
||||
|
||||
$this->menu[$r]=array('fk_menu'=>'r=0',
|
||||
'type'=>'left',
|
||||
'titre'=>'Actions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>100,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=0',
|
||||
'type'=>'left',
|
||||
'titre'=>'Actions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>100,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2,
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'NewAction',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create',
|
||||
'langs'=>'commercial',
|
||||
'position'=>101,
|
||||
'perms'=>'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'NewAction',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create',
|
||||
'langs'=>'commercial',
|
||||
'position'=>101,
|
||||
'perms'=>'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
// Calendar
|
||||
$this->menu[$r]=array('fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'Calendar',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>140,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'Calendar',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>140,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>141,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>141,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>142,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>142,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>143,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>143,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>144,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=3',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>144,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
|
||||
// List
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'List',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>110,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'List',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>110,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>111,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>111,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>112,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>112,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>113,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>113,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r]=array('fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>114,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=8',
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>114,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$user->rights->agenda->allactions->read',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
// Reports
|
||||
$this->menu[$r]=array('fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'Reportings',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>160,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2);
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu'=>'r=1',
|
||||
'type'=>'left',
|
||||
'titre'=>'Reportings',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>160,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
'enabled'=>'$conf->agenda->enabled',
|
||||
'target'=>'',
|
||||
'user'=>2
|
||||
);
|
||||
$r++;
|
||||
// Categories
|
||||
$this->menu[$r]=array(
|
||||
'fk_menu' => 'r=1',
|
||||
'type' => 'left',
|
||||
'titre' => 'Categories',
|
||||
'mainmenu' => 'agenda',
|
||||
'url'=>'/categories/index.php?mainmenu=agenda&leftmenu=agenda&type=10',
|
||||
'langs' => 'agenda',
|
||||
'position' => 170,
|
||||
'perms' => '$user->rights->agenda->allactions->read',
|
||||
'enabled' => '$conf->categorie->enabled&&$conf->categorie->enabled',
|
||||
'target' => '',
|
||||
'user' => 2
|
||||
);
|
||||
$r++;
|
||||
|
||||
|
||||
|
||||
@ -498,3 +498,17 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MO_CANCEL','MO canceled','Executed when a MO is canceled','bom',663);
|
||||
|
||||
ALTER TABLE llx_comment ADD COLUMN fk_user_modif integer DEFAULT NULL;
|
||||
|
||||
CREATE TABLE llx_categorie_actioncomm
|
||||
(
|
||||
fk_categorie integer NOT NULL,
|
||||
fk_actioncomm integer NOT NULL,
|
||||
import_key varchar(14)
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_categorie_actioncomm ADD PRIMARY KEY pk_categorie_actioncomm (fk_categorie, fk_actioncomm);
|
||||
ALTER TABLE llx_categorie_actioncomm ADD INDEX idx_categorie_actioncomm_fk_categorie (fk_categorie);
|
||||
ALTER TABLE llx_categorie_actioncomm ADD INDEX idx_categorie_actioncomm_fk_actioncomm (fk_actioncomm);
|
||||
|
||||
ALTER TABLE llx_categorie_actioncomm ADD CONSTRAINT fk_categorie_actioncomm_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_actioncomm ADD CONSTRAINT fk_categorie_actioncomm_fk_actioncomm FOREIGN KEY (fk_actioncomm) REFERENCES llx_actioncomm (id);
|
||||
|
||||
@ -90,4 +90,5 @@ ShowCategory=Show tag/category
|
||||
ByDefaultInList=By default in list
|
||||
ChooseCategory=Choose category
|
||||
StocksCategoriesArea=Warehouses Categories Area
|
||||
UseOrOperatorForCategories=Use or operator for categories
|
||||
ActionCommCategoriesArea=Events Categories Area
|
||||
UseOrOperatorForCategories=Use or operator for categories
|
||||
|
||||
Loading…
Reference in New Issue
Block a user