From 85228fd8e78209a70a6f0147b139a6f698a119c6 Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Tue, 26 Aug 2014 11:50:02 +0200 Subject: [PATCH] add support in admin --- htdocs/core/lib/fichinter.lib.php | 5 +++++ htdocs/fichinter/class/fichinter.class.php | 5 ++++- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 12 ++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php index 01d79cdcabe..cb30a202513 100644 --- a/htdocs/core/lib/fichinter.lib.php +++ b/htdocs/core/lib/fichinter.lib.php @@ -126,6 +126,11 @@ function fichinter_admin_prepare_head() $head[$h][2] = 'attributes'; $h++; + $head[$h][0] = DOL_URL_ROOT.'/fichinter/admin/fichinterdet_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFields"); + $head[$h][2] = 'attributesdet'; + $h++; + complete_head_from_modules($conf,$langs,null,$head,$h,'fichinter_admin','remove'); diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index cb4f178b840..a62cefe32bf 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -987,7 +987,10 @@ class FichinterLigne extends CommonObjectLine var $duration; // Duree de l'intervention var $rang = 0; - + public $element='fichinterdet'; + public $table_element='fichinterdet'; + public $fk_element='fk_fichinter'; + /** * Constructor * diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index 40dd7b62f44..dea3955ce52 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -991,3 +991,15 @@ ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_element (fk_element); ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_task (fk_task); ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_date (task_date); ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_datehour (task_datehour); + + +-- add extrafield on ficheinter lines +CREATE TABLE IF NOT EXISTS `llx_fichinterdet_extrafields` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `fk_object` int(11) NOT NULL, + `import_key` varchar(14) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_ficheinter_extrafields` (`fk_object`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; +