[develop | DONE | ADDED]: funders.component.ts: Adding sorting options by Research products and by Projects & Renamed typo for descending order (desc instead of dsc) | funders.component.less: Commented css rule for "custom-view-button" class (now available on general.less).
This commit is contained in:
parent
0181035409
commit
ff3e56465e
|
@ -21,22 +21,22 @@
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-view-button {
|
//.custom-view-button {
|
||||||
padding: 4px;
|
// padding: 4px;
|
||||||
background: @light-color;
|
// background: @light-color;
|
||||||
border: 1px solid @disable-color;
|
// border: 1px solid @disable-color;
|
||||||
border-radius: 4px;
|
// border-radius: 4px;
|
||||||
icon {
|
// icon {
|
||||||
color: @disable-color;
|
// color: @disable-color;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
&.active {
|
// &.active {
|
||||||
background: transparent linear-gradient(315deg, @primary-light-color 0%, @primary-dark-color 100%) 0% 0% no-repeat padding-box;
|
// background: transparent linear-gradient(315deg, @primary-light-color 0%, @primary-dark-color 100%) 0% 0% no-repeat padding-box;
|
||||||
icon {
|
// icon {
|
||||||
color: @light-color;
|
// color: @light-color;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
// .uk-card {
|
// .uk-card {
|
||||||
// &.funder-grid {
|
// &.funder-grid {
|
||||||
|
|
|
@ -18,6 +18,7 @@ import {LayoutService} from '../openaireLibrary/dashboard/sharedComponents/sideb
|
||||||
import {FormBuilder, FormControl} from '@angular/forms';
|
import {FormBuilder, FormControl} from '@angular/forms';
|
||||||
import {debounceTime, distinctUntilChanged} from 'rxjs/operators';
|
import {debounceTime, distinctUntilChanged} from 'rxjs/operators';
|
||||||
import {GroupedRequestsService} from "../openaireLibrary/services/groupedRequests.service";
|
import {GroupedRequestsService} from "../openaireLibrary/services/groupedRequests.service";
|
||||||
|
import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'funders',
|
selector: 'funders',
|
||||||
|
@ -31,6 +32,7 @@ export class FundersComponent implements OnInit {
|
||||||
pageTitle: string = "OpenAIRE - Explore | Funders";
|
pageTitle: string = "OpenAIRE - Explore | Funders";
|
||||||
pageDescription: string = "Funders | Be an integral part of the open R&I ecosystem";
|
pageDescription: string = "Funders | Be an integral part of the open R&I ecosystem";
|
||||||
properties: EnvProperties = properties;
|
properties: EnvProperties = properties;
|
||||||
|
public openaireEntities = OpenaireEntities;
|
||||||
breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'funders'}];
|
breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'funders'}];
|
||||||
showLoading: boolean = true;
|
showLoading: boolean = true;
|
||||||
isMobile: boolean = false;
|
isMobile: boolean = false;
|
||||||
|
@ -111,10 +113,12 @@ export class FundersComponent implements OnInit {
|
||||||
{value: 'dashboard', label: 'Funders with dashboard'}
|
{value: 'dashboard', label: 'Funders with dashboard'}
|
||||||
];
|
];
|
||||||
this.sortOptions = [
|
this.sortOptions = [
|
||||||
{value: 'alphAsc', label: 'Alphabetically Asc. (A-Z)'},
|
{value: 'alphAsc', label: 'Alphabetically asc. (A-Z)'},
|
||||||
{value: 'alphDsc', label: 'Alphabetically Dsc. (Z-A)'},
|
{value: 'alphDsc', label: 'Alphabetically desc. (Z-A)'},
|
||||||
{value: 'oaDsc', label: '"Open Access %" Dsc.'},
|
{value: 'oaDsc', label: 'Open Access % desc.'},
|
||||||
{value: 'countryAsc', label: 'Country Asc. (A-Z)'}
|
{value: 'countryAsc', label: 'Country desc. (A-Z)'},
|
||||||
|
{value: 'researcProductsDsc', label: this.openaireEntities.RESULTS+' desc.'},
|
||||||
|
{value: 'projectsDsc', label: this.openaireEntities.PROJECTS+' desc.'}
|
||||||
];
|
];
|
||||||
this.getFunders();
|
this.getFunders();
|
||||||
this.keywordControl = this.fb.control('');
|
this.keywordControl = this.fb.control('');
|
||||||
|
@ -355,6 +359,12 @@ export class FundersComponent implements OnInit {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case "researcProductsDsc":
|
||||||
|
this.funders = this.funders.sort((a, b) => b['researchProducts'] - a['researchProducts']);
|
||||||
|
break;
|
||||||
|
case "projectsDsc":
|
||||||
|
this.funders = this.funders.sort((a, b) => b['projects'] - a['projects']);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
this.filtering();
|
this.filtering();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue