stable

Clone or download

Read-only

Site admin can set the default relative dates display preference

part of: story #14828: display dates with both absolute and relative Please note: - I have no mockups for the site-admin UI - We'll ask UXD when he is available How to test: Prerequisites: - have a user who have not defined a preference regarding the display of relative dates - have a user who have defined the preference Test: - Connect has site-admin - Go to administration > Relative dates display (in sidebar, under global config) - Set the default relative dates display preference --> Save is successfull - Connect as the user who HAVE DEFINED the preference --> In the tracker stats tooltip, the dates are displayed according to the preference selected by the user - Connect as the user who HAVE NOT DEFINED the preference --> In the tracker stats tooltip, the dates are displayed according to the default preference defined by the site-administrator --> In the artifact-modal, the dates are displayed according to the default preference defined by the site-administrator - Go to the user preferences / appearance and language --> The selected preference for the display of relative dates is the default one defined by siteadmin. Change-Id: I56e5007dbe149367f287a3897429a5a5f585e958

Modified Files

Name
M plugins/document/include/Tree/DocumentTreePresenter.php +2 −1 Go to diff View file
M site-content/fr_FR/LC_MESSAGES/tuleap-core.po +15 −1 Go to diff View file
M src/common/Request/RouteCollector.php +25 −1 Go to diff View file
M src/common/User/Account/Appearance/AppearancePresenter.php +7 −32 Go to diff View file
M src/common/User/Account/Appearance/AppearancePresenterBuilder.php +2 −1 Go to diff View file
M src/common/User/Account/UpdateAppearancePreferences.php +15 −12 Go to diff View file
M src/common/User/Account/templates/appearance/relative-dates.mustache +14 −12 Go to diff View file
M src/common/User/REST/v1/UserResource.php +5 −0 Go to diff View file
A src/common/date/Admin/RelativeDatesDisplayAdminPresenter.php +60 −0 Go to diff View file
A src/common/date/Admin/RelativeDatesDisplayController.php +108 −0 Go to diff View file
A src/common/date/Admin/RelativeDatesDisplaySaveController.php +90 −0 Go to diff View file
M src/common/date/DateHelper.class.php +7 −3 Go to diff View file
A src/common/date/DefaultRelativeDatesDisplayPreference.php +55 −0 Go to diff View file
A src/common/date/DefaultRelativeDatesDisplayPreferenceRetriever.php +56 −0 Go to diff View file
A src/common/date/RelativeDatesDisplayPreferencesSelectboxPresenter.php +61 −0 Go to diff View file
A src/common/date/RelativeDatesDisplayPreferencesSelectboxPresenterBuilder.php +57 −0 Go to diff View file
A src/common/date/SelectedDateDisplayPreferenceValidator.php +38 −0 Go to diff View file
A src/scripts/site-admin/dates-display.test.ts +134 −0 Go to diff View file
A src/scripts/site-admin/dates-display.ts +65 −0 Go to diff View file
A src/templates/admin/date/dates-display.mustache +58 −0 Go to diff View file
M src/templates/admin/sidebar_configuration.mustache +1 −0 Go to diff View file
M src/themes/BurningParrot/css/includes/_siteadmin.scss +5 −0 Go to diff View file
M src/themes/tlp/src/js/custom-elements/relative-date/relative-date-element.test.ts +44 −0 Go to diff View file
M src/themes/tlp/src/js/custom-elements/relative-date/relative-date-element.ts +4 −4 Go to diff View file
M src/webpack.common.js +1 −0 Go to diff View file
M tests/unit/common/User/Account/UpdateAppearancePreferencesTest.php +3 −1 Go to diff View file
A tests/unit/common/date/DefaultRelativeDatesDisplayPreferenceRetrieverTest.php +121 −0 Go to diff View file
A tests/unit/common/date/SelectedDateDisplayPreferenceValidatorTest.php +77 −0 Go to diff View file
M tests/unit/common/date/helper/DateHelperTest.php +33 −0 Go to diff View file