29include_once DOL_DOCUMENT_ROOT.
'/core/modules/DolibarrModules.class.php';
52 $this->family =
"ecm";
53 $this->module_position =
'10';
55 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
57 $this->
description =
"Electronic Content Management";
59 $this->version =
'dolibarr';
61 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
63 $this->picto =
'folder-open';
66 $this->dirs = array(
"/ecm/temp");
69 $this->config_page_url = array(
'ecm.php');
72 $this->depends = array();
73 $this->requiredby = array();
76 $this->
const = array();
80 $this->boxes = array();
91 $this->rights_class =
'ecm';
92 $this->rights = array();
95 $this->rights[$r][0] = 2501;
96 $this->rights[$r][1] =
'Read or download documents';
97 $this->rights[$r][2] =
'r';
98 $this->rights[$r][3] = 0;
99 $this->rights[$r][4] =
'read';
102 $this->rights[$r][0] = 2503;
103 $this->rights[$r][1] =
'Upload a document';
104 $this->rights[$r][2] =
'w';
105 $this->rights[$r][3] = 0;
106 $this->rights[$r][4] =
'upload';
109 $this->rights[$r][0] = 2515;
110 $this->rights[$r][1] =
'Administer directories of documents';
111 $this->rights[$r][2] =
'w';
112 $this->rights[$r][3] = 0;
113 $this->rights[$r][4] =
'setup';
118 $this->menu = array();
122 $this->menu[$r] = array(
125 'titre' =>
'MenuECM',
126 'prefix' =>
img_picto(
'', $this->picto,
'class="pictofixedwidth"'),
128 'url' =>
'/ecm/index.php',
131 'perms' =>
'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup',
132 'enabled' =>
'isModEnabled("ecm")',
139 $this->menu[$r] = array(
140 'fk_menu' =>
'fk_mainmenu=ecm',
142 'titre' =>
'ECMArea',
143 'prefix' =>
img_picto(
'', $this->picto,
'class="paddingright pictofixedwidth"'),
146 'url' =>
'/ecm/index.php?mainmenu=ecm&leftmenu=ecm',
149 'perms' =>
'$user->rights->ecm->read || $user->rights->ecm->upload',
150 'enabled' =>
'$user->rights->ecm->read || $user->rights->ecm->upload',
156 $this->menu[$r] = array(
157 'fk_menu' =>
'fk_mainmenu=ecm,fk_leftmenu=ecm',
159 'titre' =>
'ECMSectionsManual',
161 'leftmenu' =>
'ecm_manual',
162 'url' =>
'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
165 'perms' =>
'$user->rights->ecm->read || $user->rights->ecm->upload',
166 'enabled' =>
'$user->rights->ecm->read || $user->rights->ecm->upload',
172 $this->menu[$r] = array(
173 'fk_menu' =>
'fk_mainmenu=ecm,fk_leftmenu=ecm',
175 'titre' =>
'ECMSectionsAuto',
177 'url' =>
'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
180 'perms' =>
'$user->rights->ecm->read || $user->rights->ecm->upload',
181 'enabled' =>
'($user->rights->ecm->read || $user->rights->ecm->upload) && !getDolGlobalInt("ECM_AUTO_TREE_HIDEN")',
187 $this->menu[$r] = array(
188 'fk_menu' =>
'fk_mainmenu=ecm,fk_leftmenu=ecm',
190 'titre' =>
'ECMSectionsMedias',
192 'url' =>
'/ecm/index_medias.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
195 'perms' =>
'$user->rights->ecm->read || $user->rights->ecm->upload',
196 'enabled' =>
'($user->rights->ecm->read || $user->rights->ecm->upload) && getDolGlobalInt("MAIN_FEATURES_LEVEL") == 2',
Description and activation class for module ECM.
__construct($db)
Constructor.
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
$conf db name
Only used if Module[ID]Name translation string is not found.