Look and feel v17
This commit is contained in:
parent
a52de14003
commit
dde7f6f655
@ -1820,7 +1820,7 @@ function dol_fiche_head($links = array(), $active = '0', $title = '', $notab = 0
|
||||
* @param array $links Array of tabs. Note that label into $links[$i][1] must be already HTML escaped.
|
||||
* @param string $active Active tab name
|
||||
* @param string $title Title
|
||||
* @param int $notab -1 or 0=Add tab header, 1=no tab header (if you set this to 1, using print dol_get_fiche_end() to close tab is not required), -2=Add tab header with no seaparation under tab (to start a tab just after)
|
||||
* @param int $notab -1 or 0=Add tab header, 1=no tab header (if you set this to 1, using print dol_get_fiche_end() to close tab is not required), -2=Add tab header with no seaparation under tab (to start a tab just after), -3=-2+'noborderbottom'
|
||||
* @param string $picto Add a picto on tab title
|
||||
* @param int $pictoisfullpath If 1, image path is a full path. If you set this to 1, you can use url returned by dol_buildpath('/mymodyle/img/myimg.png',1) for $picto.
|
||||
* @param string $morehtmlright Add more html content on right of tabs title
|
||||
@ -1994,8 +1994,8 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
|
||||
$out .= "</div>\n";
|
||||
}
|
||||
|
||||
if (!$notab || $notab == -1 || $notab == -2) {
|
||||
$out .= "\n".'<div class="tabBar'.($notab == -1 ? '' : ($notab == -2 ? ' tabBarNoTop' : ' tabBarWithBottom')).'">'."\n";
|
||||
if (!$notab || $notab == -1 || $notab == -2 || $notab == -3) {
|
||||
$out .= "\n".'<div class="tabBar'.($notab == -1 ? '' : ($notab == -2 ? ' tabBarNoTop' : (($notab == -3 ? ' noborderbottom' : '').' tabBarWithBottom'))).'">'."\n";
|
||||
}
|
||||
|
||||
$parameters = array('tabname' => $active, 'out' => $out);
|
||||
|
||||
@ -35,7 +35,7 @@ if (empty($conf) || !is_object($conf)) {
|
||||
$object->fields = dol_sort_array($object->fields, 'position');
|
||||
|
||||
foreach ($object->fields as $key => $val) {
|
||||
// Discard if extrafield is a hidden field on form
|
||||
// Discard if field is a hidden field on form
|
||||
if (abs($val['visible']) != 1 && abs($val['visible']) != 3) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -105,7 +105,6 @@ class KnowledgeRecord extends CommonObject
|
||||
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>20, 'index'=>1),
|
||||
'question' => array('type'=>'text', 'label'=>'Question', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'csslist'=>'tdoverflowmax300', 'copytoclipboard'=>1, 'tdcss'=>'titlefieldcreate nowraponall'),
|
||||
'lang' => array('type'=>'varchar(6)', 'label'=>'Language', 'enabled'=>'1', 'position'=>40, 'notnull'=>0, 'visible'=>1, 'tdcss'=>'titlefieldcreate nowraponall', "csslist"=>"tdoverflowmax100"),
|
||||
'answer' => array('type'=>'html', 'label'=>'Solution', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>3, 'csslist'=>'tdoverflowmax300', 'copytoclipboard'=>1, 'tdcss'=>'titlefieldcreate nowraponall'),
|
||||
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
|
||||
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>2,),
|
||||
'last_main_doc' => array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>'1', 'position'=>600, 'notnull'=>0, 'visible'=>0,),
|
||||
@ -115,7 +114,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,),
|
||||
//'url' => array('type'=>'varchar(255)', 'label'=>'URL', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1, 'csslist'=>'tdoverflow200', 'help'=>'UrlForInfoPage'),
|
||||
'fk_c_ticket_category' => array('type'=>'integer:CTicketCategory:ticket/class/cticketcategory.class.php:0:(t.active:=:1):pos', 'label'=>'SuggestedForTicketsInGroup', 'enabled'=>'$conf->ticket->enabled', 'position'=>512, 'notnull'=>0, 'visible'=>-1, 'help'=>'YouCanLinkArticleToATicketCategory', 'csslist'=>'minwidth200 tdoverflowmax250'),
|
||||
'fk_c_ticket_category' => array('type'=>'integer:CTicketCategory:ticket/class/cticketcategory.class.php:0:(t.active:=:1):pos', 'label'=>'SuggestedForTicketsInGroup', 'enabled'=>'$conf->ticket->enabled', 'position'=>520, 'notnull'=>0, 'visible'=>-1, 'help'=>'YouCanLinkArticleToATicketCategory', 'csslist'=>'minwidth200 tdoverflowmax250'),
|
||||
'answer' => array('type'=>'html', 'label'=>'Solution', 'enabled'=>'1', 'position'=>600, 'notnull'=>0, 'visible'=>3, 'csslist'=>'tdoverflowmax300', 'copytoclipboard'=>1, 'tdcss'=>'titlefieldcreate nowraponall'),
|
||||
'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>5, 'default'=>0, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '9'=>'Obsolete'),),
|
||||
);
|
||||
public $rowid;
|
||||
|
||||
@ -182,12 +182,14 @@ if ($action == 'create') {
|
||||
print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
|
||||
}
|
||||
|
||||
print dol_get_fiche_head(array(), '');
|
||||
print dol_get_fiche_head(array(), '', '', -3);
|
||||
|
||||
print '<table class="border centpercent tableforfieldcreate">'."\n";
|
||||
|
||||
// Common attributes
|
||||
$object->fields['answer']['enabled'] = 0;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php';
|
||||
$object->fields['answer']['enabled'] = 1;
|
||||
|
||||
if (isModEnabled('categorie')) {
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_KNOWLEDGEMANAGEMENT, '', 'parent', 64, 0, 1);
|
||||
@ -205,6 +207,14 @@ if ($action == 'create') {
|
||||
|
||||
print '</table>'."\n";
|
||||
|
||||
// Add field answer
|
||||
print '<br>';
|
||||
print $langs->trans($object->fields['answer']['label']).'<br>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('answer', $object->answer, '', 200, 'dolibarr_notes', 'In', true, 0, true, ROWS_9, '100%');
|
||||
$out = $doleditor->Create(1);
|
||||
print $out;
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print $form->buttonsSaveCancel('Create');
|
||||
@ -229,12 +239,14 @@ if (($id || $ref) && $action == 'edit') {
|
||||
print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
|
||||
}
|
||||
|
||||
print dol_get_fiche_head();
|
||||
print dol_get_fiche_head(array(), '', '', -3);
|
||||
|
||||
print '<table class="border centpercent tableforfieldedit">'."\n";
|
||||
|
||||
// Common attributes
|
||||
$object->fields['answer']['enabled'] = 0;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
|
||||
$object->fields['answer']['enabled'] = 1;
|
||||
|
||||
if (isModEnabled('categorie')) {
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_KNOWLEDGEMANAGEMENT, '', 'parent', 64, 0, 1);
|
||||
@ -260,6 +272,14 @@ if (($id || $ref) && $action == 'edit') {
|
||||
|
||||
print '</table>';
|
||||
|
||||
// Add field answer
|
||||
print '<br>';
|
||||
print $langs->trans($object->fields['answer']['label']).'<br>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('answer', $object->answer, '', 200, 'dolibarr_notes', 'In', true, 0, true, ROWS_9, '100%');
|
||||
$out = $doleditor->Create(1);
|
||||
print $out;
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print $form->buttonsSaveCancel();
|
||||
@ -408,11 +428,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$keyforbreak='fk_c_ticket_category'; // We change column just before this field
|
||||
//unset($object->fields['fk_project']); // Hide field already shown in banner
|
||||
//unset($object->fields['fk_soc']); // Hide field already shown in banner
|
||||
$object->fields['answer']['enabled'] = 0;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
|
||||
$object->fields['answer']['enabled'] = 1;
|
||||
|
||||
// Categories
|
||||
if (isModEnabled('categorie')) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($object->id, Categorie::TYPE_KNOWLEDGEMANAGEMENT, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
@ -421,11 +443,20 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
// Add field answer
|
||||
print '<br>';
|
||||
print $langs->trans($object->fields['answer']['label']).'<br>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('answer', $object->answer, '', 200, 'dolibarr_notes', 'In', true, 0, true, ROWS_9, '100%', 1);
|
||||
$out = $doleditor->Create(1);
|
||||
print $out;
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
|
||||
|
||||
@ -5606,8 +5606,12 @@ a.cke_dialog_ui_button
|
||||
}
|
||||
.cke_dialog_ui_hbox_last
|
||||
{
|
||||
vertical-align: bottom ! important;
|
||||
vertical-align: bottom !important;
|
||||
}
|
||||
.cke_dialog_ui_hbox_first {
|
||||
vertical-align: middle !important;
|
||||
}
|
||||
|
||||
/*
|
||||
.cke_editable
|
||||
{
|
||||
|
||||
@ -5448,7 +5448,11 @@ a.cke_dialog_ui_button
|
||||
}
|
||||
.cke_dialog_ui_hbox_last
|
||||
{
|
||||
vertical-align: bottom ! important;
|
||||
vertical-align: bottom !important;
|
||||
}
|
||||
.cke_dialog_ui_hbox_last
|
||||
{
|
||||
vertical-align: bottom !important;
|
||||
}
|
||||
/*
|
||||
.cke_editable
|
||||
|
||||
Loading…
Reference in New Issue
Block a user