mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 18:18:46 +02:00
N°3629 - Activity panel: Add "activity_panel.datetimes_reformat_limit" config. param. to define the limit after which all dates / times should be displayed in absolute format
This commit is contained in:
@@ -1213,6 +1213,14 @@ class Config
|
||||
'source_of_value' => '',
|
||||
'show_in_conf_sample' => false,
|
||||
],
|
||||
'activity_panel.datetimes_reformat_limit' => [
|
||||
'type' => 'integer',
|
||||
'description' => 'Limit (in days) for the dates / times to be displayed in a relative format (eg. "2 days ago") instead of in absolute format (eg. "2021-05-01 10:00"). After that limit, they will all be displayed in absolute format using the "date_and_time_format" parameter.',
|
||||
'default' => 7,
|
||||
'value' => 7,
|
||||
'source_of_value' => '',
|
||||
'show_in_conf_sample' => false,
|
||||
],
|
||||
'obsolescence.show_obsolete_data' => [
|
||||
'type' => 'bool',
|
||||
'description' => 'Default value for the user preference "show obsolete data"',
|
||||
|
||||
@@ -25,7 +25,7 @@ $(function()
|
||||
options:
|
||||
{
|
||||
datetime_format: null,
|
||||
datetimes_reformat_limit: 14, // In days
|
||||
datetimes_reformat_limit: 7, // In days
|
||||
transaction_id: null, // Null until the user gets the lock on the object
|
||||
lock_enabled: false, // Should only be true when object mode is set to "view" and the "concurrent_lock_enabled" config. param. enabled
|
||||
lock_status: null,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
$('#{{ oUIBlock.GetId() }}').activity_panel({
|
||||
datetime_format: {{ oUIBlock.GetDateTimeFormatForJSWidget()|json_encode|raw }},
|
||||
datetimes_reformat_limit: {{ get_config_parameter('activity_panel.datetimes_reformat_limit') }},
|
||||
{% if oUIBlock.HasTransactionId() %}transaction_id: {{ oUIBlock.GetTransactionId()|var_export }},{% endif %}
|
||||
lock_enabled: {{ oUIBlock.IsLockEnabled()|var_export }},
|
||||
lock_watcher_period: {{ get_config_parameter('activity_panel.lock_watcher_period') }},
|
||||
|
||||
Reference in New Issue
Block a user