Merge branch 'ent-10660-update-journal-usar-las-opciones-de-visual-styles' into 'develop'
Ent 10660 update journal usar las opciones de visual styles See merge request artica/pandorafms!5798
This commit is contained in:
commit
b3d098794d
|
@ -129,19 +129,67 @@ if ($method === 'draw') {
|
||||||
$count = db_get_value('count(*)', '('.$sql.') t');
|
$count = db_get_value('count(*)', '('.$sql.') t');
|
||||||
|
|
||||||
if ($data) {
|
if ($data) {
|
||||||
$data = array_reduce(
|
if ($config['prominent_time'] === 'timestamp') {
|
||||||
$data,
|
$data = array_reduce(
|
||||||
function ($carry, $item) {
|
$data,
|
||||||
// Transforms array of arrays $data into an array
|
function ($carry, $item) {
|
||||||
// of objects, making a post-process of certain fields.
|
// Transforms array of arrays $data into an array
|
||||||
$tmp = (object) $item;
|
// of objects, making a post-process of certain fields.
|
||||||
|
$tmp = (object) $item;
|
||||||
|
date_default_timezone_set($user_timezone);
|
||||||
|
$title = human_time_comparation($tmp->utimestamp);
|
||||||
|
$tmp->utimestamp = '<span title="'.$title.'">'.modules_format_timestamp($tmp->utimestamp).'</span>';
|
||||||
|
|
||||||
$tmp->utimestamp = human_time_comparation($tmp->utimestamp);
|
$carry[] = $tmp;
|
||||||
|
return $carry;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else if ($config['prominent_time'] === 'comparation') {
|
||||||
|
$data = array_reduce(
|
||||||
|
$data,
|
||||||
|
function ($carry, $item) {
|
||||||
|
// Transforms array of arrays $data into an array
|
||||||
|
// of objects, making a post-process of certain fields.
|
||||||
|
$tmp = (object) $item;
|
||||||
|
date_default_timezone_set($user_timezone);
|
||||||
|
$title = modules_format_timestamp($tmp->utimestamp);
|
||||||
|
$tmp->utimestamp = '<span title="'.$title.'">'.human_time_comparation($tmp->utimestamp).'</span>';
|
||||||
|
|
||||||
$carry[] = $tmp;
|
$carry[] = $tmp;
|
||||||
return $carry;
|
return $carry;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
} else if ($config['prominent_time'] === 'compact') {
|
||||||
|
$data = array_reduce(
|
||||||
|
$data,
|
||||||
|
function ($carry, $item) {
|
||||||
|
// Transforms array of arrays $data into an array
|
||||||
|
// of objects, making a post-process of certain fields.
|
||||||
|
$tmp = (object) $item;
|
||||||
|
date_default_timezone_set($user_timezone);
|
||||||
|
$title = modules_format_timestamp($tmp->utimestamp);
|
||||||
|
$tmp->utimestamp = '<span title="'.$title.'">'.human_time_comparation($tmp->utimestamp, 'tiny').'</span>';
|
||||||
|
|
||||||
|
$carry[] = $tmp;
|
||||||
|
return $carry;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$data = array_reduce(
|
||||||
|
$data,
|
||||||
|
function ($carry, $item) {
|
||||||
|
// Transforms array of arrays $data into an array
|
||||||
|
// of objects, making a post-process of certain fields.
|
||||||
|
$tmp = (object) $item;
|
||||||
|
date_default_timezone_set($user_timezone);
|
||||||
|
$title = modules_format_timestamp($tmp->utimestamp);
|
||||||
|
$tmp->utimestamp = '<span title="'.$title.'">'.human_time_comparation($tmp->utimestamp).'</span>';
|
||||||
|
|
||||||
|
$carry[] = $tmp;
|
||||||
|
return $carry;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Datatables format: RecordsTotal && recordsfiltered.
|
// Datatables format: RecordsTotal && recordsfiltered.
|
||||||
|
|
Loading…
Reference in New Issue