Project

General

Profile

« Previous | Next » 

Revision 53689

In display claims redirect when session expires.
Update messages in user login errors

View differences:

modules/uoa-services-library/trunk/ng-openaire-library/src/app/login/user.component.html
33 33
 <div *ngIf="errorCode == '1'" class="uk-alert uk-alert-warning">
34 34
  The requested page requires authentication.
35 35
  <span  *ngIf="!loggedIn">
36
      <a  class=""  (click)="logIn()"  >Please Sign in</a>
36
    Please  <a  class=""  (click)="logIn()"  > sign in</a> to continue.
37 37
   </span>
38 38
</div>
39 39
<div *ngIf="errorCode == '2'" class="uk-alert uk-alert-warning">
40
  You are not authorized to use the requested page
40
  You are not authorized to use the requested page.
41 41
</div>
42 42
<div *ngIf="errorCode == '3'" class="uk-alert uk-alert-warning">
43
  The session has expired. Please sign in again or continue <a (click)="redirect();">browsing as a guest</a>.
44
  <span  *ngIf="!loggedIn">
45
      <!-- <a  class="loginLink"   [href]="loginUrl"   >Sign in</a> -->
46
      <a  class=""  (click)="logIn()"  >Please Sign in</a>
47
   </span>
43
  The session has expired. Please <a  class=""  (click)="logIn()"  >sign in</a> again or continue <a  class=""  (click)="redirect();">browsing as a guest</a>.
48 44
</div>
49 45
<div *ngIf="errorCode == '4'" class="uk-alert uk-alert-warning">
50
  You are not authorized to use the requested page
46
  You are not authorized to use the requested page.
51 47
</div>
52 48
<div *ngIf="errorCode == '5'" class="uk-alert uk-alert-warning">
53
  There is no community selected
49
  There is no research community selected.
54 50
</div>
55 51
<div *ngIf="errorCode == '6'" class="uk-alert uk-alert-warning">
56
  For this action you have to subscribe to community first
52
  For this action you have to subscribe to research community first.
57 53
</div>
58 54
<div *ngIf="!loggedIn && errorMessage.length > 0" class="uk-alert uk-alert-danger">{{errorMessage}}</div>
59 55

  
modules/uoa-services-library/trunk/ng-openaire-library/src/app/claims/claim-utils/displayClaims/displayClaims.component.ts
8 8
import {AlertModal} from '../../../utils/modal/alert';
9 9
import {Session} from '../../../login/utils/helper.class';
10 10
import{EnvProperties} from '../../../utils/properties/env-properties';
11
import {LoginErrorCodes} from '../../../login/utils/guardHelper.class';
11 12

  
12 13

  
13 14
@Component({
......
122 123
  getClaims () {
123 124
    if(!Session.isLoggedIn()){
124 125
      this.userValidMessage = "User session has expired. Please login again.";
125

  
126
      this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl":  this._router.url} });
126 127
    }else{
127 128
    this.selected=[];
128 129
    var types = '';
......
463 464
    deleteById(id:string){
464 465
      if(!Session.isLoggedIn()){
465 466
        this.userValidMessage = "User session has expired. Please login again.";
467
        this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl":  this._router.url} });
466 468

  
467 469
      }else{
468 470
         console.log("Deleting claim with id:"+id);
......
495 497
    batchDeleteById(ids:string[]){
496 498
      if(!Session.isLoggedIn()){
497 499
        this.userValidMessage = "User session has expired. Please login again.";
498

  
500
        this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl":  this._router.url} });
499 501
      }else{
500 502
         console.warn("Deleting claim with ids:"+ids);
501 503
         this._claimService.deleteBulk(ids,this.properties.claimsAPIURL).subscribe(
modules/uoa-services-library/trunk/ng-openaire-library/src/app/sharedComponents/bottom.component.html
35 35
               <div  *ngIf="showSocialButton"class="uk-margin-small uk-margin-remove-top uk-text-left@s uk-text-center">
36 36
                  <div class="uk-child-width-auto uk-grid-small uk-flex-left@s uk-flex-center uk-grid" uk-grid="">
37 37
                     <div class="uk-first-column">
38
                        <a  href="http://www.facebook.com/groups/openaire/" target="_blank" class="el-link uk-icon-button uk-icon">
38
                        <a  href="https://www.facebook.com/groups/openaire/" target="_blank" class="el-link uk-icon-button uk-icon">
39 39
                           <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
40 40
                              <path d="M11,10h2.6l0.4-3H11V5.3c0-0.9,0.2-1.5,1.5-1.5H14V1.1c-0.3,0-1-0.1-2.1-0.1C9.6,1,8,2.4,8,5v2H5.5v3H8v8h3V10z"></path>
41 41
                           </svg>
42 42
                        </a>
43 43
                     </div>
44 44
                     <div>
45
                        <a  href="http://www.twitter.com/OpenAIRE_eu" target="_blank" class="el-link uk-icon-button uk-icon">
45
                        <a  href="https://www.twitter.com/OpenAIRE_eu" target="_blank" class="el-link uk-icon-button uk-icon">
46 46
                           <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
47 47
                              <path d="M19,4.74 C18.339,5.029 17.626,5.229 16.881,5.32 C17.644,4.86 18.227,4.139 18.503,3.28 C17.79,3.7 17.001,4.009 16.159,4.17 C15.485,3.45 14.526,3 13.464,3 C11.423,3 9.771,4.66 9.771,6.7 C9.771,6.99 9.804,7.269 9.868,7.539 C6.795,7.38 4.076,5.919 2.254,3.679 C1.936,4.219 1.754,4.86 1.754,5.539 C1.754,6.82 2.405,7.95 3.397,8.61 C2.79,8.589 2.22,8.429 1.723,8.149 L1.723,8.189 C1.723,9.978 2.997,11.478 4.686,11.82 C4.376,11.899 4.049,11.939 3.713,11.939 C3.475,11.939 3.245,11.919 3.018,11.88 C3.49,13.349 4.852,14.419 6.469,14.449 C5.205,15.429 3.612,16.019 1.882,16.019 C1.583,16.019 1.29,16.009 1,15.969 C2.635,17.019 4.576,17.629 6.662,17.629 C13.454,17.629 17.17,12 17.17,7.129 C17.17,6.969 17.166,6.809 17.157,6.649 C17.879,6.129 18.504,5.478 19,4.74"></path>
48 48
                           </svg>
49 49
                        </a>
50 50
                     </div>
51 51
                     <div>
52
                        <a  href="http://www.linkedin.com/groups/OpenAIRE-3893548" target="_blank" class="el-link uk-icon-button uk-icon">
52
                        <a  href="https://www.linkedin.com/groups/OpenAIRE-3893548" target="_blank" class="el-link uk-icon-button uk-icon">
53 53
                           <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
54 54
                              <path d="M5.77,17.89 L5.77,7.17 L2.21,7.17 L2.21,17.89 L5.77,17.89 L5.77,17.89 Z M3.99,5.71 C5.23,5.71 6.01,4.89 6.01,3.86 C5.99,2.8 5.24,2 4.02,2 C2.8,2 2,2.8 2,3.85 C2,4.88 2.77,5.7 3.97,5.7 L3.99,5.7 L3.99,5.71 L3.99,5.71 Z"></path>
55 55
                              <path d="M7.75,17.89 L11.31,17.89 L11.31,11.9 C11.31,11.58 11.33,11.26 11.43,11.03 C11.69,10.39 12.27,9.73 13.26,9.73 C14.55,9.73 15.06,10.71 15.06,12.15 L15.06,17.89 L18.62,17.89 L18.62,11.74 C18.62,8.45 16.86,6.92 14.52,6.92 C12.6,6.92 11.75,7.99 11.28,8.73 L11.3,8.73 L11.3,7.17 L7.75,7.17 C7.79,8.17 7.75,17.89 7.75,17.89 L7.75,17.89 L7.75,17.89 Z"></path>
......
57 57
                        </a>
58 58
                     </div>
59 59
                     <div>
60
                        <a  href="http://www.slideshare.net/OpenAIRE_eu" target="_blank" class="el-link uk-icon-button uk-icon">
60
                        <a  href="https://www.slideshare.net/OpenAIRE_eu" target="_blank" class="el-link uk-icon-button uk-icon">
61 61
                           <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
62 62
                              <line fill="none" stroke="#000" stroke-width="1.1" x1="13.4" y1="14" x2="6.3" y2="10.7"></line>
63 63
                              <line fill="none" stroke="#000" stroke-width="1.1" x1="13.5" y1="5.5" x2="6.5" y2="8.8"></line>

Also available in: Unified diff