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:
parent
0e59e7b6b4
commit
390ab2b072
|
@ -79,7 +79,7 @@
|
||||||
<span *ngIf="result.date"><b> Creation Date: </b></span>
|
<span *ngIf="result.date"><b> Creation Date: </b></span>
|
||||||
<span *ngIf="result.date">{{result.date | date:'dd-MM-yyyy'}}</span>
|
<span *ngIf="result.date">{{result.date | date:'dd-MM-yyyy'}}</span>
|
||||||
</div>
|
</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 != ''"><b> Type: </b></span>
|
||||||
<span
|
<span
|
||||||
*ngIf="result.type && result.type != ''">{{(result.type == 'ri') ? 'Research Initiative' : 'Research Community'}}</span>
|
*ngIf="result.type && result.type != ''">{{(result.type == 'ri') ? 'Research Initiative' : 'Research Community'}}</span>
|
||||||
|
|
|
@ -15,6 +15,7 @@ export class CommunitySearchResultsComponent {
|
||||||
@Input() results: CommunityInfo[];
|
@Input() results: CommunityInfo[];
|
||||||
@Input() status: number;
|
@Input() status: number;
|
||||||
@Input() type: string;
|
@Input() type: string;
|
||||||
|
@Input() showType = false;
|
||||||
@Input() showLoading: boolean = false;
|
@Input() showLoading: boolean = false;
|
||||||
@Input() custom_class: string = "search-results";
|
@Input() custom_class: string = "search-results";
|
||||||
@Input() properties: EnvProperties;
|
@Input() properties: EnvProperties;
|
||||||
|
|
|
@ -105,6 +105,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</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>
|
<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>
|
<search-filter *ngFor="let filter of filters " [addShowMore]=false [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)" ></search-filter>
|
||||||
</div>
|
</div>
|
||||||
|
@ -165,6 +168,9 @@
|
||||||
<a *ngIf= "showUnknownFilters" class = " portal-link" (click) = "clearFilters() " >Try new Query</a>
|
<a *ngIf= "showUnknownFilters" class = " portal-link" (click) = "clearFilters() " >Try new Query</a>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
<search-filter *ngFor="let filter of filters " [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline" [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)" ></search-filter>
|
||||||
</div>
|
</div>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
|
@ -200,6 +206,7 @@
|
||||||
[results]="results"
|
[results]="results"
|
||||||
[status]="searchUtils.status"
|
[status]="searchUtils.status"
|
||||||
[type]="entityType"
|
[type]="entityType"
|
||||||
|
[showType]="showType"
|
||||||
[showLoading]="true" [properties]=properties>
|
[showLoading]="true" [properties]=properties>
|
||||||
</community-search-result>
|
</community-search-result>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -60,6 +60,7 @@ export class SearchPageComponent {
|
||||||
@Input() newQueryButton: boolean = true;
|
@Input() newQueryButton: boolean = true;
|
||||||
@Input() lastIndex: boolean = true;
|
@Input() lastIndex: boolean = true;
|
||||||
@Input() hasPrefix: boolean = true;
|
@Input() hasPrefix: boolean = true;
|
||||||
|
@Input() showType = false;
|
||||||
//@Input() sortBy: string = "";
|
//@Input() sortBy: string = "";
|
||||||
@ViewChild (ModalLoading) loading : ModalLoading ;
|
@ViewChild (ModalLoading) loading : ModalLoading ;
|
||||||
public fieldIdsMap;//: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }};
|
public fieldIdsMap;//: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }};
|
||||||
|
@ -95,7 +96,7 @@ export class SearchPageComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
console.log(this.filters)
|
||||||
this.route.data
|
this.route.data
|
||||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||||
this.properties = data.envSpecific;
|
this.properties = data.envSpecific;
|
||||||
|
|
Loading…
Reference in New Issue