[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:
parent
7b48445a55
commit
d8e31242e8
|
@ -36,7 +36,8 @@ import {DatasourcesHelperClass} from "./searchUtils/datasourcesHelper.class";
|
||||||
[filters]="filters"
|
[filters]="filters"
|
||||||
[simpleView]="simpleView" formPlaceholderText="Search by name, description, subject..."
|
[simpleView]="simpleView" formPlaceholderText="Search by name, description, subject..."
|
||||||
[showResultCount]="(type=='all' || type == 'deposit')" [showLastIndex]="type!='deposit'"
|
[showResultCount]="(type=='all' || type == 'deposit')" [showLastIndex]="type!='deposit'"
|
||||||
[tableViewLink]="tableViewLink">
|
[tableViewLink]="tableViewLink"
|
||||||
|
[sort]="false">
|
||||||
|
|
||||||
</new-search-page>
|
</new-search-page>
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ import {NewSearchPageComponent} from "./searchUtils/newSearchPage.component";
|
||||||
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
|
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
|
||||||
searchFormClass="organizationsSearchForm"
|
searchFormClass="organizationsSearchForm"
|
||||||
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter"
|
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter"
|
||||||
|
[sort]="false"
|
||||||
[filters]="filters"
|
[filters]="filters"
|
||||||
[simpleView]="simpleView" formPlaceholderText="Search by organization name..."
|
[simpleView]="simpleView" formPlaceholderText="Search by organization name..."
|
||||||
>
|
>
|
||||||
|
|
|
@ -32,6 +32,7 @@ import {RangeFilter} from "../utils/rangeFilter/rangeFilterHelperClasses.class";
|
||||||
[filters]="filters"
|
[filters]="filters"
|
||||||
[rangeFilters]="rangeFilters" [rangeFields]="rangeFields"
|
[rangeFilters]="rangeFilters" [rangeFields]="rangeFields"
|
||||||
[simpleView]="simpleView" formPlaceholderText="Search by title, acronym, project code..."
|
[simpleView]="simpleView" formPlaceholderText="Search by title, acronym, project code..."
|
||||||
|
[sort]="false"
|
||||||
>
|
>
|
||||||
</new-search-page>
|
</new-search-page>
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ import {RangeFilter} from "../utils/rangeFilter/rangeFilterHelperClasses.class";
|
||||||
[openaireLink]=openaireLink
|
[openaireLink]=openaireLink
|
||||||
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
|
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
|
||||||
searchFormClass="publicationsSearchForm"
|
searchFormClass="publicationsSearchForm"
|
||||||
[sort]=sort
|
|
||||||
[filters]="filters" [quickFilter]="quickFilter"
|
[filters]="filters" [quickFilter]="quickFilter"
|
||||||
[rangeFilters]="rangeFilters" [rangeFields]="rangeFields"
|
[rangeFilters]="rangeFilters" [rangeFields]="rangeFields"
|
||||||
[simpleView]="simpleView" formPlaceholderText="Search by title, author, abstract, DOI, orcid..."
|
[simpleView]="simpleView" formPlaceholderText="Search by title, author, abstract, DOI, orcid..."
|
||||||
|
@ -70,7 +69,6 @@ export class SearchResearchResultsComponent {
|
||||||
@Input() customFilter: SearchCustomFilter = null;
|
@Input() customFilter: SearchCustomFilter = null;
|
||||||
public pagingLimit: number = 0;
|
public pagingLimit: number = 0;
|
||||||
public isPiwikEnabled;
|
public isPiwikEnabled;
|
||||||
public sort: boolean = true;
|
|
||||||
properties: EnvProperties;
|
properties: EnvProperties;
|
||||||
public refineFields: string[] = this.searchFields.RESULT_REFINE_FIELDS;
|
public refineFields: string[] = this.searchFields.RESULT_REFINE_FIELDS;
|
||||||
@ViewChild(NewSearchPageComponent) searchPage: NewSearchPageComponent;
|
@ViewChild(NewSearchPageComponent) searchPage: NewSearchPageComponent;
|
||||||
|
|
|
@ -373,7 +373,7 @@
|
||||||
class="uk-grid uk-margin-top uk-margin-bottom">
|
class="uk-grid uk-margin-top uk-margin-bottom">
|
||||||
<div class="uk-width-expand@m uk-grid uk-grid-medium uk-margin-small-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-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>
|
</div>
|
||||||
<!-- uk-flex uk-flex-middle-->
|
<!-- uk-flex uk-flex-middle-->
|
||||||
<div class="uk-width-auto@m uk-margin-small-bottom">
|
<div class="uk-width-auto@m uk-margin-small-bottom">
|
||||||
|
|
|
@ -49,7 +49,7 @@ export class NewSearchPageComponent {
|
||||||
@Input() oldTotalResults: number = 0;
|
@Input() oldTotalResults: number = 0;
|
||||||
@Input() openaireLink: string;
|
@Input() openaireLink: string;
|
||||||
@Input() customFilter: SearchCustomFilter;
|
@Input() customFilter: SearchCustomFilter;
|
||||||
@Input() sort: boolean = false;
|
@Input() sort: boolean = true;
|
||||||
@Input() searchFormClass: string = "searchForm";
|
@Input() searchFormClass: string = "searchForm";
|
||||||
//From simple:
|
//From simple:
|
||||||
@Input() rangeFilters: RangeFilter[] = [];
|
@Input() rangeFilters: RangeFilter[] = [];
|
||||||
|
|
|
@ -10,9 +10,7 @@ import {BehaviorSubject, Observable} from "rxjs";
|
||||||
export class SubscribeService {
|
export class SubscribeService {
|
||||||
private isSubscribedSubject: BehaviorSubject<boolean> = new BehaviorSubject(false);
|
private isSubscribedSubject: BehaviorSubject<boolean> = new BehaviorSubject(false);
|
||||||
|
|
||||||
constructor(private http: HttpClient) {
|
constructor(private http: HttpClient) {}
|
||||||
console.log("Subscribe service constructor");
|
|
||||||
}
|
|
||||||
|
|
||||||
public initIsSubscribedToCommunity(properties: EnvProperties, pid: string) {
|
public initIsSubscribedToCommunity(properties: EnvProperties, pid: string) {
|
||||||
let url = properties.adminToolsAPIURL + "/community/" + pid + "/is-subscriber/";
|
let url = properties.adminToolsAPIURL + "/community/" + pid + "/is-subscriber/";
|
||||||
|
@ -58,14 +56,12 @@ export class SubscribeService {
|
||||||
subscribeToCommunity(properties: EnvProperties, pid: string) {
|
subscribeToCommunity(properties: EnvProperties, pid: string) {
|
||||||
return this.http.post<any>(properties.adminToolsAPIURL + "/community/" + pid + "/subscriber", {}, CustomOptions.getAuthOptionsWithBody())
|
return this.http.post<any>(properties.adminToolsAPIURL + "/community/" + pid + "/subscriber", {}, CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(tap(isSubscribed => {
|
.pipe(tap(isSubscribed => {
|
||||||
console.log("subscribe servive (subscribeToCommunity): isSubscribed: "+isSubscribed);
|
|
||||||
this.isSubscribedSubject.next(isSubscribed);}));
|
this.isSubscribedSubject.next(isSubscribed);}));
|
||||||
}
|
}
|
||||||
|
|
||||||
unSubscribeToCommunity(properties: EnvProperties, pid: string) {
|
unSubscribeToCommunity(properties: EnvProperties, pid: string) {
|
||||||
return this.http.post<any>(properties.adminToolsAPIURL + "/community/" + pid + "/subscriber/delete", {}, CustomOptions.getAuthOptionsWithBody())
|
return this.http.post<any>(properties.adminToolsAPIURL + "/community/" + pid + "/subscriber/delete", {}, CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(tap(unSubscribed => {
|
.pipe(tap(unSubscribed => {
|
||||||
console.log("subscribe servive (unSubscribeToCommunity): isSubscribed: "+!unSubscribed);
|
|
||||||
this.isSubscribedSubject.next(!unSubscribed);}));
|
this.isSubscribedSubject.next(!unSubscribed);}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue