28include_once DOL_DOCUMENT_ROOT.
'/core/modules/DolibarrModules.class.php';
51 $this->family =
"ecm";
52 $this->module_position =
'10';
54 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
56 $this->
description =
"Electronic Content Management";
58 $this->version =
'dolibarr';
60 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
62 $this->picto =
'folder-open';
65 $this->dirs = array(
"/ecm/temp");
68 $this->config_page_url = array(
'ecm.php');
71 $this->depends = array();
72 $this->requiredby = array();
75 $this->
const = array();
79 $this->boxes = array();
90 $this->rights_class =
'ecm';
91 $this->rights = array();
94 $this->rights[$r][0] = 2501;
95 $this->rights[$r][1] =
'Read or download documents';
96 $this->rights[$r][2] =
'r';
97 $this->rights[$r][3] = 0;
98 $this->rights[$r][4] =
'read';
101 $this->rights[$r][0] = 2503;
102 $this->rights[$r][1] =
'Upload a document';
103 $this->rights[$r][2] =
'w';
104 $this->rights[$r][3] = 0;
105 $this->rights[$r][4] =
'upload';
108 $this->rights[$r][0] = 2515;
109 $this->rights[$r][1] =
'Administer directories of documents';
110 $this->rights[$r][2] =
'w';
111 $this->rights[$r][3] = 0;
112 $this->rights[$r][4] =
'setup';
117 $this->menu = array();
121 $this->menu[$r] = array(
125 'prefix' =>
img_picto(
'', $this->picto,
'class="pictofixedwidth"'),
127 'url'=>
'/ecm/index.php',
130 'perms'=>
'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup',
131 'enabled'=>
'isModEnabled("ecm")',
138 $this->menu[$r] = array(
139 'fk_menu'=>
'fk_mainmenu=ecm',
142 'prefix' =>
img_picto(
'', $this->picto,
'class="paddingright pictofixedwidth"'),
145 'url'=>
'/ecm/index.php?mainmenu=ecm&leftmenu=ecm',
148 'perms'=>
'$user->rights->ecm->read || $user->rights->ecm->upload',
149 'enabled'=>
'$user->rights->ecm->read || $user->rights->ecm->upload',
155 $this->menu[$r] = array(
156 'fk_menu'=>
'fk_mainmenu=ecm,fk_leftmenu=ecm',
158 'titre'=>
'ECMSectionsManual',
160 'leftmenu'=>
'ecm_manual',
161 'url'=>
'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
164 'perms'=>
'$user->rights->ecm->read || $user->rights->ecm->upload',
165 'enabled'=>
'$user->rights->ecm->read || $user->rights->ecm->upload',
171 $this->menu[$r] = array(
172 'fk_menu'=>
'fk_mainmenu=ecm,fk_leftmenu=ecm',
174 'titre'=>
'ECMSectionsAuto',
176 'url'=>
'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
179 'perms'=>
'$user->rights->ecm->read || $user->rights->ecm->upload',
180 'enabled'=>
'($user->rights->ecm->read || $user->rights->ecm->upload) && !getDolGlobalInt("ECM_AUTO_TREE_HIDEN")',
186 $this->menu[$r] = array(
187 'fk_menu'=>
'fk_mainmenu=ecm,fk_leftmenu=ecm',
189 'titre'=>
'ECMSectionsMedias',
191 'url'=>
'/ecm/index_medias.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
194 'perms'=>
'$user->rights->ecm->read || $user->rights->ecm->upload',
195 '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=false, $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.