mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Added compact mode to show timestamp - #4233
This commit is contained in:
parent
1c4b639deb
commit
8fd1f3c99e
@ -1169,16 +1169,23 @@ $row++;
|
|||||||
if ($config['prominent_time'] == 'comparation') {
|
if ($config['prominent_time'] == 'comparation') {
|
||||||
$timestamp = false;
|
$timestamp = false;
|
||||||
$comparation = true;
|
$comparation = true;
|
||||||
|
$compact = false;
|
||||||
} else if ($config['prominent_time'] == 'timestamp') {
|
} else if ($config['prominent_time'] == 'timestamp') {
|
||||||
$timestamp = true;
|
$timestamp = true;
|
||||||
$comparation = false;
|
$comparation = false;
|
||||||
|
$compact = false;
|
||||||
|
} else if ($config['prominent_time'] == 'compact') {
|
||||||
|
$timestamp = false;
|
||||||
|
$comparation = false;
|
||||||
|
$compact = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$table_other->data[$row][0] = __('Timestamp or time comparation');
|
$table_other->data[$row][0] = __('Timestamp, time comparation, or Compact mode');
|
||||||
$table_other->data[$row][1] = __('Comparation in rollover').' ';
|
$table_other->data[$row][1] = '<div class="switch_radio_button">';
|
||||||
$table_other->data[$row][1] .= html_print_radio_button('prominent_time', 'comparation', '', $comparation, true);
|
$table_other->data[$row][1] .= html_print_radio_button('prominent_time', 'comparation', __('Comparation in rollover'), $comparation, true);
|
||||||
$table_other->data[$row][1] .= '<br />'.__('Timestamp in rollover').' ';
|
$table_other->data[$row][1] .= html_print_radio_button('prominent_time', 'timestamp', __('Timestamp in rollover'), $timestamp, true);
|
||||||
$table_other->data[$row][1] .= html_print_radio_button('prominent_time', 'timestamp', '', $timestamp, true);
|
$table_other->data[$row][1] .= html_print_radio_button('prominent_time', 'compact', __('Compact mode'), $compact, true);
|
||||||
|
$table_other->data[$row][1] .= '</div>';
|
||||||
|
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
|
@ -535,6 +535,10 @@ function ui_print_timestamp($unixtime, $return=false, $option=[])
|
|||||||
date2strftime_format($config['date_format']),
|
date2strftime_format($config['date_format']),
|
||||||
$unixtime
|
$unixtime
|
||||||
);
|
);
|
||||||
|
} else if ($prominent == 'compact') {
|
||||||
|
$units = 'tiny';
|
||||||
|
$title = human_time_comparation($unixtime);
|
||||||
|
$data = human_time_comparation($unixtime, $units);
|
||||||
} else {
|
} else {
|
||||||
$title = date($config['date_format'], $unixtime);
|
$title = date($config['date_format'], $unixtime);
|
||||||
$units = 'large';
|
$units = 'large';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user