[Persistence] Show user, modification time

Show user name and modification time in dialog when revision-checking
detects modifications. WTD-1033.
This commit is contained in:
Victor Woeltjen
2015-03-25 12:19:45 -07:00
parent 5e20c2199d
commit 9eeb68ddd0
6 changed files with 76 additions and 1 deletions

View File

@ -0,0 +1,32 @@
/*global define*/
define(
['moment', './PersistenceFailureConstants'],
function (moment, Constants) {
"use strict";
/**
* Controller to support the template to be shown in the
* dialog shown for persistence failures.
*/
function PersistenceFailureController() {
return {
/**
* Format a timestamp for display in the dialog.
*/
formatTimestamp: function (timestamp) {
return moment.utc(timestamp)
.format(Constants.TIMESTAMP_FORMAT);
},
/**
* Format a user name for display in the dialog.
*/
formatUsername: function (username) {
return username || Constants.UNKNOWN_USER;
}
};
}
return PersistenceFailureController;
}
);