[Library]
Display Claims: Hide recent claims section add status column in all claims git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@54767 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
cd7da4cc3b
commit
977d34c2a6
|
@ -51,7 +51,7 @@
|
|||
|
||||
<div *ngIf="activeTab == 'crossref'" id="crossref" >
|
||||
<div class="uk-margin-top" >
|
||||
<div *ngIf="crossrefStatus == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">s</div>
|
||||
<div *ngIf="crossrefStatus == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"></div>
|
||||
<div *ngIf="crossrefStatus != errorCodes.LOADING && crossrefResults.length == 0" class="uk-alert uk-alert-primary" role="alert">No Results found</div>
|
||||
<div *ngIf="crossrefStatus == errorCodes.ERROR" class="uk-alert uk-alert-warning" role="alert">An Error Occured</div>
|
||||
<div *ngIf="crossrefStatus == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger" role="alert">Service not available</div>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
Newly added links for OpenAIRE research results will be available on the next run of our algorithms.
|
||||
<div class="uk-margin-left">Links to external results (Crossref, Datacite, Orcid) are automatically added in OpenAIRE information space.</div>
|
||||
</div> -->
|
||||
<div *ngIf="showLatestClaims && recentClaims.length > 0" class="uk-section uk-section-muted uk-padding-small uk-padding-right uk-padding-left">
|
||||
<!-- <div *ngIf="showLatestClaims && recentClaims.length > 0" class="uk-section uk-section-muted uk-padding-small uk-padding-right uk-padding-left">
|
||||
<div *ngIf="showLatestClaims && recentClaims.length > 0" class="uk-h5">
|
||||
<span uk-tooltip="title:<div class='uk-margin-small'> Claims created during the last 24 hours</div>">
|
||||
Recent links
|
||||
|
@ -42,7 +42,7 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<form class="">
|
||||
|
||||
|
@ -147,6 +147,7 @@
|
|||
|
||||
<th *ngIf="showUserEmail"><a (click)="changeOrderby('user')" >Claimed by</a> </th>
|
||||
<th><a (click)="changeOrderby('date')"> Claimed Date</a></th>
|
||||
<th *ngIf="showLatestClaims">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -157,6 +158,13 @@
|
|||
<td><claim-entity [entity]="claim.source" [type]="claim.sourceType" [(properties)]=properties [externalPortalUrl]=externalPortalUrl> </claim-entity></td>
|
||||
<td *ngIf="showUserEmail">{{claim.userMail}}</td>
|
||||
<td>{{claim.date}}</td>
|
||||
<td>
|
||||
|
||||
<span class="uk-icon" [attr.uk-tooltip]="'title:<div class=\'uk-margin-small\'>'+getclaimStatus(claim)+'</div>'">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="question" ratio="1">
|
||||
<circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle><circle cx="10.44" cy="14.42" r="1.05"></circle><path fill="none" stroke="#000" stroke-width="1.2" d="M8.17,7.79 C8.17,4.75 12.72,4.73 12.72,7.72 C12.72,8.67 11.81,9.15 11.23,9.75 C10.75,10.24 10.51,10.73 10.45,11.4 C10.44,11.53 10.43,11.64 10.43,11.75"></path></svg>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -82,7 +82,7 @@ private seoService: SEOService) {
|
|||
@Input() myClaims: boolean= false ;
|
||||
@Input() isAdmin:boolean = false;
|
||||
@Input() showLatestClaims:boolean = false;
|
||||
recentClaims = [];
|
||||
// recentClaims = [];
|
||||
page : number;
|
||||
size:number;
|
||||
sizes = [10,20,30,50];
|
||||
|
@ -193,18 +193,18 @@ manageAPIData(data){
|
|||
var dateTomillis = d.getTime();
|
||||
var millis24h:number = 24*3600000;
|
||||
console.log("Date is:"+dateTomillis);
|
||||
if(this.showLatestClaims && this.recentClaims.length == 0){
|
||||
this.recentClaims = [];
|
||||
for(var i=0;i<data.data.length;i++){
|
||||
var claimDate = new Date(data.data[i].date);
|
||||
var claimDateToMillis = claimDate.getTime()
|
||||
// console.log("Claim Date is:"+claimDateToMillis + " "+(dateTomillis - claimDateToMillis));
|
||||
if((dateTomillis - claimDateToMillis)<millis24h){
|
||||
// console.log("Claim in:"+ " "+(dateTomillis - claimDateToMillis)+" < " +(millis24h));
|
||||
this.recentClaims.push(data.data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if(this.showLatestClaims && this.recentClaims.length == 0){
|
||||
// this.recentClaims = [];
|
||||
// for(var i=0;i<data.data.length;i++){
|
||||
// var claimDate = new Date(data.data[i].date);
|
||||
// var claimDateToMillis = claimDate.getTime()
|
||||
// // console.log("Claim Date is:"+claimDateToMillis + " "+(dateTomillis - claimDateToMillis));
|
||||
// if((dateTomillis - claimDateToMillis)<millis24h){
|
||||
// // console.log("Claim in:"+ " "+(dateTomillis - claimDateToMillis)+" < " +(millis24h));
|
||||
// this.recentClaims.push(data.data[i]);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
this.claims = data.data;
|
||||
this.resultsNum= data.total;
|
||||
|
||||
|
|
Loading…
Reference in New Issue