openaire-library/login/user.component.html

64 lines
2.3 KiB
HTML

<div id="tm-main" class=" uk-section uk-margin-small-top tm-middle" >
<div uk-grid uk-grid>
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<div *ngIf="!server" class="uk-margin-top uk-container uk-container-small uk-position-relative">
<div *ngIf="loggedIn">
<div class="uk-alert uk-alert-success">
Hello {{user.fullname}}!
</div>
<!-- <button (click)="logout()" class=" uk-button uk-button-default">Log out</button> -->
</div>
<!--form *ngIf="!loggedIn" class=" ">
<h3>Welcome to OpenAIRE's Discover Portal</h3>
<p>This service uses the same ldap sign-in as the OpenAIRE services so you can use the same
credentials.</p>
<p>Login in. To see it in action.</p>
<div class="uk-margin">
<input class="uk-input uk-form-width-medium" placeholder="Username" type="text" name="username" [(ngModel)]="username">
</div>
<div class="uk-margin">
<input placeholder="Password" class="uk-input uk-form-width-medium" type="password" name="password" [(ngModel)]="password">
</div>
<div class="uk-margin">
<button (click)="login()" class=" uk-button uk-button-primary">Login</button>
</div>
</form-->
<div *ngIf="errorCode == '1'" class="uk-alert uk-alert-warning">
The requested page requires authentication.
<span *ngIf="!loggedIn">
<a class="loginLink" (click)="logIn()" >Please Sign in</a>
</span>
</div>
<div *ngIf="errorCode == '2'" class="uk-alert uk-alert-warning">
You are not authorized to use the requested page
</div>
<div *ngIf="errorCode == '3'" class="uk-alert uk-alert-warning">
The session has expired. Please sign in again or continue <a (click)="redirect();">browsing as a guest</a>.
<span *ngIf="!loggedIn">
<a class="loginLink" [href]="loginUrl" >Sign in</a>
</span>
</div>
<div *ngIf="errorCode == '4'" class="uk-alert uk-alert-warning">
You are not authorized to use the requested page
</div>
<div *ngIf="errorCode == '5'" class="uk-alert uk-alert-warning">
There is no community selected
</div>
<div *ngIf="errorCode == '6'" class="uk-alert uk-alert-warning">
For this action you have to subscribe to community first
</div>
<div *ngIf="!loggedIn && errorMessage.length > 0" class="uk-alert uk-alert-danger">{{errorMessage}}</div>
</div>
</div>
</div>
</div>