[Explore & Library | new-theme]: Updates of paging in claims and orcid links pages | Fixes for server side rendering.
1. fos.component.ts & sdg.component.ts: [Bug fix] Added properties.domain as prefix in request for vocabulary - Network error on server. 2. displayClaims.component.html: Used <results-and-pages> before results and <paging-no-load> after results. 3. searchMyOrcidResults.component.html: After results use <paging-no-load>. 4. displayClaims.module.ts & searchMyOrcidResults.module.ts: Imported NoLoadPaging. 5. dataProvider.component.ts & organization.component.ts & project.component.ts & resultLanding.component.ts: [Bug fix] Fixed checks in ngAfterContentChecked, not to run on server. 6. dataProvider.service.ts: Added check if there are subjects. 7. orcid-work.component.ts: [Bug fix] On search view, add classes uk-button uk-button-link in orcid actions. 8. newSearchPage.component.ts: Removed console.log.
This commit is contained in:
parent
2fac23fd10
commit
7d563c19a8
|
@ -62,14 +62,16 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="resultsNum" class="uk-width-1-2 uk-grid uk-flex-right uk-flex-middle ">
|
<div *ngIf="resultsNum" class="uk-width-1-2 uk-grid uk-flex-right uk-flex-middle ">
|
||||||
<div class="uk-text-muted uk-text-uppercase">
|
<!-- <div class="uk-text-muted uk-text-uppercase">-->
|
||||||
<span class="uk-text-bold">{{resultsNum|number}}</span> links, page <span
|
<!-- <span class="uk-text-bold">{{resultsNum|number}}</span> links, page <span-->
|
||||||
class="uk-text-bold">{{page | number}}</span> of <span
|
<!-- class="uk-text-bold">{{page | number}}</span> of <span-->
|
||||||
class="uk-text-bold">{{totalPages(resultsNum)|number}}</span>
|
<!-- class="uk-text-bold">{{totalPages(resultsNum)|number}}</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<paging-no-load [currentPage]="page" [totalResults]="resultsNum" [size]="size"
|
<results-and-pages type="links" [page]="page" [pageSize]="size" [totalResults]="resultsNum"></results-and-pages>
|
||||||
[loading]="pageLoading"
|
|
||||||
(pageChange)="pageChange($event)" class="uk-float-right"></paging-no-load>
|
<!-- <paging-no-load [currentPage]="page" [totalResults]="resultsNum" [size]="size"-->
|
||||||
|
<!-- [loading]="pageLoading"-->
|
||||||
|
<!-- (pageChange)="pageChange($event)" class="uk-float-right"></paging-no-load>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -134,36 +136,39 @@
|
||||||
<div *ngIf="!( showErrorMessage || showForbiddenMessage || userValidMessage.length > 0 || (claims
|
<div *ngIf="!( showErrorMessage || showForbiddenMessage || userValidMessage.length > 0 || (claims
|
||||||
&& claims.length
|
&& claims.length
|
||||||
==0))" class="paging-hr uk-margin-top">
|
==0))" class="paging-hr uk-margin-top">
|
||||||
<div class="uk-grid ">
|
<!-- <div class="uk-grid ">-->
|
||||||
<div *ngIf="resultsNum>0" class="uk-width-1-2 uk-text-muted uk-text-uppercase">
|
<!-- <div *ngIf="resultsNum>0" class="uk-width-1-2 uk-text-muted uk-text-uppercase">-->
|
||||||
<span class="uk-text-bold">{{resultsNum|number}}</span> links, page <span
|
<!-- <span class="uk-text-bold">{{resultsNum|number}}</span> links, page <span-->
|
||||||
class="uk-text-bold">{{page | number}}</span> of <span
|
<!-- class="uk-text-bold">{{page | number}}</span> of <span-->
|
||||||
class="uk-text-bold">{{totalPages(resultsNum)|number}}</span>
|
<!-- class="uk-text-bold">{{totalPages(resultsNum)|number}}</span>-->
|
||||||
|
<!---->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div *ngIf="resultsNum" class="uk-width-1-2 ">-->
|
||||||
|
<!-- <paging-no-load [currentPage]="page" [totalResults]="resultsNum" [size]="size"-->
|
||||||
|
<!-- (pageChange)="pageChange($event)" class="uk-float-right"></paging-no-load>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <no-load-paging *ngIf="resultsNum" type="links" [totalResults]="resultsNum" [pageSize]="size" [page]="page" (pageChange)="pageChange($event)"></no-load-paging>-->
|
||||||
|
<paging-no-load *ngIf="resultsNum" [currentPage]="page" [totalResults]="resultsNum" [size]="size"
|
||||||
|
(pageChange)="pageChange($event)" class="uk-float-right"></paging-no-load>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<helper *ngIf="pageContents && pageContents['right'] && pageContents['right'].length > 0"
|
||||||
|
[texts]="pageContents['right']" class="uk-width-1-5"></helper>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="resultsNum" class="uk-width-1-2 ">
|
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
|
||||||
<paging-no-load [currentPage]="page" [totalResults]="resultsNum" [size]="size"
|
[texts]="pageContents['bottom']"></helper>
|
||||||
(pageChange)="pageChange($event)" class="uk-float-right"></paging-no-load>
|
<modal-alert (alertOutput)="confirmClose()">
|
||||||
</div>
|
<h4 class="modal-title uk-text-bold " id="myModalLabel">Are you sure?</h4>
|
||||||
</div>
|
<p>
|
||||||
</div>
|
You are about to delete {{this.selected.length}} link(s) you selected. <br>
|
||||||
</div>
|
<span class="uk-text-bold">
|
||||||
</div>
|
Usually it takes 2-4 weeks for the links to permanently disappear from the Openaire platfrom.
|
||||||
<helper *ngIf="pageContents && pageContents['right'] && pageContents['right'].length > 0"
|
</span>
|
||||||
[texts]="pageContents['right']" class="uk-width-1-5"></helper>
|
</p>
|
||||||
|
|
||||||
</div>
|
<p>Do you want to delete the link(s)?</p>
|
||||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
|
</modal-alert>
|
||||||
[texts]="pageContents['bottom']"></helper>
|
<modal-loading [message]="'Please wait...'"></modal-loading>
|
||||||
<modal-alert (alertOutput)="confirmClose()">
|
|
||||||
<h4 class="modal-title uk-text-bold " id="myModalLabel">Are you sure?</h4>
|
|
||||||
<p>
|
|
||||||
You are about to delete {{this.selected.length}} link(s) you selected. <br>
|
|
||||||
<span class="uk-text-bold">
|
|
||||||
Usually it takes 2-4 weeks for the links to permanently disappear from the Openaire platfrom.
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>Do you want to delete the link(s)?</p>
|
|
||||||
</modal-alert>
|
|
||||||
<modal-loading [message]="'Please wait...'"></modal-loading>
|
|
||||||
|
|
|
@ -21,12 +21,13 @@ import {PiwikServiceModule} from "../../../utils/piwik/piwikService.module";
|
||||||
import {SearchInputModule} from '../../../sharedComponents/search-input/search-input.module';
|
import {SearchInputModule} from '../../../sharedComponents/search-input/search-input.module';
|
||||||
import {InputModule} from '../../../sharedComponents/input/input.module';
|
import {InputModule} from '../../../sharedComponents/input/input.module';
|
||||||
import {LoadingModule} from '../../../utils/loading/loading.module';
|
import {LoadingModule} from '../../../utils/loading/loading.module';
|
||||||
|
import {NoLoadPaging} from "../../../searchPages/searchUtils/no-load-paging.module";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule, FormsModule, RouterModule, ClaimServiceModule, LoadingModalModule, AlertModalModule,
|
CommonModule, FormsModule, RouterModule, ClaimServiceModule, LoadingModalModule, AlertModalModule,
|
||||||
ClaimEntityFormatterModule, PagingModule, HelperModule, Schema2jsonldModule, SEOServiceModule, PiwikServiceModule,
|
ClaimEntityFormatterModule, PagingModule, HelperModule, Schema2jsonldModule, SEOServiceModule, PiwikServiceModule,
|
||||||
IndexInfoServiceModule, MatSelectModule, SearchInputModule, MatAutocompleteModule, MatChipsModule, MatFormFieldModule, MatSlideToggleModule, InputModule, LoadingModule
|
IndexInfoServiceModule, MatSelectModule, SearchInputModule, MatAutocompleteModule, MatChipsModule, MatFormFieldModule, MatSlideToggleModule, InputModule, LoadingModule, NoLoadPaging
|
||||||
|
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
|
|
|
@ -222,7 +222,7 @@ export class DataProviderComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterContentChecked() {
|
ngAfterContentChecked() {
|
||||||
if(this.graph_and_feedback && window) {
|
if(this.graph_and_feedback && typeof document !== 'undefined') {
|
||||||
this.graph_offset = this.calcGraphOffset(this.graph_and_feedback.nativeElement);
|
this.graph_offset = this.calcGraphOffset(this.graph_and_feedback.nativeElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,11 +155,13 @@ export class DataProviderService {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dataProviderInfo.subjects = [];
|
this.dataProviderInfo.subjects = [];
|
||||||
length = Array.isArray(data[0]['subjects']) ? data[0]['subjects'].length : 1;
|
if(data[0].subjects) {
|
||||||
for(let i=0; i<length; i++) {
|
let length = Array.isArray(data[0]['subjects']) ? data[0]['subjects'].length : 1;
|
||||||
let subject = Array.isArray(data[0]['subjects']) ? data[0]['subjects'][i] :data[0]['subjects'];
|
for (let i = 0; i < length; i++) {
|
||||||
if(subject && subject.content) {
|
let subject = Array.isArray(data[0]['subjects']) ? data[0]['subjects'][i] : data[0]['subjects'];
|
||||||
this.dataProviderInfo.subjects.push(subject.content);
|
if (subject && subject.content) {
|
||||||
|
this.dataProviderInfo.subjects.push(subject.content);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -208,7 +208,7 @@ export class OrganizationComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterContentChecked() {
|
ngAfterContentChecked() {
|
||||||
if(this.graph_and_feedback && window) {
|
if(this.graph_and_feedback && typeof document !== 'undefined') {
|
||||||
this.graph_offset = this.calcGraphOffset(this.graph_and_feedback.nativeElement);
|
this.graph_offset = this.calcGraphOffset(this.graph_and_feedback.nativeElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,7 +250,7 @@ export class ProjectComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterContentChecked() {
|
ngAfterContentChecked() {
|
||||||
if(this.graph_and_feedback && window) {
|
if(this.graph_and_feedback && typeof document !== 'undefined') {
|
||||||
this.graph_offset = this.calcGraphOffset(this.graph_and_feedback.nativeElement);
|
this.graph_offset = this.calcGraphOffset(this.graph_and_feedback.nativeElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,7 +239,7 @@ export class ResultLandingComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterContentChecked() {
|
ngAfterContentChecked() {
|
||||||
if(this.graph_and_feedback && window) {
|
if(this.graph_and_feedback && typeof document !== 'undefined') {
|
||||||
this.graph_offset = this.calcGraphOffset(this.graph_and_feedback.nativeElement);
|
this.graph_offset = this.calcGraphOffset(this.graph_and_feedback.nativeElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,9 +33,12 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<no-load-paging *ngIf="totalResults > 0 && previewResults && previewResults.length" [type]="openaireEntities.RESULTS"
|
<!-- <no-load-paging *ngIf="totalResults > 0 && previewResults && previewResults.length" [type]="openaireEntities.RESULTS"-->
|
||||||
(pageChange)="pageChanged($event)"
|
<!-- (pageChange)="pageChanged($event)"-->
|
||||||
[page]="currentPage" [pageSize]="resultsPerPage"
|
<!-- [page]="currentPage" [pageSize]="resultsPerPage"-->
|
||||||
[totalResults]="totalResults">
|
<!-- [totalResults]="totalResults">-->
|
||||||
</no-load-paging>
|
<!-- </no-load-paging>-->
|
||||||
|
<paging-no-load *ngIf="totalResults > 0 && previewResults && previewResults.length"
|
||||||
|
[totalResults]="totalResults" [currentPage]="currentPage" [size]="resultsPerPage"
|
||||||
|
(pageChange)="pageChanged($event)" class="uk-float-right"></paging-no-load>
|
||||||
</div>
|
</div>
|
|
@ -8,12 +8,13 @@ import {ErrorMessagesModule} from "../../utils/errorMessages.module";
|
||||||
import {searcMyOrcidResultsComponent} from "./searchMyOrcidResults.component";
|
import {searcMyOrcidResultsComponent} from "./searchMyOrcidResults.component";
|
||||||
import {OrcidModule} from "../orcid.module";
|
import {OrcidModule} from "../orcid.module";
|
||||||
import {NoLoadPaging} from "../../searchPages/searchUtils/no-load-paging.module";
|
import {NoLoadPaging} from "../../searchPages/searchUtils/no-load-paging.module";
|
||||||
|
import {PagingModule} from "../../utils/paging.module";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule, FormsModule,
|
CommonModule, FormsModule,
|
||||||
RouterModule, ErrorMessagesModule,
|
RouterModule, ErrorMessagesModule,
|
||||||
ResultPreviewModule, OrcidModule, NoLoadPaging
|
ResultPreviewModule, OrcidModule, NoLoadPaging, PagingModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
searcMyOrcidResultsComponent
|
searcMyOrcidResultsComponent
|
||||||
|
|
|
@ -26,7 +26,7 @@ declare var UIkit: any;
|
||||||
class="uk-align-right uk-margin-remove-bottom">
|
class="uk-align-right uk-margin-remove-bottom">
|
||||||
|
|
||||||
<a (click)="currentAction='add'; saveWorkPreparation();"
|
<a (click)="currentAction='add'; saveWorkPreparation();"
|
||||||
[class]="'uk-flex uk-flex-middle uk-flex-right uk-margin-right '+ ((showLoading || !isLoggedIn) ? 'uk-disabled ' : '') + (!isLoggedIn ? 'half-opacity' : '')">
|
[class]="'uk-button uk-button-link uk-flex uk-flex-middle uk-flex-right uk-margin-right '+ ((showLoading || !isLoggedIn) ? 'uk-disabled ' : '') + (!isLoggedIn ? 'half-opacity' : '')">
|
||||||
<icon *ngIf="!showLoading" name="add" ratio="1" flex="true"></icon>
|
<icon *ngIf="!showLoading" name="add" ratio="1" flex="true"></icon>
|
||||||
<span *ngIf="showLoading" class="uk-icon icon-button"><loading [top_margin]="false"></loading></span>
|
<span *ngIf="showLoading" class="uk-icon icon-button"><loading [top_margin]="false"></loading></span>
|
||||||
<span class="uk-margin-small-left uk-flex uk-flex-middle">Add to 
|
<span class="uk-margin-small-left uk-flex uk-flex-middle">Add to 
|
||||||
|
@ -42,7 +42,7 @@ declare var UIkit: any;
|
||||||
[attr.uk-tooltip]="(!isLoggedIn) ? tooltipNoLoggedInUser : tooltipDelete"
|
[attr.uk-tooltip]="(!isLoggedIn) ? tooltipNoLoggedInUser : tooltipDelete"
|
||||||
class="uk-align-right uk-margin-remove-bottom">
|
class="uk-align-right uk-margin-remove-bottom">
|
||||||
<a (click)="currentAction='delete'; deleteWorks();"
|
<a (click)="currentAction='delete'; deleteWorks();"
|
||||||
[class]="'uk-flex uk-flex-middle uk-flex-right uk-margin-right '+ (showLoading ? 'uk-disabled' : '')">
|
[class]="'uk-button uk-button-link uk-flex uk-flex-middle uk-flex-right uk-margin-right '+ (showLoading ? 'uk-disabled' : '')">
|
||||||
<icon *ngIf="!showLoading" name="delete" ratio="0.8" flex="true"></icon>
|
<icon *ngIf="!showLoading" name="delete" ratio="0.8" flex="true"></icon>
|
||||||
<span *ngIf="showLoading" class="uk-icon icon-button"><loading [top_margin]="false"></loading></span>
|
<span *ngIf="showLoading" class="uk-icon icon-button"><loading [top_margin]="false"></loading></span>
|
||||||
<span class="uk-margin-small-left uk-flex uk-flex-middle">Delete from 
|
<span class="uk-margin-small-left uk-flex uk-flex-middle">Delete from 
|
||||||
|
|
|
@ -940,7 +940,6 @@ export class NewSearchPageComponent {
|
||||||
|
|
||||||
if (types.indexOf("datasources") == -1 || types.indexOf("services") == -1) {
|
if (types.indexOf("datasources") == -1 || types.indexOf("services") == -1) {
|
||||||
for (let type of types) {
|
for (let type of types) {
|
||||||
console.log("add type: " + type);
|
|
||||||
params += (params ? ' and ' : '') + ("eosctype exact " + (types.indexOf("datasources") != -1 ? "\"Data Source\"" : "\"Service\""));
|
params += (params ? ' and ' : '') + ("eosctype exact " + (types.indexOf("datasources") != -1 ? "\"Data Source\"" : "\"Service\""));
|
||||||
// allFqs += "&type=" + StringUtils.unquote(StringUtils.URIDecode(type));
|
// allFqs += "&type=" + StringUtils.unquote(StringUtils.URIDecode(type));
|
||||||
}
|
}
|
||||||
|
@ -1366,7 +1365,6 @@ export class NewSearchPageComponent {
|
||||||
//this.parameterValues.push(this.searchUtils.sortBy);
|
//this.parameterValues.push(this.searchUtils.sortBy);
|
||||||
this.parameterValues.push(this.sortedByChanged);
|
this.parameterValues.push(this.sortedByChanged);
|
||||||
}
|
}
|
||||||
console.log(this.resultTypes);
|
|
||||||
if (this.resultTypes &&
|
if (this.resultTypes &&
|
||||||
(
|
(
|
||||||
(this.entityType == 'publication' || this.entityType == 'dataset' || this.entityType == 'software' || this.entityType == 'other' || this.entityType == "result")
|
(this.entityType == 'publication' || this.entityType == 'dataset' || this.entityType == 'software' || this.entityType == 'other' || this.entityType == "result")
|
||||||
|
|
Loading…
Reference in New Issue