mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Added fix for first component style
This commit is contained in:
@@ -7,3 +7,6 @@
|
|||||||
.mdl-layout-title{
|
.mdl-layout-title{
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
}
|
}
|
||||||
|
.user-profile{
|
||||||
|
margin-right: 3px;
|
||||||
|
}
|
@@ -21,7 +21,7 @@
|
|||||||
<a class="mdl-navigation__link" data-automation-id="login" href="" routerLink="/login">Login</a>
|
<a class="mdl-navigation__link" data-automation-id="login" href="" routerLink="/login">Login</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div *ngIf="isLoggedIn()">
|
<div class="user-profile" *ngIf="isLoggedIn()">
|
||||||
<ng2-alfresco-userinfo></ng2-alfresco-userinfo>
|
<ng2-alfresco-userinfo></ng2-alfresco-userinfo>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@@ -4,11 +4,19 @@
|
|||||||
width: 40px;
|
width: 40px;
|
||||||
margin-right: 0%;
|
margin-right: 0%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border: 2px solid #999999;
|
border: 1px solid #999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-profile {
|
.button-profile {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: -10px;
|
|
||||||
border: 0px;
|
border: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.detail-user-profile-list-mdl{
|
||||||
|
margin-right: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-profile-list-mdl{
|
||||||
|
max-height: 250px;
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
@@ -1,16 +1,60 @@
|
|||||||
<span *ngIf="ecmUser">{{ecmUser.firstName}} {{ecmUser.lastName}}</span>
|
<div id="img_container">
|
||||||
<span *ngIf="bpmUser">{{bpmUser.fullname}}</span>
|
<span *ngIf="ecmUser">{{ecmUser.firstName || ecmUser.lastName}}</span>
|
||||||
<button id="demo-menu-lower-right"
|
<span *ngIf="bpmUser">{{bpmUser.firstName || bpmUser.lastName || bpmUser.fullName}}</span>
|
||||||
class="mdl-button mdl-js-button mdl-button--icon">
|
<div class="button-profile" id="user-profile" data-automation-id="user-profile">
|
||||||
<img id="logged-user-img"
|
<img id="logged-user-img"
|
||||||
src="{{ getUserAvatar() }}"
|
[src]="getUserAvatar()"
|
||||||
class="profile-image"/>
|
class="profile-image"/>
|
||||||
</button>
|
</div>
|
||||||
|
<div class="user-profile-list-mdl
|
||||||
|
mdl-menu mdl-menu--bottom-right
|
||||||
|
mdl-js-menu mdl-js-ripple-effect"
|
||||||
|
for="user-profile">
|
||||||
|
<ul class='detail-user-profile-list-mdl mdl-list'>
|
||||||
|
<div *ngIf="ecmUser">
|
||||||
|
<li class="mdl-list__item">
|
||||||
|
<span class="mdl-list__item-primary-content"> ECM </span>
|
||||||
|
</li>
|
||||||
|
<li class="mdl-list__item mdl-list__item-two-line">
|
||||||
|
<span class="mdl-list__item-secondary-content">First Name : </span>
|
||||||
|
<span class="mdl-list__item-secondary-content"> {{ecmUser.firstName}}</span>
|
||||||
|
</li>
|
||||||
|
<li class="mdl-list__item mdl-list__item-two-line">
|
||||||
|
<span class="mdl-list__item-secondary-content">Last Name : </span>
|
||||||
|
<span class="mdl-list__item-secondary-content">{{ecmUser.lastName}}</span>
|
||||||
|
</li>
|
||||||
|
<li class="mdl-list__item mdl-list__item-two-line">
|
||||||
|
<span class="mdl-list__item-secondary-content">Email : </span>
|
||||||
|
<span class="mdl-list__item-secondary-content"> {{ecmUser.email}}</span>
|
||||||
|
</li>
|
||||||
|
<li class="mdl-list__item mdl-list__item-two-line">
|
||||||
|
<span class="mdl-list__item-secondary-content">Job Title : </span>
|
||||||
|
<span class="mdl-list__item-secondary-content"> {{ecmUser.jobTitle}}</span>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="bpmUser">
|
||||||
|
<li class="mdl-list__item">
|
||||||
|
<span class="mdl-list__item-primary-content"> BPM </span>
|
||||||
|
</li>
|
||||||
|
<li class="mdl-list__item mdl-list__item-two-line">
|
||||||
|
<span class="mdl-list__item-secondary-content">First Name : </span>
|
||||||
|
<span class="mdl-list__item-secondary-content"> {{bpmUser.firstName}}</span>
|
||||||
|
</li>
|
||||||
|
<li class="mdl-list__item mdl-list__item-two-line">
|
||||||
|
<span class="mdl-list__item-secondary-content">Last Name : </span>
|
||||||
|
<span class="mdl-list__item-secondary-content">{{bpmUser.lastName}}</span>
|
||||||
|
</li>
|
||||||
|
<li class="mdl-list__item mdl-list__item-two-line">
|
||||||
|
<span class="mdl-list__item-secondary-content">Email : </span>
|
||||||
|
<span class="mdl-list__item-secondary-content"> {{bpmUser.email}}</span>
|
||||||
|
</li>
|
||||||
|
<li class="mdl-list__item mdl-list__item-two-line">
|
||||||
|
<span class="mdl-list__item-secondary-content">Tenant Name : </span>
|
||||||
|
<span class="mdl-list__item-secondary-content"> {{bpmUser.tenantName}}</span>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect"
|
|
||||||
for="demo-menu-lower-right">
|
|
||||||
<li class="mdl-menu__item">Some Action</li>
|
|
||||||
<li class="mdl-menu__item">Another Action</li>
|
|
||||||
<li disabled class="mdl-menu__item">Disabled Action</li>
|
|
||||||
<li class="mdl-menu__item">Yet Another Action</li>
|
|
||||||
</ul>
|
|
||||||
|
@@ -36,10 +36,11 @@ export class UserInfoComponent implements OnInit {
|
|||||||
|
|
||||||
private ecmUser: EcmUserModel;
|
private ecmUser: EcmUserModel;
|
||||||
private bpmUser: BpmUserModel;
|
private bpmUser: BpmUserModel;
|
||||||
|
private baseComponentPath = __moduleName.replace('userinfo.component.js', '');
|
||||||
|
private anonymouseImageUrl: string = this.baseComponentPath + 'img/anonymous.gif';
|
||||||
public bpmUserImage: any;
|
public bpmUserImage: any;
|
||||||
public ecmUserImage: any;
|
public ecmUserImage: any;
|
||||||
|
|
||||||
private baseComponentPath = __moduleName.replace('userinfo.component.js', '');
|
|
||||||
|
|
||||||
constructor(private ecmUserService: ECMUserService,
|
constructor(private ecmUserService: ECMUserService,
|
||||||
private bpmUserService: BPMUserService,
|
private bpmUserService: BPMUserService,
|
||||||
@@ -52,7 +53,7 @@ export class UserInfoComponent implements OnInit {
|
|||||||
.subscribe(
|
.subscribe(
|
||||||
(res) => {
|
(res) => {
|
||||||
this.ecmUser = <EcmUserModel> res;
|
this.ecmUser = <EcmUserModel> res;
|
||||||
this.getUserProfileImage();
|
this.getEcmUserProfileImage();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -61,30 +62,22 @@ export class UserInfoComponent implements OnInit {
|
|||||||
.subscribe(
|
.subscribe(
|
||||||
(res) => {
|
(res) => {
|
||||||
this.bpmUser = <BpmUserModel> res;
|
this.bpmUser = <BpmUserModel> res;
|
||||||
this.getUserProfileImage();
|
this.getBpmUserProfileImage();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private getUserProfileImage() {
|
private getBpmUserProfileImage() {
|
||||||
if (this.ecmUser) {
|
this.bpmUserImage = this.bpmUserService.getCurrentUserProfileImage();
|
||||||
this.ecmUserImage = this.ecmUserService.getCurrentUserProfileImageUrl(this.ecmUser.avatarId);
|
}
|
||||||
}
|
|
||||||
if (this.bpmUser) {
|
private getEcmUserProfileImage() {
|
||||||
this.bpmUserImage = this.bpmUserService.getCurrentUserProfileImage();
|
this.ecmUserImage = this.ecmUserService.getCurrentUserProfileImageUrl(this.ecmUser.avatarId);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public getUserAvatar() {
|
public getUserAvatar() {
|
||||||
if (this.ecmUserImage) {
|
return this.ecmUserImage || this.bpmUserImage || this.anonymouseImageUrl;
|
||||||
return this.ecmUserImage;
|
|
||||||
}
|
|
||||||
if (this.bpmUserImage) {
|
|
||||||
return this.bpmUserImage;
|
|
||||||
}
|
|
||||||
if (!this.ecmUserImage && !this.bpmUserImage) {
|
|
||||||
return this.baseComponentPath + '/img/anonymous.gif';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user