From 46f41681ff6619c35e60e118804307dca4cdaba9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Apr 2021 15:55:28 +0200 Subject: [PATCH] Debug --- .../class/knowledgerecord.class.php | 10 +++++----- .../knowledgerecord_card.php | 2 +- ...nowledgemanagement_knowledgerecord.lib.php | 2 +- htdocs/langs/en_US/knowledgemanagement.lang | 20 +++++++++---------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/htdocs/knowledgemanagement/class/knowledgerecord.class.php b/htdocs/knowledgemanagement/class/knowledgerecord.class.php index 1f52d9396fd..2dba1581d9e 100644 --- a/htdocs/knowledgemanagement/class/knowledgerecord.class.php +++ b/htdocs/knowledgemanagement/class/knowledgerecord.class.php @@ -111,8 +111,8 @@ class KnowledgeRecord extends CommonObject 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,), 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,), 'question' => array('type'=>'text', 'label'=>'Question', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1,), - 'answer' => array('type'=>'html', 'label'=>'Answer', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>-1,), - 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>0, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Brouillon', '1'=>'Actif'),), + 'answer' => array('type'=>'html', 'label'=>'Solution', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>-1,), + 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'default'=>0, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Valid'),), ); public $rowid; public $ref; @@ -812,15 +812,15 @@ class KnowledgeRecord extends CommonObject global $langs; //$langs->load("knowledgemanagement"); $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Validated'); $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled'); $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Validated'); $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Disabled'); } $statusType = 'status'.$status; - //if ($status == self::STATUS_VALIDATED) $statusType = 'status1'; + if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; if ($status == self::STATUS_CANCELED) { $statusType = 'status6'; } diff --git a/htdocs/knowledgemanagement/knowledgerecord_card.php b/htdocs/knowledgemanagement/knowledgerecord_card.php index 071a6417b0b..5cd42d3fb93 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_card.php +++ b/htdocs/knowledgemanagement/knowledgerecord_card.php @@ -467,7 +467,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Validate if ($object->status == $object::STATUS_DRAFT) { if ((empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) && $permissiontoreply) { - print dolGetButtonAction($langs->trans('Reply'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes', '', $permissiontoadd); + print dolGetButtonAction($langs->trans('ValidateReply'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes', '', $permissiontoadd); } else { $langs->load("errors"); //print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes', '', 0); diff --git a/htdocs/knowledgemanagement/lib/knowledgemanagement_knowledgerecord.lib.php b/htdocs/knowledgemanagement/lib/knowledgemanagement_knowledgerecord.lib.php index ce1a831fff7..1da21a3e413 100644 --- a/htdocs/knowledgemanagement/lib/knowledgemanagement_knowledgerecord.lib.php +++ b/htdocs/knowledgemanagement/lib/knowledgemanagement_knowledgerecord.lib.php @@ -37,7 +37,7 @@ function knowledgerecordPrepareHead($object) $head = array(); $head[$h][0] = dol_buildpath("/knowledgemanagement/knowledgerecord_card.php", 1).'?id='.$object->id; - $head[$h][1] = $langs->trans("Card"); + $head[$h][1] = $langs->trans("KnowledgeRecord"); $head[$h][2] = 'card'; $h++; diff --git a/htdocs/langs/en_US/knowledgemanagement.lang b/htdocs/langs/en_US/knowledgemanagement.lang index 91df84c01a4..633014722a7 100644 --- a/htdocs/langs/en_US/knowledgemanagement.lang +++ b/htdocs/langs/en_US/knowledgemanagement.lang @@ -18,16 +18,16 @@ # # Module label 'ModuleKnowledgeManagementName' -ModuleKnowledgeManagementName = Knowledge Management +ModuleKnowledgeManagementName = Knowledge Management System # Module description 'ModuleKnowledgeManagementDesc' -ModuleKnowledgeManagementDesc = Knowledge Management description +ModuleKnowledgeManagementDesc = Manage a Knowledge Management database # # Admin page # -KnowledgeManagementSetup = Knowledge Management setup +KnowledgeManagementSetup = Knowledge Management System setup Settings = Settings -KnowledgeManagementSetupPage = Knowledge Management setup page +KnowledgeManagementSetupPage = Knowledge Management System setup page # @@ -46,10 +46,10 @@ KnowledgeManagementArea = Knowledge Management # # Menu # -MenuKnowledgeRecord = Knowledge records +MenuKnowledgeRecord = Knowledge ListKnowledgeRecord = List -NewKnowledgeRecord = New knowledge record -Reply = Reply -KnowledgeRecords = knowledge record -KnowledgeRecord = knowledge record -KnowledgeRecordExtraFields = Extrafields for Knowledge Records \ No newline at end of file +NewKnowledgeRecord = New knowledge +ValidateReply = Validate solution +KnowledgeRecords = Knowledges +KnowledgeRecord = Knowledge +KnowledgeRecordExtraFields = Extrafields for Knowledge record