26include_once DOL_DOCUMENT_ROOT.
'/core/modules/DolibarrModules.class.php';
50 $this->family =
"ecm";
51 $this->module_position =
'10';
53 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
55 $this->
description =
"Electronic Content Management";
57 $this->version =
'dolibarr';
59 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
61 $this->picto =
'folder-open';
64 $this->dirs = array(
"/ecm/temp");
67 $this->config_page_url = array(
'ecm.php');
70 $this->depends = array();
71 $this->requiredby = array();
74 $this->
const = array();
78 $this->boxes = array();
89 $this->rights_class =
'ecm';
90 $this->rights = array();
93 $this->rights[$r][0] = 2501;
94 $this->rights[$r][1] =
'Read or download documents';
95 $this->rights[$r][2] =
'r';
96 $this->rights[$r][3] = 0;
97 $this->rights[$r][4] =
'read';
100 $this->rights[$r][0] = 2503;
101 $this->rights[$r][1] =
'Upload a document';
102 $this->rights[$r][2] =
'w';
103 $this->rights[$r][3] = 0;
104 $this->rights[$r][4] =
'upload';
107 $this->rights[$r][0] = 2515;
108 $this->rights[$r][1] =
'Administer directories of documents';
109 $this->rights[$r][2] =
'w';
110 $this->rights[$r][3] = 0;
111 $this->rights[$r][4] =
'setup';
116 $this->menu = array();
120 $this->menu[$r] = array(
124 'prefix' =>
img_picto(
'', $this->picto,
'class="paddingright pictofixedwidth"'),
126 'url'=>
'/ecm/index.php',
129 'perms'=>
'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup',
130 'enabled'=>
'isModEnabled("ecm")',
137 $this->menu[$r] = array(
138 'fk_menu'=>
'fk_mainmenu=ecm',
141 'prefix' =>
img_picto(
'', $this->picto,
'class="paddingright pictofixedwidth"'),
144 'url'=>
'/ecm/index.php?mainmenu=ecm&leftmenu=ecm',
147 'perms'=>
'$user->rights->ecm->read || $user->rights->ecm->upload',
148 'enabled'=>
'$user->rights->ecm->read || $user->rights->ecm->upload',
154 $this->menu[$r] = array(
155 'fk_menu'=>
'fk_mainmenu=ecm,fk_leftmenu=ecm',
157 'titre'=>
'ECMSectionsManual',
159 'leftmenu'=>
'ecm_manual',
160 'url'=>
'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
163 'perms'=>
'$user->rights->ecm->read || $user->rights->ecm->upload',
164 'enabled'=>
'$user->rights->ecm->read || $user->rights->ecm->upload',
170 $this->menu[$r] = array(
171 'fk_menu'=>
'fk_mainmenu=ecm,fk_leftmenu=ecm',
173 'titre'=>
'ECMSectionsAuto',
175 'url'=>
'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
178 'perms'=>
'$user->rights->ecm->read || $user->rights->ecm->upload',
179 'enabled'=>
'($user->rights->ecm->read || $user->rights->ecm->upload) && !getDolGlobalInt("ECM_AUTO_TREE_HIDEN")',
185 $this->menu[$r] = array(
186 'fk_menu'=>
'fk_mainmenu=ecm,fk_leftmenu=ecm',
188 'titre'=>
'ECMSectionsMedias',
190 'url'=>
'/ecm/index_medias.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
193 'perms'=>
'$user->rights->ecm->read || $user->rights->ecm->upload',
194 '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.