This section provides information on how to configure the default review and time preferences for users. The user preference settings are used for a user until they change their user preferences, see user profile Settings.
The review preferences configure the default way that diffs are initially displayed to users when they view them in changelists and code reviews. The review preference settings are used for a user until they change their user preferences, see user profile Settings.
Configure the default user diff view settings with the following configuration block in the SWARM_ROOT/data/config.php
file:
<?php
// this block should be a peer of 'p4'
'users' => array(
'settings' => array(
'review_preferences' => array(
'show_comments_in_files' => true,
'view_diffs_side_by_side' => true,
'show_space_and_new_line_characters' => false,
'ignore_whitespace' => false,
),
),
),
show_comments_in_files
:
true
: display comments in files and in the Comments tab. This is the default value. false
: display comments only in the Comments tab.view_diffs_side_by_side
:
true
: display diffs in files side by side in two panes. This is the default value. false
: display diffs in files inline in a single pane. show_space_and_new_line_characters
:
true
: display whitespace characters as dots, tabs as arrows that point to a bar, and line endings as arrows that point down.false
: whitespace, tabs and line endings are not displayed as special characters. This is the default value. ignore_whitespace
:
false
: changes made to whitespace are highlighted in file diffs. This makes it easier to identify changes in file types where whitespace is important. This is the default value.true
: changes made to whitespace are not highlighted in file diffs. This makes it easier to see the important changes in file types where whitespace changes are not important. ignore_whitespace
replaces ignore_whitespace_default
that was used in Swarm version 2017.4 and earlier. By default ignore_whitespace
is set to false, this is the same original default value set for ignore_whitespace_default
.
The time preferences configure the default way that time is initially displayed to users. The time preference settings are used for a user until they change their user preferences, see user profile Settings.
Configure the default user time settings with the following configuration block in the SWARM_ROOT/data/config.php
file:
<?php
// this block should be a peer of 'p4'
'users' => array(
'settings' => array(
'time_preferences' => array(
'display' => 'Timeago', // Default to 'Timeago' but can be set to 'Timestamp'
),
),
),
display
:
'Timeago'
: time is displayed as how long ago the event happened. This is the default value. 'Timestamp'
: time is displayed as the date and time the event happened using the local machine browser time. If timestamp is selected, the date format used by Swarm matches the date format configuration of the local machine browser.