Library: Add showType parameter on search components for communities.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@56845 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2019-08-05 10:30:19 +00:00
parent 0e59e7b6b4
commit 390ab2b072
4 changed files with 11 additions and 2 deletions

View File

@ -79,7 +79,7 @@
<span *ngIf="result.date"><b> Creation Date: </b></span>
<span *ngIf="result.date">{{result.date | date:'dd-MM-yyyy'}}</span>
</div>
<div class="uk-width-expand uk-align-right uk-margin-auto-right">
<div *ngIf="showType" class="uk-width-expand uk-align-right uk-margin-auto-right">
<span *ngIf="result.type && result.type != ''"><b> Type: </b></span>
<span
*ngIf="result.type && result.type != ''">{{(result.type == 'ri') ? 'Research Initiative' : 'Research Community'}}</span>

View File

@ -15,6 +15,7 @@ export class CommunitySearchResultsComponent {
@Input() results: CommunityInfo[];
@Input() status: number;
@Input() type: string;
@Input() showType = false;
@Input() showLoading: boolean = false;
@Input() custom_class: string = "search-results";
@Input() properties: EnvProperties;

View File

@ -105,6 +105,9 @@
</div>
</div>
<div *ngIf="filters.length === 0 && searchUtils.keyword.length === 0" class="uk-margin-top">
<span class="uk-text-meta">No filters available</span>
</div>
<div class="uk-text-large">Filter By:</div>
<search-filter *ngFor="let filter of filters " [addShowMore]=false [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)" ></search-filter>
</div>
@ -165,6 +168,9 @@
<a *ngIf= "showUnknownFilters" class = " portal-link" (click) = "clearFilters() " >Try new Query</a>
</div>
</div>
<div *ngIf="filters.length === 0 && searchUtils.keyword.length === 0" class="uk-margin-top">
<span class="uk-text-meta">No filters available</span>
</div>
<search-filter *ngFor="let filter of filters " [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline" [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)" ></search-filter>
</div>
<!-- </div> -->
@ -200,6 +206,7 @@
[results]="results"
[status]="searchUtils.status"
[type]="entityType"
[showType]="showType"
[showLoading]="true" [properties]=properties>
</community-search-result>
</div>

View File

@ -60,6 +60,7 @@ export class SearchPageComponent {
@Input() newQueryButton: boolean = true;
@Input() lastIndex: boolean = true;
@Input() hasPrefix: boolean = true;
@Input() showType = false;
//@Input() sortBy: string = "";
@ViewChild (ModalLoading) loading : ModalLoading ;
public fieldIdsMap;//: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }};
@ -95,7 +96,7 @@ export class SearchPageComponent {
}
ngOnInit() {
console.log(this.filters)
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;