Look and feel v13
This commit is contained in:
parent
198b8d8d2b
commit
f5eb8b0108
@ -44,7 +44,7 @@ TicketTypeShortOTHER=Other
|
||||
TicketSeverityShortLOW=Low
|
||||
TicketSeverityShortNORMAL=Normal
|
||||
TicketSeverityShortHIGH=High
|
||||
TicketSeverityShortBLOCKING=Critical/Blocking
|
||||
TicketSeverityShortBLOCKING=Critical, Blocking
|
||||
|
||||
ErrorBadEmailAddress=Field '%s' incorrect
|
||||
MenuTicketMyAssign=My tickets
|
||||
|
||||
@ -1472,7 +1472,7 @@ class Societe extends CommonObject
|
||||
|
||||
if (empty($rowid) && empty($ref) && empty($ref_ext) && empty($barcode) && empty($idprof1) && empty($idprof2) && empty($idprof3) && empty($idprof4) && empty($idprof5) && empty($idprof6) && empty($email)) return -1;
|
||||
|
||||
$sql = 'SELECT s.rowid, s.nom as name, s.name_alias, s.entity, s.ref_ext, s.ref_int, s.address, s.datec as date_creation, s.prefix_comm';
|
||||
$sql = 'SELECT s.rowid, s.nom as name, s.name_alias, s.entity, s.ref_ext, s.address, s.datec as date_creation, s.prefix_comm';
|
||||
$sql .= ', s.status';
|
||||
$sql .= ', s.price_level';
|
||||
$sql .= ', s.tms as date_modification, s.fk_user_creat, s.fk_user_modif';
|
||||
@ -1546,7 +1546,6 @@ class Societe extends CommonObject
|
||||
$this->nom = $obj->name; // deprecated
|
||||
$this->name_alias = $obj->name_alias;
|
||||
$this->ref_ext = $obj->ref_ext;
|
||||
$this->ref_int = $obj->ref_int;
|
||||
|
||||
$this->date_creation = $this->db->jdate($obj->date_creation);
|
||||
$this->date_modification = $this->db->jdate($obj->date_modification);
|
||||
|
||||
@ -228,9 +228,9 @@ class Ticket extends CommonObject
|
||||
'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'),
|
||||
'origin_email' => array('type'=>'mail', 'label'=>'OriginEmail', 'visible'=>-2, 'enabled'=>1, 'position'=>16, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'css'=>'tdoverflowmax150'),
|
||||
'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth200', 'autofocusoncreate'=>1),
|
||||
'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth150'),
|
||||
'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth150 tdoverflowmax50'),
|
||||
'category_code' => array('type'=>'varchar(32)', 'label'=>'TicketCategory', 'visible'=>-1, 'enabled'=>1, 'position'=>21, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'),
|
||||
'severity_code' => array('type'=>'varchar(32)', 'label'=>'Severity', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'),
|
||||
'severity_code' => array('type'=>'varchar(32)', 'label'=>'Severity', 'visible'=>1, 'enabled'=>1, 'position'=>22, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'),
|
||||
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty", 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'),
|
||||
'notify_tiers_at_create' => array('type'=>'integer', 'label'=>'NotifyThirdparty', 'visible'=>-1, 'enabled'=>0, 'position'=>51, 'notnull'=>1, 'index'=>1),
|
||||
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php', 'label'=>'Project', 'visible'=>-1, 'enabled'=>1, 'position'=>52, 'notnull'=>-1, 'index'=>1, 'help'=>"LinkToProject"),
|
||||
|
||||
@ -721,6 +721,7 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co
|
||||
// --------------------------------------------------------------------
|
||||
$i = 0;
|
||||
$totalarray = array();
|
||||
$cacheofoutputfield = array();
|
||||
while ($i < min($num, $limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
@ -753,9 +754,14 @@ while ($i < min($num, $limit))
|
||||
if ($cssforfield || $val['css']) print '"';
|
||||
print '>';
|
||||
if ($key == 'fk_statut') print $object->getLibStatut(5);
|
||||
elseif ($key == 'type_code') {
|
||||
$s = $langs->getLabelFromKey($db, 'TicketTypeShort' . $object->type_code, 'c_ticket_type', 'code', 'label', $object->type_code);
|
||||
print '<span title="'.$s.'">';
|
||||
print $s;
|
||||
print '</span>';
|
||||
}
|
||||
elseif ($key == 'category_code') print $langs->getLabelFromKey($db, 'TicketCategoryShort' . $object->category_code, 'c_ticket_category', 'code', 'label', $object->category_code);
|
||||
elseif ($key == 'severity_code') print $langs->getLabelFromKey($db, 'TicketSeverityShort' . $object->severity_code, 'c_ticket_severity', 'code', 'label', $object->severity_code);
|
||||
elseif ($key == 'type_code') print $langs->getLabelFromKey($db, 'TicketTypeShort' . $object->type_code, 'c_ticket_type', 'code', 'label', $object->type_code);
|
||||
elseif ($key == 'tms') print dol_print_date($db->jdate($obj->$key), 'dayhour', 'tzuser');
|
||||
elseif ($key == 'fk_user_create') {
|
||||
if ($object->fk_user_create > 0) {
|
||||
@ -763,7 +769,23 @@ while ($i < min($num, $limit))
|
||||
print $user_create->getNomUrl(-1);
|
||||
}
|
||||
} elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) print $object->showOutputField($val, $key, $db->jdate($obj->$key), '');
|
||||
else print $object->showOutputField($val, $key, $obj->$key, '');
|
||||
else { // Example: key=fk_soc, obj->key=123 val=array('type'=>'integer', ...
|
||||
$tmp = explode(':', $val['type']);
|
||||
if ($tmp[0] == 'integer' && !empty($tmp[1]) && class_exists($tmp[1])) {
|
||||
// It is a type of an foreign field. We will try to reduce the number of fetch that the showOutputField is making.
|
||||
//var_dump('eeee-'.$key.'-'.$obj->$key.'-'.$val['type']);
|
||||
if ($key && $obj->$key && $val['type'] && array_key_exists($key.'-'.$obj->$key.'-'.$val['type'], $cacheofoutputfield)) {
|
||||
$result = $cacheofoutputfield[$key.'-'.$obj->$key.'-'.$val['type']];
|
||||
} else {
|
||||
$result = $object->showOutputField($val, $key, $obj->$key, '');
|
||||
$cacheofoutputfield[$key.'-'.$obj->$key.'-'.$val['type']] = $result;
|
||||
}
|
||||
} else {
|
||||
$result = $object->showOutputField($val, $key, $obj->$key, '');
|
||||
}
|
||||
print $result;
|
||||
}
|
||||
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
if (!empty($val['isameasure']))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user