From 25e2f5727ed68e4ae341edd1cfeb1893455732c5 Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Fri, 16 Jun 2017 10:26:41 +0000 Subject: [PATCH] Layout changes for linking git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@47537 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../displayClaims.component.html | 2 +- .../displayClaims/displayClaims.component.ts | 4 +- .../claim-utils/service/claims.service.ts | 37 ++++++---- .../service/claimsService.module.ts | 5 +- .../claims/claim-utils/startOver.component.ts | 2 +- .../linking/linkingGeneric.component.ts | 74 +++++++++++++------ .../selected/selectedContexts.component.ts | 27 ++++--- .../selected/selectedProjects.component.ts | 13 +++- .../selected/selectedResults.component.ts | 7 +- .../app/searchPages/find/search.component.ts | 1 + .../searchUtils/searchPage.component.ts | 4 +- portal-2/src/assets/custom.css | 6 ++ 12 files changed, 123 insertions(+), 59 deletions(-) diff --git a/portal-2/src/app/claims/claim-utils/displayClaims/displayClaims.component.html b/portal-2/src/app/claims/claim-utils/displayClaims/displayClaims.component.html index aea0ba98..cda6dab9 100644 --- a/portal-2/src/app/claims/claim-utils/displayClaims/displayClaims.component.html +++ b/portal-2/src/app/claims/claim-utils/displayClaims/displayClaims.component.html @@ -46,7 +46,7 @@ You have selected {{selected.length}} claim(s) -
+
diff --git a/portal-2/src/app/claims/claim-utils/displayClaims/displayClaims.component.ts b/portal-2/src/app/claims/claim-utils/displayClaims/displayClaims.component.ts index e6495c27..705ed266 100644 --- a/portal-2/src/app/claims/claim-utils/displayClaims/displayClaims.component.ts +++ b/portal-2/src/app/claims/claim-utils/displayClaims/displayClaims.component.ts @@ -454,10 +454,10 @@ export class DisplayClaimsComponent { this.resultsNum = this.resultsNum - res.deletedIds.length; this.loading.close(); if(res.deletedIds.length>0){ - this.deleteMessage=this.deleteMessage+'
'+res.deletedIds.length+' claim(s) successfully deleted.
'; + this.deleteMessage=this.deleteMessage+'
'+res.deletedIds.length+' claim(s) successfully deleted.
'; } if(res.notFoundIds.length>0){ - this.deleteMessage=this.deleteMessage+'
'+res.notFoundIds.length+' claim(s) couldn\'t be deleted.
'; + this.deleteMessage=this.deleteMessage+'
'+res.notFoundIds.length+' claim(s) couldn\'t be deleted.
'; } }); } diff --git a/portal-2/src/app/claims/claim-utils/service/claims.service.ts b/portal-2/src/app/claims/claim-utils/service/claims.service.ts index 01f35f78..6e006272 100644 --- a/portal-2/src/app/claims/claim-utils/service/claims.service.ts +++ b/portal-2/src/app/claims/claim-utils/service/claims.service.ts @@ -64,9 +64,9 @@ export class ClaimsService { deleteClaimById(claimId:string,token:string):any{ console.warn('Trying to delete claim with id : '+claimId); let url = this.baseUrl +"claims/"+claimId+"?token="+token; - let headers = new Headers({ 'Content-Type': 'application/json' }); - let options = new RequestOptions({ headers: headers }); - return this.http.delete( url, options).map(request => request.json()) + // let headers = new Headers({ 'Content-Type': 'application/json' }); + // let options = new RequestOptions({ headers: headers }); + return this.http.delete( url, this.getOptions()).map(request => request.json()) // .do(request => console.info("After delete" )) .catch(this.handleError); @@ -80,9 +80,9 @@ export class ClaimsService { url=url+(url.length >0 ?"&":"")+"claimId="+claimId; } url= this.baseUrl +"claims/bulk?"+url+"&token="+token; - let headers = new Headers({ 'Content-Type': 'application/json' }); - let options = new RequestOptions({ headers: headers }); - return this.http.delete( url, options).map(request => request.json()) + // let headers = new Headers({ 'Content-Type': 'application/json' }); + // let options = new RequestOptions({ headers: headers }); + return this.http.delete( url, this.getOptions()).map(request => request.json()) // .do(request => console.info("After delete" )) .catch(this.handleError); @@ -92,9 +92,9 @@ export class ClaimsService { let url = this.baseUrl +"claims/bulk"+"?token="+token; let body = JSON.stringify( claims ); console.warn('Json body: : '+body); - let headers = new Headers({ 'Content-Type': 'application/json' }); - let options = new RequestOptions({ headers: headers }); - return this.http.post(url, body, options) + // let headers = new Headers({ 'Content-Type': 'application/json' }); + // let options = new RequestOptions({ headers: headers }); + return this.http.post(url, body, this.getOptions()) .map(res => res.json()) .do(request => console.info("Insert Response:"+request.status) ) .catch(this.handleError); @@ -104,9 +104,9 @@ export class ClaimsService { console.warn('Trying toinsert claim : '+claim); let url = this.baseUrl +"claims"+"?token="+token; let body = JSON.stringify( claim ); - let headers = new Headers({ 'Content-Type': 'application/json' }); - let options = new RequestOptions({ headers: headers }); - return this.http.post(url, body, options) + // let headers = new Headers({ 'Content-Type': 'application/json' }); + // let options = new RequestOptions({ headers: headers }); + return this.http.post(url, body, this.getOptions()) .map(res => res.json()) .do(request => console.info("Insert Response:"+request.status) ) .catch(this.handleError); @@ -117,9 +117,9 @@ export class ClaimsService { let url = this.baseUrl +"feed/bulk"+"?token="+token; let body = JSON.stringify( records ); console.warn('Json body: : '+body); - let headers = new Headers({ 'Content-Type': 'application/json' }); - let options = new RequestOptions({ headers: headers }); - return this.http.post(url, body, options) + // let headers = new Headers({ 'Content-Type': 'application/json' }); + // let options = new RequestOptions({ headers: headers }); + return this.http.post(url, body, this.getOptions()) .map(res => res.json()) .do(request => console.info("Insert Response:"+request) ) .catch(this.handleError); @@ -149,4 +149,11 @@ export class ClaimsService { }); } + private getOptions(){ + let headers = new Headers(); + headers.append('Content-Type', 'application/json'); + let options = new RequestOptions({ headers: headers }); + return options; + } + } diff --git a/portal-2/src/app/claims/claim-utils/service/claimsService.module.ts b/portal-2/src/app/claims/claim-utils/service/claimsService.module.ts index 5272312e..d38d0f8d 100644 --- a/portal-2/src/app/claims/claim-utils/service/claimsService.module.ts +++ b/portal-2/src/app/claims/claim-utils/service/claimsService.module.ts @@ -12,9 +12,12 @@ import {ClaimsService} from './claims.service'; declarations: [ ], providers:[ - ClaimsService + ClaimsService, + ], exports: [ ] }) + + export class ClaimServiceModule { } diff --git a/portal-2/src/app/claims/claim-utils/startOver.component.ts b/portal-2/src/app/claims/claim-utils/startOver.component.ts index 281cc6d3..3740cc2d 100644 --- a/portal-2/src/app/claims/claim-utils/startOver.component.ts +++ b/portal-2/src/app/claims/claim-utils/startOver.component.ts @@ -4,7 +4,7 @@ import {ClaimResult} from '../claim-utils/claimEntities.class'; @Component({ selector: 'start-over', - template: ``, + template: ``, }) export class StartOverComponent { diff --git a/portal-2/src/app/claims/linking/linkingGeneric.component.ts b/portal-2/src/app/claims/linking/linkingGeneric.component.ts index 98e228b2..4882f7cb 100644 --- a/portal-2/src/app/claims/linking/linkingGeneric.component.ts +++ b/portal-2/src/app/claims/linking/linkingGeneric.component.ts @@ -6,6 +6,7 @@ import {ClaimProject, ClaimResult} from '../claim-utils/claimEntities.class'; import {SearchPublicationsService} from '../../services/searchPublications.service'; import {SearchDatasetsService} from '../../services/searchDatasets.service'; import { Meta} from '../../../angular2-meta'; +declare var UIkit:any; @Component({ selector: 'linking-generic', @@ -14,12 +15,27 @@ import { Meta} from '../../../angular2-meta'; - + + + + + + + + - -
    + + - -
  • - + + -
  • + -
- -
+ + + -
- +
+
@@ -68,8 +83,8 @@ import { Meta} from '../../../angular2-meta';
    -
  • Previous
  • -
  • Next
  • + +
  • Review Metadata
  • @@ -91,7 +106,7 @@ export class LinkingGenericComponent { contexts=[]; projects=[]; results = []; - show = "result"; + show = "project"; date='8-6-2016'; keyword: string = ""; linkType:string ="project"; // link type (selected in home page) : project, context, software, etc @@ -169,4 +184,17 @@ export class LinkingGenericComponent { } } + canProceedToMetadata(){ + if(this.results.length == 0){ + + UIkit.notification({ + message : 'No research results selected!
    Please select research results to link with projects and/ or ommunities.', + status : 'warning', + timeout : 1000, + pos : 'top-center' + }); + }else{ + this.show = 'claim'; + } + } } diff --git a/portal-2/src/app/claims/linking/selected/selectedContexts.component.ts b/portal-2/src/app/claims/linking/selected/selectedContexts.component.ts index f121e7f4..0fcd7b1e 100644 --- a/portal-2/src/app/claims/linking/selected/selectedContexts.component.ts +++ b/portal-2/src/app/claims/linking/selected/selectedContexts.component.ts @@ -11,16 +11,25 @@ import {ClaimContext} from '../../claim-utils/claimEntities.class';
  • {{title}} ({{(contexts.length)}})

    -
    - -
      -
    • - {{context.community }} > {{context.category}} > {{context.concept.label}} - +
      -
    • -
    -
    There are no communities
    +
    + +
    + +
    +
    +

    Selected Projects ({{projects.length}})

    +
      +
    • + {{context.community }} > {{context.category}} > {{context.concept.label}} + + +
    • +
    +
    There are no communities
    +
    +
    diff --git a/portal-2/src/app/claims/linking/selected/selectedProjects.component.ts b/portal-2/src/app/claims/linking/selected/selectedProjects.component.ts index 8fb4c04e..75e3fcb5 100644 --- a/portal-2/src/app/claims/linking/selected/selectedProjects.component.ts +++ b/portal-2/src/app/claims/linking/selected/selectedProjects.component.ts @@ -12,8 +12,15 @@ import {RouterHelper} from '../../../utils/routerHelper.class';
    -
    - + +
    + +
    +
    + +
    +
    +

    Selected Projects ({{projects.length}})

    There are no projects
    +
    +
    diff --git a/portal-2/src/app/claims/linking/selected/selectedResults.component.ts b/portal-2/src/app/claims/linking/selected/selectedResults.component.ts index 36228c11..ccc29e28 100644 --- a/portal-2/src/app/claims/linking/selected/selectedResults.component.ts +++ b/portal-2/src/app/claims/linking/selected/selectedResults.component.ts @@ -9,8 +9,8 @@ import {Dates} from '../../../utils/string-utils.class'; template: ` -
    • -

      {{title}} ({{results.length}})

      +
      @@ -22,6 +22,7 @@ import {Dates} from '../../../utils/string-utils.class';
      +

      {{title}} ({{results.length}})

      There are no research results
      @@ -95,7 +96,7 @@ import {Dates} from '../../../utils/string-utils.class';
      -
    + ` diff --git a/portal-2/src/app/searchPages/find/search.component.ts b/portal-2/src/app/searchPages/find/search.component.ts index 2792d121..7fd1ecab 100644 --- a/portal-2/src/app/searchPages/find/search.component.ts +++ b/portal-2/src/app/searchPages/find/search.component.ts @@ -34,6 +34,7 @@ import {RouterHelper} from '../../utils/routerHelper.class';

    {{pageTitle}}

    +
    diff --git a/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts b/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts index a7e8bcdf..b0859903 100644 --- a/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts +++ b/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts @@ -26,11 +26,11 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
    - Keywords: {{searchUtils.keyword}} + Keywords: {{filter.title}}: - {{value.name}} + , diff --git a/portal-2/src/assets/custom.css b/portal-2/src/assets/custom.css index 6646f551..aeb892e2 100644 --- a/portal-2/src/assets/custom.css +++ b/portal-2/src/assets/custom.css @@ -150,3 +150,9 @@ max-height:265px; .uk-link{ color: #292C3D !important; } +.uk-breadcrumb > :last-child > * { + color:#cbcbcb !important; +} +.uk-breadcrumb .uk-active a{ + color: #767779 !important; +}