diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxheader.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxheader.directive.js index 4ed1d68e59..bb16edf761 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxheader.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxheader.directive.js @@ -10,7 +10,7 @@ Use this directive to construct a title. Recommended to use it inside an {@link
-
+
// Content here
@@ -21,7 +21,7 @@ Use this directive to construct a title. Recommended to use it inside an {@link
// the title-key property needs an areaAlias_keyAlias from the language files
-
+
// Content here
@@ -35,8 +35,10 @@ Use this directive to construct a title. Recommended to use it inside an {@link
{@link umbraco.directives.directive:umbBoxContent umbBoxContent}
-@param {string} title (attrbute): Custom title text.
-@param {string} title-key (attrbute): the key alias of the language xml files.
+@param {string=} title (attrbute): Custom title text.
+@param {string=} titleKey (attrbute): The translation key from the language xml files.
+@param {string=} description (attrbute): Custom description text.
+@param {string=} descriptionKey (attrbute): The translation key from the language xml files.
**/
@@ -52,7 +54,9 @@ Use this directive to construct a title. Recommended to use it inside an {@link
templateUrl: 'views/components/html/umb-box/umb-box-header.html',
scope: {
titleKey: "@?",
- title: "@?"
+ title: "@?",
+ descriptionKey: "@?",
+ description: "@?"
}
};
diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-box.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-box.less
index cfbd929a3a..492a257b38 100644
--- a/src/Umbraco.Web.UI.Client/src/less/components/umb-box.less
+++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-box.less
@@ -15,6 +15,13 @@
font-weight: bold;
}
+.umb-box-header-description {
+ font-size: 13px;
+ color: @gray-3;
+ line-height: 1.6em;
+ margin-top: 1px;
+}
+
.umb-box-content {
padding: 20px;
}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box-header.html b/src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box-header.html
index 6feffe9d3d..8c59061788 100644
--- a/src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box-header.html
+++ b/src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box-header.html
@@ -1,6 +1,10 @@
-
+
{{title}}
+
+
+ {{description}}
+
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/users/group.html b/src/Umbraco.Web.UI.Client/src/views/users/group.html
index f1427e3266..455f2177c6 100644
--- a/src/Umbraco.Web.UI.Client/src/views/users/group.html
+++ b/src/Umbraco.Web.UI.Client/src/views/users/group.html
@@ -23,7 +23,7 @@
-
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/users/user.controller.js b/src/Umbraco.Web.UI.Client/src/views/users/user.controller.js
index a9b17998d5..89b1334baf 100644
--- a/src/Umbraco.Web.UI.Client/src/views/users/user.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/users/user.controller.js
@@ -66,11 +66,7 @@
vm.user = user;
makeBreadcrumbs(vm.user);
setUserDisplayState();
-
- // format dates to local
- if(vm.user.lastLoginDate) {
- vm.user.formattedLastLogin = getLocalDate(vm.user.lastLoginDate, "MMMM Do YYYY, HH:mm");
- }
+ formatDatesToLocal(vm.user);
vm.emailIsUsername = user.email === user.username;
@@ -89,18 +85,20 @@
}
function getLocalDate(date, format) {
- var dateVal;
- var serverOffset = Umbraco.Sys.ServerVariables.application.serverTimeOffset;
- var localOffset = new Date().getTimezoneOffset();
- var serverTimeNeedsOffsetting = (-serverOffset !== localOffset);
+ if(date) {
+ var dateVal;
+ var serverOffset = Umbraco.Sys.ServerVariables.application.serverTimeOffset;
+ var localOffset = new Date().getTimezoneOffset();
+ var serverTimeNeedsOffsetting = (-serverOffset !== localOffset);
- if(serverTimeNeedsOffsetting) {
- dateVal = dateHelper.convertToLocalMomentTime(date, serverOffset);
- } else {
- dateVal = moment(date, "YYYY-MM-DD HH:mm:ss");
+ if(serverTimeNeedsOffsetting) {
+ dateVal = dateHelper.convertToLocalMomentTime(date, serverOffset);
+ } else {
+ dateVal = moment(date, "YYYY-MM-DD HH:mm:ss");
+ }
+
+ return dateVal.format(format);
}
-
- return dateVal.format(format);
}
function toggleChangePassword() {
@@ -128,6 +126,7 @@
vm.user = saved;
setUserDisplayState();
+ formatDatesToLocal(vm.user);
vm.changePasswordModel.isChanging = false;
vm.page.saveButtonState = "success";
@@ -380,6 +379,14 @@
vm.user.userDisplayState = usersHelper.getUserStateFromValue(vm.user.userState);
}
+ function formatDatesToLocal(user) {
+ user.formattedLastLogin = getLocalDate(user.lastLoginDate, "MMMM Do YYYY, HH:mm");
+ user.formattedLastLockoutDate = getLocalDate(user.lastLockoutDate, "MMMM Do YYYY, HH:mm");
+ user.formattedCreateDate = getLocalDate(user.createDate, "MMMM Do YYYY, HH:mm");
+ user.formattedUpdateDate = getLocalDate(user.updateDate, "MMMM Do YYYY, HH:mm");
+ user.formattedLastPasswordChangeDate = getLocalDate(user.lastPasswordChangeDate, "MMMM Do YYYY, HH:mm");
+ }
+
init();
}
angular.module("umbraco").controller("Umbraco.Editors.Users.UserController", UserEditController);
diff --git a/src/Umbraco.Web.UI.Client/src/views/users/user.html b/src/Umbraco.Web.UI.Client/src/views/users/user.html
index 88ae4bf46e..a55b1bf83d 100644
--- a/src/Umbraco.Web.UI.Client/src/views/users/user.html
+++ b/src/Umbraco.Web.UI.Client/src/views/users/user.html
@@ -1,9 +1,5 @@
-
-
-