[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 *ngIf="resultsNum" class="uk-width-1-2 uk-grid uk-flex-right uk-flex-middle ">
|
||||
<div class="uk-text-muted uk-text-uppercase">
|
||||
<span class="uk-text-bold">{{resultsNum|number}}</span> links, page <span
|
||||
class="uk-text-bold">{{page | number}}</span> of <span
|
||||
class="uk-text-bold">{{totalPages(resultsNum)|number}}</span>
|
||||
</div>
|
||||
<paging-no-load [currentPage]="page" [totalResults]="resultsNum" [size]="size"
|
||||
[loading]="pageLoading"
|
||||
(pageChange)="pageChange($event)" class="uk-float-right"></paging-no-load>
|
||||
<!-- <div class="uk-text-muted uk-text-uppercase">-->
|
||||
<!-- <span class="uk-text-bold">{{resultsNum|number}}</span> links, page <span-->
|
||||
<!-- class="uk-text-bold">{{page | number}}</span> of <span-->
|
||||
<!-- class="uk-text-bold">{{totalPages(resultsNum)|number}}</span>-->
|
||||
<!-- </div>-->
|
||||
<results-and-pages type="links" [page]="page" [pageSize]="size" [totalResults]="resultsNum"></results-and-pages>
|
||||
|
||||
<!-- <paging-no-load [currentPage]="page" [totalResults]="resultsNum" [size]="size"-->
|
||||
<!-- [loading]="pageLoading"-->
|
||||
<!-- (pageChange)="pageChange($event)" class="uk-float-right"></paging-no-load>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -134,28 +136,31 @@
|
|||
<div *ngIf="!( showErrorMessage || showForbiddenMessage || userValidMessage.length > 0 || (claims
|
||||
&& claims.length
|
||||
==0))" class="paging-hr uk-margin-top">
|
||||
<div class="uk-grid ">
|
||||
<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
|
||||
class="uk-text-bold">{{page | number}}</span> of <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"
|
||||
<!-- <div class="uk-grid ">-->
|
||||
<!-- <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-->
|
||||
<!-- class="uk-text-bold">{{page | number}}</span> of <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>
|
||||
</div>
|
||||
</div>
|
||||
<helper *ngIf="pageContents && pageContents['right'] && pageContents['right'].length > 0"
|
||||
[texts]="pageContents['right']" class="uk-width-1-5"></helper>
|
||||
|
||||
</div>
|
||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
|
||||
</div>
|
||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
|
||||
[texts]="pageContents['bottom']"></helper>
|
||||
<modal-alert (alertOutput)="confirmClose()">
|
||||
<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>
|
||||
|
@ -165,5 +170,5 @@
|
|||
</p>
|
||||
|
||||
<p>Do you want to delete the link(s)?</p>
|
||||
</modal-alert>
|
||||
<modal-loading [message]="'Please wait...'"></modal-loading>
|
||||
</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 {InputModule} from '../../../sharedComponents/input/input.module';
|
||||
import {LoadingModule} from '../../../utils/loading/loading.module';
|
||||
import {NoLoadPaging} from "../../../searchPages/searchUtils/no-load-paging.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule, ClaimServiceModule, LoadingModalModule, AlertModalModule,
|
||||
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: [
|
||||
|
|
|
@ -222,7 +222,7 @@ export class DataProviderComponent {
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -155,13 +155,15 @@ export class DataProviderService {
|
|||
}
|
||||
|
||||
this.dataProviderInfo.subjects = [];
|
||||
length = Array.isArray(data[0]['subjects']) ? data[0]['subjects'].length : 1;
|
||||
for(let i=0; i<length; i++) {
|
||||
let subject = Array.isArray(data[0]['subjects']) ? data[0]['subjects'][i] :data[0]['subjects'];
|
||||
if(subject && subject.content) {
|
||||
if(data[0].subjects) {
|
||||
let length = Array.isArray(data[0]['subjects']) ? data[0]['subjects'].length : 1;
|
||||
for (let i = 0; i < length; i++) {
|
||||
let subject = Array.isArray(data[0]['subjects']) ? data[0]['subjects'][i] : data[0]['subjects'];
|
||||
if (subject && subject.content) {
|
||||
this.dataProviderInfo.subjects.push(subject.content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if(!Array.isArray(data[0]['description'])) {
|
||||
// this.dataProviderInfo.description = (data[0]['description']) ? String(data[0]['description']) : "";
|
||||
|
|
|
@ -208,7 +208,7 @@ export class OrganizationComponent {
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ export class ProjectComponent {
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ export class ResultLandingComponent {
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,9 +33,12 @@
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
<no-load-paging *ngIf="totalResults > 0 && previewResults && previewResults.length" [type]="openaireEntities.RESULTS"
|
||||
(pageChange)="pageChanged($event)"
|
||||
[page]="currentPage" [pageSize]="resultsPerPage"
|
||||
[totalResults]="totalResults">
|
||||
</no-load-paging>
|
||||
<!-- <no-load-paging *ngIf="totalResults > 0 && previewResults && previewResults.length" [type]="openaireEntities.RESULTS"-->
|
||||
<!-- (pageChange)="pageChanged($event)"-->
|
||||
<!-- [page]="currentPage" [pageSize]="resultsPerPage"-->
|
||||
<!-- [totalResults]="totalResults">-->
|
||||
<!-- </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>
|
|
@ -8,12 +8,13 @@ import {ErrorMessagesModule} from "../../utils/errorMessages.module";
|
|||
import {searcMyOrcidResultsComponent} from "./searchMyOrcidResults.component";
|
||||
import {OrcidModule} from "../orcid.module";
|
||||
import {NoLoadPaging} from "../../searchPages/searchUtils/no-load-paging.module";
|
||||
import {PagingModule} from "../../utils/paging.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
RouterModule, ErrorMessagesModule,
|
||||
ResultPreviewModule, OrcidModule, NoLoadPaging
|
||||
ResultPreviewModule, OrcidModule, NoLoadPaging, PagingModule
|
||||
],
|
||||
declarations: [
|
||||
searcMyOrcidResultsComponent
|
||||
|
|
|
@ -26,7 +26,7 @@ declare var UIkit: any;
|
|||
class="uk-align-right uk-margin-remove-bottom">
|
||||
|
||||
<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>
|
||||
<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 
|
||||
|
@ -42,7 +42,7 @@ declare var UIkit: any;
|
|||
[attr.uk-tooltip]="(!isLoggedIn) ? tooltipNoLoggedInUser : tooltipDelete"
|
||||
class="uk-align-right uk-margin-remove-bottom">
|
||||
<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>
|
||||
<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 
|
||||
|
|
|
@ -940,7 +940,6 @@ export class NewSearchPageComponent {
|
|||
|
||||
if (types.indexOf("datasources") == -1 || types.indexOf("services") == -1) {
|
||||
for (let type of types) {
|
||||
console.log("add type: " + type);
|
||||
params += (params ? ' and ' : '') + ("eosctype exact " + (types.indexOf("datasources") != -1 ? "\"Data Source\"" : "\"Service\""));
|
||||
// allFqs += "&type=" + StringUtils.unquote(StringUtils.URIDecode(type));
|
||||
}
|
||||
|
@ -1366,7 +1365,6 @@ export class NewSearchPageComponent {
|
|||
//this.parameterValues.push(this.searchUtils.sortBy);
|
||||
this.parameterValues.push(this.sortedByChanged);
|
||||
}
|
||||
console.log(this.resultTypes);
|
||||
if (this.resultTypes &&
|
||||
(
|
||||
(this.entityType == 'publication' || this.entityType == 'dataset' || this.entityType == 'software' || this.entityType == 'other' || this.entityType == "result")
|
||||
|
|
Loading…
Reference in New Issue