diff --git a/demo-shell-ng2/app/app.component.css b/demo-shell-ng2/app/app.component.css
index 700caa1af0..cdfe6eb2e7 100644
--- a/demo-shell-ng2/app/app.component.css
+++ b/demo-shell-ng2/app/app.component.css
@@ -7,3 +7,6 @@
.mdl-layout-title{
font-size: 17px;
}
+.user-profile{
+ margin-right: 3px;
+}
\ No newline at end of file
diff --git a/demo-shell-ng2/app/app.component.html b/demo-shell-ng2/app/app.component.html
index d8131ce30b..463e250c35 100644
--- a/demo-shell-ng2/app/app.component.html
+++ b/demo-shell-ng2/app/app.component.html
@@ -21,7 +21,7 @@
Login
-
+
diff --git a/ng2-components/ng2-alfresco-userinfo/src/userinfo.component.css b/ng2-components/ng2-alfresco-userinfo/src/userinfo.component.css
index 9f59213ab7..bcd1bc0bca 100644
--- a/ng2-components/ng2-alfresco-userinfo/src/userinfo.component.css
+++ b/ng2-components/ng2-alfresco-userinfo/src/userinfo.component.css
@@ -4,11 +4,19 @@
width: 40px;
margin-right: 0%;
cursor: pointer;
- border: 2px solid #999999;
+ border: 1px solid #999999;
}
.button-profile {
display: inline-block;
- margin-right: -10px;
border: 0px;
}
+
+.detail-user-profile-list-mdl{
+ margin-right: 100px;
+}
+
+.user-profile-list-mdl{
+ max-height: 250px;
+ width: 400px;
+}
diff --git a/ng2-components/ng2-alfresco-userinfo/src/userinfo.component.html b/ng2-components/ng2-alfresco-userinfo/src/userinfo.component.html
index bf39e21403..5437e89627 100644
--- a/ng2-components/ng2-alfresco-userinfo/src/userinfo.component.html
+++ b/ng2-components/ng2-alfresco-userinfo/src/userinfo.component.html
@@ -1,16 +1,60 @@
-
{{ecmUser.firstName}} {{ecmUser.lastName}}
-
{{bpmUser.fullname}}
-
+
+
{{ecmUser.firstName || ecmUser.lastName}}
+
{{bpmUser.firstName || bpmUser.lastName || bpmUser.fullName}}
+
+
+
+
-
diff --git a/ng2-components/ng2-alfresco-userinfo/src/userinfo.component.ts b/ng2-components/ng2-alfresco-userinfo/src/userinfo.component.ts
index 20becdb6b3..4ed268af9b 100644
--- a/ng2-components/ng2-alfresco-userinfo/src/userinfo.component.ts
+++ b/ng2-components/ng2-alfresco-userinfo/src/userinfo.component.ts
@@ -36,10 +36,11 @@ export class UserInfoComponent implements OnInit {
private ecmUser: EcmUserModel;
private bpmUser: BpmUserModel;
+ private baseComponentPath = __moduleName.replace('userinfo.component.js', '');
+ private anonymouseImageUrl: string = this.baseComponentPath + 'img/anonymous.gif';
public bpmUserImage: any;
public ecmUserImage: any;
- private baseComponentPath = __moduleName.replace('userinfo.component.js', '');
constructor(private ecmUserService: ECMUserService,
private bpmUserService: BPMUserService,
@@ -52,7 +53,7 @@ export class UserInfoComponent implements OnInit {
.subscribe(
(res) => {
this.ecmUser =
res;
- this.getUserProfileImage();
+ this.getEcmUserProfileImage();
}
);
}
@@ -61,30 +62,22 @@ export class UserInfoComponent implements OnInit {
.subscribe(
(res) => {
this.bpmUser = res;
- this.getUserProfileImage();
+ this.getBpmUserProfileImage();
}
);
}
}
- private getUserProfileImage() {
- if (this.ecmUser) {
- this.ecmUserImage = this.ecmUserService.getCurrentUserProfileImageUrl(this.ecmUser.avatarId);
- }
- if (this.bpmUser) {
- this.bpmUserImage = this.bpmUserService.getCurrentUserProfileImage();
- }
+ private getBpmUserProfileImage() {
+ this.bpmUserImage = this.bpmUserService.getCurrentUserProfileImage();
+ }
+
+ private getEcmUserProfileImage() {
+ this.ecmUserImage = this.ecmUserService.getCurrentUserProfileImageUrl(this.ecmUser.avatarId);
}
public getUserAvatar() {
- if (this.ecmUserImage) {
- return this.ecmUserImage;
- }
- if (this.bpmUserImage) {
- return this.bpmUserImage;
- }
- if (!this.ecmUserImage && !this.bpmUserImage) {
- return this.baseComponentPath + '/img/anonymous.gif';
- }
+ return this.ecmUserImage || this.bpmUserImage || this.anonymouseImageUrl;
}
+
}