[Library |Trunk]

Apply corrections after initial connect update :
	Search all: remove quick selections as it is inside the search page
	Search results: add option to show advanced search link
	QuickSelections: fix widths and margins 


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58525 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-04-23 07:33:23 +00:00
parent 20559bb7d1
commit 777074d274
7 changed files with 23 additions and 20 deletions

View File

@ -67,11 +67,11 @@
</a> </a>
</li> </li>
</ul> </ul>
<quick-selections *ngIf="activeEntity == 'result' && quickFilter" [resultTypes]="resultTypes" <!-- <quick-selections *ngIf="activeEntity == 'result' && quickFilter" [resultTypes]="resultTypes"
(typeChange)="quickSelectionsChanged()" [isDisabled]="disableForms" (typeChange)="quickSelectionsChanged()" [isDisabled]="disableForms"
[quickFilter]="quickFilter" [QFselected]="(quickFilter)?quickFilter.selected:null" [quickFilter]="quickFilter" [QFselected]="(quickFilter)?quickFilter.selected:null"
[properties]="properties"> [properties]="properties">
</quick-selections> </quick-selections>-->
</div> </div>

View File

@ -338,6 +338,8 @@ export class SearchAllComponent {
delete this.parameters['fv0']; delete this.parameters['fv0'];
} }
} }
/*
//quickSelection moved inside the searchpage
private prepareResultParameters() { private prepareResultParameters() {
//quickSelections //quickSelections
if (this.resultTypes && this.activeEntity == "result") { if (this.resultTypes && this.activeEntity == "result") {
@ -368,7 +370,7 @@ export class SearchAllComponent {
this.parameters["page"] = 1; this.parameters["page"] = 1;
this.reload[this.activeEntity] = true; this.reload[this.activeEntity] = true;
this.router.navigate([location.pathname], {queryParams: this.parameters}); this.router.navigate([location.pathname], {queryParams: this.parameters});
} }*/
public keywordChanged($event) { public keywordChanged($event) {

View File

@ -18,7 +18,6 @@ import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
import {SearchAllComponent} from "./searchAll.component"; import {SearchAllComponent} from "./searchAll.component";
import {AdvancedSearchFormModule} from "../searchUtils/advancedSearchForm.module"; import {AdvancedSearchFormModule} from "../searchUtils/advancedSearchForm.module";
import {SearchResearchResultsModule} from "../searchResearchResults.module"; import {SearchResearchResultsModule} from "../searchResearchResults.module";
import {QuickSelectionsModule} from "../searchUtils/quick-selections.module";
import {SearchProjectsModule} from "../searchProjects.module"; import {SearchProjectsModule} from "../searchProjects.module";
import {SearchOrganizationsModule} from "../searchOrganizations.module"; import {SearchOrganizationsModule} from "../searchOrganizations.module";
import {SearchDataProvidersModule} from "../searchDataProviders.module"; import {SearchDataProvidersModule} from "../searchDataProviders.module";
@ -28,7 +27,7 @@ import {SearchDataProvidersModule} from "../searchDataProviders.module";
CommonModule, FormsModule, RouterModule, CommonModule, FormsModule, RouterModule,
DataProvidersServiceModule, ProjectsServiceModule, DataProvidersServiceModule, ProjectsServiceModule,
SearchResearchResultsServiceModule, OrganizationsServiceModule, SearchResearchResultsServiceModule, OrganizationsServiceModule,
BrowseEntitiesModule, SearchResultsModule, PiwikServiceModule, Schema2jsonldModule, SEOServiceModule, AdvancedSearchFormModule, SearchResearchResultsModule, QuickSelectionsModule, SearchProjectsModule, SearchOrganizationsModule, SearchDataProvidersModule BrowseEntitiesModule, SearchResultsModule, PiwikServiceModule, Schema2jsonldModule, SEOServiceModule, AdvancedSearchFormModule, SearchResearchResultsModule, SearchProjectsModule, SearchOrganizationsModule, SearchDataProvidersModule
], ],
declarations: [ declarations: [
SearchAllComponent SearchAllComponent

View File

@ -33,7 +33,7 @@ import {RangeFilter} from "../utils/rangeFilter/rangeFilterHelperClasses.class";
[filters]="filters" [quickFilter]="quickFilter" [filters]="filters" [quickFilter]="quickFilter"
[rangeFilters]="rangeFilters" [rangeFields]="rangeFields" [rangeFilters]="rangeFilters" [rangeFields]="rangeFields"
[simpleView]="simpleView" formPlaceholderText="Search by title, author, abstract, DOI, orcid..." [simpleView]="simpleView" formPlaceholderText="Search by title, author, abstract, DOI, orcid..."
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter" [showBreadcrumb]="showBreadcrumb" [includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter" [showBreadcrumb]="showBreadcrumb" [showAdvancedSearchLink]="showAdvancedSearchLink"
> >
</new-search-page> </new-search-page>
@ -84,6 +84,7 @@ export class SearchResearchResultsComponent {
@Input() includeOnlyResultsAndFilter: boolean = false; @Input() includeOnlyResultsAndFilter: boolean = false;
@Input() showBreadcrumb:boolean = false; @Input() showBreadcrumb:boolean = false;
@Output() searchPageUpdates = new EventEmitter(); @Output() searchPageUpdates = new EventEmitter();
@Input() showAdvancedSearchLink:boolean = true;
subs: any[]=[]; subs: any[]=[];
constructor(private route: ActivatedRoute, private _searchResearchResultsService: SearchResearchResultsService) { constructor(private route: ActivatedRoute, private _searchResearchResultsService: SearchResearchResultsService) {
this.results = []; this.results = [];

View File

@ -18,7 +18,7 @@
<quick-selections [resultTypes]="resultTypes" (typeChange)="queryChanged()" [isDisabled]="isDisabled" <quick-selections [resultTypes]="resultTypes" (typeChange)="queryChanged()" [isDisabled]="isDisabled"
[quickFilter]="quickFilter" [QFselected]="(quickFilter)?quickFilter.selected:null" [quickFilter]="quickFilter" [QFselected]="(quickFilter)?quickFilter.selected:null"
[properties]="properties" class="uk-grid uk-margin-small-left" [properties]="properties" class="uk-grid "
></quick-selections> ></quick-selections>
<hr *ngIf="resultTypes || quickFilter" class="uk-margin-small"> <hr *ngIf="resultTypes || quickFilter" class="uk-margin-small">
<table class=" uk-table uk-table-responsive uk-table-small uk-margin-remove"> <table class=" uk-table uk-table-responsive uk-table-small uk-margin-remove">
@ -147,7 +147,7 @@
[placeholder]="formPlaceholderText" aria-describedby="sizing-addon2" [placeholder]="formPlaceholderText" aria-describedby="sizing-addon2"
[(ngModel)]="selectedFields[0].value" name="keyword"> [(ngModel)]="selectedFields[0].value" name="keyword">
</div> </div>
<div> <div class=" uk-width-xlarge@l uk-width-large@m uk-width-medium">
<quick-selections [resultTypes]="resultTypes" (typeChange)="queryChanged()" [isDisabled]="isDisabled" <quick-selections [resultTypes]="resultTypes" (typeChange)="queryChanged()" [isDisabled]="isDisabled"
[quickFilter]="quickFilter" [QFselected]="(quickFilter)?quickFilter.selected:null" [quickFilter]="quickFilter" [QFselected]="(quickFilter)?quickFilter.selected:null"
[properties]="properties"> [properties]="properties">

View File

@ -112,7 +112,7 @@
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first "> <div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<!-- TODO add breadcrumb here--> <!-- TODO add breadcrumb here-->
<div *ngIf="showBreadcrumb" class=" uk-margin-large-left">Home > Search</div> <div *ngIf="showBreadcrumb" class=" uk-margin-large-left">Home > Search</div>
<div class="uk-container uk-container-large uk-margin-medium-top"> <div class="uk-container uk-container-large">
<div> <div>
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper> <helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
@ -249,8 +249,9 @@
</div> </div>
</div> </div>
<div *ngIf="includeOnlyResultsAndFilter" class="uk-margin-medium-top uk-margin-medium-bottom"> <div *ngIf="includeOnlyResultsAndFilter && (resultTypes || quickFilter)"
<a *ngIf ="advancedSearchLink" routerLinkActive="router-link-active" class="uk-margin-medium-top uk-margin-medium-bottom">
<a *ngIf ="showAdvancedSearchLink && advancedSearchLink" routerLinkActive="router-link-active"
[routerLink]="advancedSearchLink" style="z-index:1;" [queryParams]="this.routerHelper.createQueryParams(this.parameterNames, this.parameterValues)" [routerLink]="advancedSearchLink" style="z-index:1;" [queryParams]="this.routerHelper.createQueryParams(this.parameterNames, this.parameterValues)"
[class]="(disableForms?' uk-disabled uk-link-muted ':'') +' portal-link uk-float-right '">Advanced search [class]="(disableForms?' uk-disabled uk-link-muted ':'') +' portal-link uk-float-right '">Advanced search
</a> </a>

View File

@ -9,14 +9,14 @@ import {debounceTime} from "rxjs/operators";
@Component({ @Component({
selector: 'quick-selections', selector: 'quick-selections',
template: ` template: `
<form *ngIf="resultTypes || quickFilter" [formGroup]="control" class="uk-text-small uk-margin-small-bottom uk-grid"> <form *ngIf="resultTypes || quickFilter" [formGroup]="control" class="uk-text-small uk-margin-small-bottom uk-grid uk-inline uk-flex uk-margin-small-left">
<div *ngIf="quickFilter" class="uk-margin-small-top uk-padding-remove-left "> <div *ngIf="quickFilter" class="uk-margin-small-top uk-padding-remove-left uk-margin-right ">
<span class="uk-text-bold">{{quickFilter.value}}</span> <span class="uk-text-bold">{{quickFilter.value}}</span>
<mat-slide-toggle <mat-slide-toggle
class="uk-margin-small-left" formControlName="QFselected" (change)="quickFilterChanged()"> class="uk-margin-small-left" formControlName="QFselected" (change)="quickFilterChanged()">
</mat-slide-toggle> </mat-slide-toggle>
</div> </div>
<div *ngIf="resultTypes && showEntities" class="uk-margin-small-top"> <div *ngIf="resultTypes && showEntities" class="uk-margin-small-top uk-padding-remove-left">
<span class="uk-text-muted">Include: </span> <span class="uk-text-muted">Include: </span>
<span> <span>
<span *ngIf="showPublications" class="uk-margin-small-left"> <input type="checkbox" id="publ" name="Publications" formControlName="publication" (change)="changed()"> Publications </span> <span *ngIf="showPublications" class="uk-margin-small-left"> <input type="checkbox" id="publ" name="Publications" formControlName="publication" (change)="changed()"> Publications </span>