[Trunk | Library]:

1. subscribe.service.ts: Remove unnecessary prints.
2. newSearchPage.component.ts: Set default value for field 'sort' to true.
3. newSearchPage.component.html: In <search-sorting> bind entityType parameter.
4. searchResearchResults.component.ts: Remove data binding for 'sort' in <new-search-page>.
5. searchProjects.component.ts & searchOrganizations.component.ts & searchDataProviders.component.ts: Add data binding [sort]="false"in <new-search-page>.


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58594 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2020-05-05 08:46:10 +00:00
parent 7b48445a55
commit d8e31242e8
7 changed files with 7 additions and 11 deletions

View File

@ -36,7 +36,8 @@ import {DatasourcesHelperClass} from "./searchUtils/datasourcesHelper.class";
[filters]="filters"
[simpleView]="simpleView" formPlaceholderText="Search by name, description, subject..."
[showResultCount]="(type=='all' || type == 'deposit')" [showLastIndex]="type!='deposit'"
[tableViewLink]="tableViewLink">
[tableViewLink]="tableViewLink"
[sort]="false">
</new-search-page>

View File

@ -29,7 +29,7 @@ import {NewSearchPageComponent} from "./searchUtils/newSearchPage.component";
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
searchFormClass="organizationsSearchForm"
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter"
[sort]="false"
[filters]="filters"
[simpleView]="simpleView" formPlaceholderText="Search by organization name..."
>

View File

@ -32,6 +32,7 @@ import {RangeFilter} from "../utils/rangeFilter/rangeFilterHelperClasses.class";
[filters]="filters"
[rangeFilters]="rangeFilters" [rangeFields]="rangeFields"
[simpleView]="simpleView" formPlaceholderText="Search by title, acronym, project code..."
[sort]="false"
>
</new-search-page>

View File

@ -29,7 +29,6 @@ import {RangeFilter} from "../utils/rangeFilter/rangeFilterHelperClasses.class";
[openaireLink]=openaireLink
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
searchFormClass="publicationsSearchForm"
[sort]=sort
[filters]="filters" [quickFilter]="quickFilter"
[rangeFilters]="rangeFilters" [rangeFields]="rangeFields"
[simpleView]="simpleView" formPlaceholderText="Search by title, author, abstract, DOI, orcid..."
@ -70,7 +69,6 @@ export class SearchResearchResultsComponent {
@Input() customFilter: SearchCustomFilter = null;
public pagingLimit: number = 0;
public isPiwikEnabled;
public sort: boolean = true;
properties: EnvProperties;
public refineFields: string[] = this.searchFields.RESULT_REFINE_FIELDS;
@ViewChild(NewSearchPageComponent) searchPage: NewSearchPageComponent;

View File

@ -373,7 +373,7 @@
class="uk-grid uk-margin-top uk-margin-bottom">
<div class="uk-width-expand@m uk-grid uk-grid-medium uk-margin-small-bottom">
<search-results-per-page [(size)]="searchUtils.size" (sizeChange)="sizeChanged($event)"></search-results-per-page>
<search-sorting *ngIf="sort" [(sortBy)]="searchUtils.sortBy" (sortByChange)="sortByChanged($event)"></search-sorting>
<search-sorting *ngIf="sort" [entityType]="entityType" [(sortBy)]="searchUtils.sortBy" (sortByChange)="sortByChanged($event)"></search-sorting>
</div>
<!-- uk-flex uk-flex-middle-->
<div class="uk-width-auto@m uk-margin-small-bottom">

View File

@ -49,7 +49,7 @@ export class NewSearchPageComponent {
@Input() oldTotalResults: number = 0;
@Input() openaireLink: string;
@Input() customFilter: SearchCustomFilter;
@Input() sort: boolean = false;
@Input() sort: boolean = true;
@Input() searchFormClass: string = "searchForm";
//From simple:
@Input() rangeFilters: RangeFilter[] = [];

View File

@ -10,9 +10,7 @@ import {BehaviorSubject, Observable} from "rxjs";
export class SubscribeService {
private isSubscribedSubject: BehaviorSubject<boolean> = new BehaviorSubject(false);
constructor(private http: HttpClient) {
console.log("Subscribe service constructor");
}
constructor(private http: HttpClient) {}
public initIsSubscribedToCommunity(properties: EnvProperties, pid: string) {
let url = properties.adminToolsAPIURL + "/community/" + pid + "/is-subscriber/";
@ -58,14 +56,12 @@ export class SubscribeService {
subscribeToCommunity(properties: EnvProperties, pid: string) {
return this.http.post<any>(properties.adminToolsAPIURL + "/community/" + pid + "/subscriber", {}, CustomOptions.getAuthOptionsWithBody())
.pipe(tap(isSubscribed => {
console.log("subscribe servive (subscribeToCommunity): isSubscribed: "+isSubscribed);
this.isSubscribedSubject.next(isSubscribed);}));
}
unSubscribeToCommunity(properties: EnvProperties, pid: string) {
return this.http.post<any>(properties.adminToolsAPIURL + "/community/" + pid + "/subscriber/delete", {}, CustomOptions.getAuthOptionsWithBody())
.pipe(tap(unSubscribed => {
console.log("subscribe servive (unSubscribeToCommunity): isSubscribed: "+!unSubscribed);
this.isSubscribedSubject.next(!unSubscribed);}));
}