This commit is contained in:
Laurent Destailleur 2021-04-30 15:55:28 +02:00
parent 79133d1205
commit 46f41681ff
4 changed files with 17 additions and 17 deletions

View File

@ -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';
}

View File

@ -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);

View File

@ -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++;

View File

@ -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
NewKnowledgeRecord = New knowledge
ValidateReply = Validate solution
KnowledgeRecords = Knowledges
KnowledgeRecord = Knowledge
KnowledgeRecordExtraFields = Extrafields for Knowledge record