30include_once DOL_DOCUMENT_ROOT.
'/core/modules/DolibarrModules.class.php';
53 $this->family =
"ecm";
54 $this->module_position =
'10';
56 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
58 $this->
description =
"Electronic Content Management";
60 $this->version =
'dolibarr';
62 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
64 $this->picto =
'folder-open';
67 $this->dirs = array(
"/ecm/temp");
70 $this->config_page_url = array(
'ecm.php');
73 $this->depends = array();
74 $this->requiredby = array();
77 $this->
const = array();
81 $this->boxes = array();
92 $this->rights_class =
'ecm';
93 $this->rights = array();
96 $this->rights[$r][0] = 2501;
97 $this->rights[$r][1] =
'Read or download documents';
98 $this->rights[$r][2] =
'r';
99 $this->rights[$r][3] = 0;
100 $this->rights[$r][4] =
'read';
103 $this->rights[$r][0] = 2503;
104 $this->rights[$r][1] =
'Upload a document';
105 $this->rights[$r][2] =
'w';
106 $this->rights[$r][3] = 0;
107 $this->rights[$r][4] =
'upload';
110 $this->rights[$r][0] = 2515;
111 $this->rights[$r][1] =
'Administer directories of documents';
112 $this->rights[$r][2] =
'w';
113 $this->rights[$r][3] = 0;
114 $this->rights[$r][4] =
'setup';
119 $this->menu = array();
123 $this->menu[$r] = array(
126 'titre' =>
'MenuECM',
127 'prefix' =>
img_picto(
'', $this->picto,
'class="pictofixedwidth"'),
129 'url' =>
'/ecm/index.php',
132 'perms' =>
'$user->hasRight("ecm", "read") || $user->hasRight("ecm", "upload") || $user->hasRight("ecm", "setup")',
133 'enabled' =>
'isModEnabled("ecm")',
140 $this->menu[$r] = array(
141 'fk_menu' =>
'fk_mainmenu=ecm',
143 'titre' =>
'ECMArea',
144 'prefix' =>
img_picto(
'', $this->picto,
'class="paddingright pictofixedwidth"'),
147 'url' =>
'/ecm/index.php?mainmenu=ecm&leftmenu=ecm',
150 'perms' =>
'$user->hasRight("ecm", "read") || $user->hasRight("ecm", "upload")',
151 'enabled' =>
'$user->hasRight("ecm", "read") || $user->hasRight("ecm", "upload")',
157 $this->menu[$r] = array(
158 'fk_menu' =>
'fk_mainmenu=ecm,fk_leftmenu=ecm',
160 'titre' =>
'ECMSectionsManual',
162 'leftmenu' =>
'ecm_manual',
163 'url' =>
'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
166 'perms' =>
'$user->hasRight("ecm", "read") || $user->hasRight("ecm", "upload")',
167 'enabled' =>
'$user->hasRight("ecm", "read") || $user->hasRight("ecm", "upload")',
173 $this->menu[$r] = array(
174 'fk_menu' =>
'fk_mainmenu=ecm,fk_leftmenu=ecm',
176 'titre' =>
'ECMSectionsAuto',
178 'url' =>
'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
181 'perms' =>
'$user->hasRight("ecm", "read") || $user->hasRight("ecm", "upload")',
182 'enabled' =>
'($user->hasRight("ecm", "read") || $user->hasRight("ecm", "upload")) && !getDolGlobalInt("ECM_AUTO_TREE_HIDEN")',
188 $this->menu[$r] = array(
189 'fk_menu' =>
'fk_mainmenu=ecm,fk_leftmenu=ecm',
191 'titre' =>
'ECMSectionsMedias',
193 'url' =>
'/ecm/index_medias.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
196 'perms' =>
'$user->hasRight("ecm", "read") || $user->hasRight("ecm", "upload")',
197 'enabled' =>
'($user->hasRight("ecm", "read") || $user->hasRight("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, $allowothertags=array())
Show picto whatever it's its name (generic function)
$conf db name
Only used if Module[ID]Name translation string is not found.