mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Merge branch 'ent-12566-mejoras-en-visualizacion-de-eventos' into 'develop'
Draft: Ent 12566 Mejoras en visualización de eventos See merge request artica/pandorafms!6735
This commit is contained in:
commit
e71a104e74
@ -6462,7 +6462,12 @@ function event_print_graph(
|
||||
$color[] = '#82b92f';
|
||||
}
|
||||
} else {
|
||||
if ($num_intervals > 0) {
|
||||
$interval_length = (int) ($period / $num_intervals);
|
||||
} else {
|
||||
$interval_length = 0;
|
||||
}
|
||||
|
||||
$intervals = [];
|
||||
$intervals[0] = $start_utimestamp;
|
||||
for ($i = 0; $i < $num_intervals; $i++) {
|
||||
|
@ -7170,31 +7170,16 @@ function ui_print_comments($comment, $truncate_limit=255)
|
||||
}
|
||||
|
||||
// Only show the last comment. If commment its too long,the comment will short with ...
|
||||
// If $config['prominent_time'] is timestamp the date show Month, day, hour and minutes.
|
||||
// Forced time commentary to use copact date for optimize space in table.
|
||||
// Else show comments hours ago
|
||||
if ($comment['action'] != 'Added comment') {
|
||||
$comment['comment'] = $comment['action'];
|
||||
}
|
||||
|
||||
$comment['comment'] = io_safe_output($comment['comment']);
|
||||
|
||||
$short_comment = substr($comment['comment'], 0, 20);
|
||||
if ($config['prominent_time'] == 'timestamp') {
|
||||
$comentario = '<i>'.date($config['date_format'], $comment['utimestamp']).' ('.$comment['id_user'].'): '.$comment['comment'].'';
|
||||
|
||||
if (strlen($comentario) > '200px' && $truncate_limit >= 255) {
|
||||
$comentario = '<i>'.date($config['date_format'], $comment['utimestamp']).' ('.$comment['id_user'].'): '.$short_comment.'...';
|
||||
}
|
||||
} else {
|
||||
$rest_time = (time() - $comment['utimestamp']);
|
||||
$time_last = (($rest_time / 60) / 60);
|
||||
|
||||
$comentario = '<i>'.number_format($time_last, 0, $config['decimal_separator'], ($config['thousand_separator'] ?? ',')).' Hours ('.$comment['id_user'].'): '.$comment['comment'].'';
|
||||
|
||||
if (strlen($comentario) > '200px' && $truncate_limit >= 255) {
|
||||
$comentario = '<i>'.number_format($time_last, 0, $config['decimal_separator'], ($config['thousand_separator'] ?? ',')).' Hours ('.$comment['id_user'].'): '.$short_comment.'...';
|
||||
}
|
||||
}
|
||||
|
||||
$comentario = io_safe_output($comentario);
|
||||
$comentario = $comment['comment'];
|
||||
|
||||
if (strlen($comentario) >= $truncate_limit) {
|
||||
$comentario = ui_print_truncate_text(
|
||||
@ -7209,6 +7194,12 @@ function ui_print_comments($comment, $truncate_limit=255)
|
||||
);
|
||||
}
|
||||
|
||||
$comentario = '<i class="forced_title" data-use_title_for_force_title="1" data-title="'.date($config['date_format'], $comment['utimestamp']).'">'.ui_print_timestamp($comment['utimestamp'], true, ['style' => 'font-size: 10px; display: contents;', 'prominent' => 'compact']).' ('.$comment['id_user'].'): '.$comment['comment'].'';
|
||||
|
||||
if (strlen($comentario) > '200px' && $truncate_limit >= 255) {
|
||||
$comentario = '<i class="forced_title" data-use_title_for_force_title="1" data-title="'.date($config['date_format'], $comment['utimestamp']).'">'.ui_print_timestamp($comment['utimestamp'], true, ['style' => 'font-size: 10px; display: contents;', 'prominent' => 'compact']).' ('.$comment['id_user'].'): '.$short_comment.'...';
|
||||
}
|
||||
|
||||
return $comentario;
|
||||
}
|
||||
|
||||
|
@ -108,6 +108,35 @@ td > input[id^="checkbox-multi"] {
|
||||
height: 2.5em;
|
||||
}
|
||||
|
||||
.info_table.events tr > td span:not(.invisible) {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-height: 6em;
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
.info_table.events tr > td span:not(.invisible) {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-height: 6em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
th.column-estado {
|
||||
padding: 0px 0px 0px 12px !important;
|
||||
max-width: fit-content;
|
||||
}
|
||||
|
||||
.content-status {
|
||||
margin: 0 auto;
|
||||
max-width: fit-content;
|
||||
}
|
||||
table#table_events > tbody > tr > td.column-estado {
|
||||
padding: 0px !important;
|
||||
text-align: center;
|
||||
}
|
||||
.sorting_desc {
|
||||
background: url(../../images/sort_down_green.png) no-repeat;
|
||||
background-position-x: left;
|
||||
|
@ -547,6 +547,45 @@ if (is_ajax() === true) {
|
||||
);
|
||||
}
|
||||
|
||||
if (empty($tmp->tags) === false) {
|
||||
$tmp->tags = ui_print_truncate_text(
|
||||
$tmp->tags,
|
||||
30,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
'…',
|
||||
true,
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
if (empty($tmp->event_custom_id) === false) {
|
||||
$tmp->event_custom_id = ui_print_truncate_text(
|
||||
$tmp->event_custom_id,
|
||||
30,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
'…',
|
||||
true,
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
if (empty($tmp->module_custom_id) === false) {
|
||||
$tmp->module_custom_id = ui_print_truncate_text(
|
||||
$tmp->module_custom_id,
|
||||
30,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
'…',
|
||||
true,
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
if (empty($tmp->comments) === false) {
|
||||
$tmp->comments = ui_print_comments($tmp->comments, 20);
|
||||
}
|
||||
@ -887,14 +926,14 @@ if (is_ajax() === true) {
|
||||
true,
|
||||
[
|
||||
'title' => __('Unknown'),
|
||||
'class' => 'forced-title',
|
||||
'class' => 'forced-title main_menu_icon',
|
||||
]
|
||||
);
|
||||
$state = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
$draw_state = '<div class="mrgn_lft_17px">';
|
||||
$draw_state = '<div class="content-status">';
|
||||
$draw_state .= '<span class="invisible">';
|
||||
$draw_state .= $state;
|
||||
$draw_state .= '</span>';
|
||||
@ -1187,10 +1226,10 @@ if (is_ajax() === true) {
|
||||
}
|
||||
|
||||
$tmp->custom_data = $custom_data_str;
|
||||
if (strlen($tmp->custom_data) >= 20) {
|
||||
if (strlen($tmp->custom_data) >= 50) {
|
||||
$tmp->custom_data = ui_print_truncate_text(
|
||||
$tmp->custom_data,
|
||||
20,
|
||||
50,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
@ -1220,6 +1259,7 @@ if (is_ajax() === true) {
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($data) === true) {
|
||||
$data = array_values(
|
||||
array_filter(
|
||||
$data,
|
||||
@ -1229,6 +1269,8 @@ if (is_ajax() === true) {
|
||||
)
|
||||
);
|
||||
$count = count($data);
|
||||
}
|
||||
|
||||
// RecordsTotal && recordsfiltered resultados totales.
|
||||
echo json_encode(
|
||||
[
|
||||
@ -2573,7 +2615,7 @@ try {
|
||||
if ($evento_id !== false) {
|
||||
$fields[$evento_id] = [
|
||||
'text' => 'evento',
|
||||
'class' => 'mw250px',
|
||||
'class' => 'mw180px',
|
||||
];
|
||||
}
|
||||
|
||||
@ -2582,15 +2624,16 @@ try {
|
||||
$fields[$comment_id] = ['text' => 'user_comment'];
|
||||
}
|
||||
|
||||
|
||||
foreach ($fields as $key => $field) {
|
||||
if (is_array($field) === false) {
|
||||
$fields[$key] = [
|
||||
'text' => $field,
|
||||
'class' => 'mw100px',
|
||||
$estado = array_search('estado', $fields);
|
||||
if ($estado !== false) {
|
||||
$fields[$estado] = [
|
||||
'text' => $fields[$estado],
|
||||
'class' => 'column-estado',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Always add options column.
|
||||
$fields = array_merge(
|
||||
@ -2598,7 +2641,7 @@ try {
|
||||
[
|
||||
[
|
||||
'text' => 'options',
|
||||
'class' => 'table_action_buttons mw120px',
|
||||
'class' => 'table_action_buttons mw100px',
|
||||
],
|
||||
[
|
||||
'text' => 'm',
|
||||
|
Loading…
x
Reference in New Issue
Block a user