[Library | develop]: searchSorting.component.ts: Do not add new sorting options in production yet.
This commit is contained in:
parent
966dedde45
commit
0d22ba8a3b
|
@ -1,5 +1,6 @@
|
|||
import {Component, Input, Output, EventEmitter} from '@angular/core';
|
||||
import {Option} from "../../sharedComponents/input/input.component";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'search-sorting',
|
||||
|
@ -19,15 +20,21 @@ export class SearchSortingComponent {
|
|||
@Input() entityType: string = '';
|
||||
@Output() sortByChange = new EventEmitter();
|
||||
public options: Option[];
|
||||
private generalOptions = [
|
||||
{value: '', label: 'Relevance'},
|
||||
{value: 'resultdateofacceptance,descending', label: 'Date (most recent)'},
|
||||
{value: 'resultdateofacceptance,ascending', label: 'Date (least recent)'},
|
||||
{value: 'citation_count,descending', label: 'Citation Count'},
|
||||
{value: 'popularity,descending', label: 'Popularity'},
|
||||
{value: 'influence,descending', label: 'Influence'},
|
||||
{value: 'impulse,descending', label: 'Impulse'}
|
||||
];
|
||||
private generalOptions = properties.environment != "production" ?
|
||||
[
|
||||
{value: '', label: 'Relevance'},
|
||||
{value: 'resultdateofacceptance,descending', label: 'Date (most recent)'},
|
||||
{value: 'resultdateofacceptance,ascending', label: 'Date (least recent)'},
|
||||
{value: 'citation_count,descending', label: 'Citation Count'},
|
||||
{value: 'popularity,descending', label: 'Popularity'},
|
||||
{value: 'influence,descending', label: 'Influence'},
|
||||
{value: 'impulse,descending', label: 'Impulse'}
|
||||
] :
|
||||
[
|
||||
{value: '', label: 'Relevance'},
|
||||
{value: 'resultdateofacceptance,descending', label: 'Date (most recent)'},
|
||||
{value: 'resultdateofacceptance,ascending', label: 'Date (least recent)'}
|
||||
];
|
||||
private communityOptions = [
|
||||
{value: '', label: 'Title'},
|
||||
{value: 'creationdate,descending', label: 'Creation Date (most recent)'},
|
||||
|
|
Loading…
Reference in New Issue