[Library | Trunk]: Change view of communities results base on mocks

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58547 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2020-04-24 16:32:00 +00:00
parent 23ebd629e9
commit 6f5d69e61f
9 changed files with 82 additions and 129 deletions

View File

@ -1,97 +1,88 @@
<ul [class]="'uk-list uk-list-divider uk-margin ' + custom_class">
<ul [class]="'uk-list uk-margin ' + custom_class" uk-height-match=".communityCard">
<errorMessages [status]="[status]" [type]="'results'"></errorMessages>
<li *ngFor="let result of results" class="uk-animation-fade uk-margin-auto" uk-grid>
<a *ngIf="directLink" [href]="getCommunityPageUrl(result)" target="_blank"
class="uk-width-1-5 uk-height-small uk-card uk-card-default uk-card-small communityCard uk-padding-remove-horizontal uk-inline">
<div *ngIf="result.isSubscribed"
class="uk-position-top-right uk-card-badge portal-card-badge uk-width-1-2 uk-text-small uk-text-center">
<span>Subscribed</span>
<li *ngFor="let result of results" class="uk-animation-fade uk-margin-auto">
<div class="uk-card uk-card-default communityCard uk-position-relative uk-flex uk-flex-middle uk-grid uk-margin-remove-left" >
<div class="badges">
<div *ngIf="result.isSubscribed"
class="portal-card-badge uk-text-center">
<span>Subscribed</span>
</div>
<div *ngIf="result.status == 'manager'"
class="private-card-badge uk-text-center ">
<span>Private</span>
</div>
</div>
<div class="uk-card-body uk-position-center uk-flex uk-flex-middle uk-flex-center">
<img *ngIf="result.logoUrl != null && result.logoUrl != '' " src="{{result.logoUrl}}"
alt="{{(result.title)?result.title:result.shortTitle}} logo">
<span *ngIf="result.logoUrl == null || result.logoUrl == '' && result.type != 'funder'" class="uk-icon">
<a *ngIf="directLink" [href]="getCommunityPageUrl(result)" target="_blank"
class="uk-width-1-5">
<div>
<img *ngIf="result.logoUrl != null && result.logoUrl != '' " src="{{result.logoUrl}}"
alt="{{(result.title)?result.title:result.shortTitle}} logo">
<span *ngIf="result.logoUrl == null || result.logoUrl == '' && result.type != 'funder'" class="uk-icon">
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="2.5"> <circle fill="none"
stroke="#000"
stroke-width="1.1"
cx="7.7" cy="8.6"
r="3.5"></circle> <path
fill="none" stroke="#000" stroke-width="1.1"
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path> <path fill="none"
stroke="#000"
stroke-width="1.1"
d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"></path></svg>
fill="none" stroke="#000" stroke-width="1.1"
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path> <path fill="none"
stroke="#000"
stroke-width="1.1"
d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"></path></svg>
</span>
<div *ngIf="(result.logoUrl == null || result.logoUrl == '' ) && result.type == 'funder' "
[class]="'funderLogo ' + result['jurisdictionLogo'] "></div>
</div>
<div *ngIf="result.status == 'manager'"
class="uk-card-badge private-card-badge uk-width-2-5 uk-position-top-left uk-text-small uk-text-center ">
<span class="uk-padding-small">Private</span>
</div>
</a>
<a *ngIf="!directLink"
class="uk-width-1-5 uk-height-small uk-card uk-card-default uk-card-small communityCard uk-padding-remove-horizontal uk-inline"
(click)="confirmModalOpen(result)">
<div *ngIf="result.isSubscribed"
class="uk-position-top-right uk-card-badge portal-card-badge uk-width-1-2 uk-text-small uk-text-center">
<span>Subscribed</span>
</div>
<div class="uk-card-body uk-position-center uk-flex uk-flex-middle uk-flex-center">
<img *ngIf="result.logoUrl != null && result.logoUrl != '' " src="{{result.logoUrl}}"
alt="{{(result.title)?result.title:result.shortTitle}} logo">
<span *ngIf="(result.logoUrl == null || result.logoUrl == '' ) && result.type != 'funder' " class="uk-icon">
<div *ngIf="(result.logoUrl == null || result.logoUrl == '' ) && result.type == 'funder' "
[class]="'funderLogo ' + result['jurisdictionLogo'] "></div>
</div>
</a>
<a *ngIf="!directLink"
class="uk-width-1-5"
(click)="confirmModalOpen(result)">
<div>
<img *ngIf="result.logoUrl != null && result.logoUrl != '' " src="{{result.logoUrl}}"
alt="{{(result.title)?result.title:result.shortTitle}} logo">
<span *ngIf="(result.logoUrl == null || result.logoUrl == '' ) && result.type != 'funder' " class="uk-icon">
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="2.5"> <circle fill="none"
stroke="#000"
stroke-width="1.1"
cx="7.7" cy="8.6"
r="3.5"></circle> <path
fill="none" stroke="#000" stroke-width="1.1"
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path> <path fill="none"
stroke="#000"
stroke-width="1.1"
d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"></path></svg>
fill="none" stroke="#000" stroke-width="1.1"
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path> <path fill="none"
stroke="#000"
stroke-width="1.1"
d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"></path></svg>
</span>
<div *ngIf="(result.logoUrl == null || result.logoUrl == '' ) && result.type == 'funder' "
[class]="'funderLogo ' + result['jurisdictionLogo'] "></div>
</div>
<div *ngIf="result.status == 'manager'"
class="uk-card-badge private-card-badge uk-width-2-5 uk-position-top-left uk-text-small uk-text-center ">
<span class="uk-padding-small">Private</span>
</div>
</a>
<div class="uk-width-expand">
<div [title]=result.shortTitle class="uk-text-large uk-grid">
<a *ngIf="directLink" [href]="getCommunityPageUrl(result)" target="_blank"
[class]="(result.isManager)?'uk-width-3-4':''">
{{(result.title) ? result.title : result.shortTitle}}
</a>
<a *ngIf="!directLink" (click)="confirmModalOpen(result)" [class]="(result.isManager)?'uk-width-3-4':''">
{{(result.title) ? result.title : result.shortTitle}}
</a>
<manage *ngIf="result.isManager" [communityId]="result.communityId"
class="uk-width-expand uk-margin-auto-right"></manage>
</div>
<div *ngIf="result.description">
<div class="text-justify descriptionText uk-margin-auto-right" [title]="result.description">
{{_formatDescription(result.description)}}
<div *ngIf="(result.logoUrl == null || result.logoUrl == '' ) && result.type == 'funder' "
[class]="'funderLogo ' + result['jurisdictionLogo'] "></div>
</div>
</div>
<div class="uk-padding-small uk-padding-remove-left uk-grid">
<div class="uk-width-1-2">
<span *ngIf="result.date"><b> Creation Date: </b></span>
<span *ngIf="result.date">{{result.date | date:'dd-MM-yyyy'}}</span>
</a>
<div class="uk-width-expand">
<div [title]=result.shortTitle class="uk-text-large uk-grid">
<a *ngIf="directLink" [href]="getCommunityPageUrl(result)" target="_blank"
[class]="(result.isManager)?'uk-width-3-4 portal-link':'portal-link'">
{{(result.title) ? result.title : result.shortTitle}}
</a>
<a *ngIf="!directLink" (click)="confirmModalOpen(result)" [class]="(result.isManager)?'uk-width-3-4':''" class="portal-link">
{{(result.title) ? result.title : result.shortTitle}}
</a>
<manage *ngIf="result.isManager" [communityId]="result.communityId"
class="uk-width-expand uk-margin-auto-right"></manage>
</div>
<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 != ''">{{(result.type == 'ri') ? 'Research Initiative' : 'Research Community'}}</span>
<div class="uk-margin-small-top uk-text-small">
<span class="uk-text-muted" *ngIf="result.date">Creation Date:</span>
<span class="space" *ngIf="result.date">{{result.date | date:'dd-MM-yyyy'}}</span>
<span *ngIf="showType && result.type && result.type != ''" class="uk-margin-left">
<span class="uk-text-muted">Type:</span>
<span class="space">{{(result.type == 'ri') ? 'Research Initiative' : 'Research Community'}}</span>
</span>
<span *ngIf="result['jurisdiction'] && result['jurisdiction']!=''" class="uk-margin-left">
<span class="uk-text-muted">Jurisdiction:</span>
<span class="space">{{result['jurisdiction']}}</span>
</span>
</div>
<div *ngIf="result['jurisdiction'] && result['jurisdiction']!=''"
class="uk-width-expand uk-align-right uk-margin-auto-right">
<span><b> Jurisdiction: </b></span>
<span>{{result['jurisdiction']}}</span>
<div *ngIf="result.description">
<div class="text-justify descriptionText uk-text-small uk-text-muted uk-margin-auto-right" [title]="result.description">
{{_formatDescription(result.description)}}
</div>
</div>
</div>
</div>

View File

@ -80,7 +80,7 @@
<div class="uk-width-1-1">
<div class="uk-position-relative">
<div [class]="'uk-container '+(customFilter && customFilter.queryFieldName ==
'communityId'?'':' aaa uk-margin-large-top')">
'communityId'?'':'uk-margin-large-top')">
<advanced-search-form
[entityType] = "entityType"
[fieldIds]="fieldIds"

View File

@ -11,7 +11,7 @@ import {Router} from '@angular/router';
<a *ngIf="keyword.length > 0" class="uk-form-icon uk-form-icon-flip"
(click)="keyword = ''; keywordChanged()"
uk-icon="icon: close"></a>
<input type="text" class="uk-input uk-width-xlarge@l uk-width-large@m uk-width-medium"
<input type="text" class="uk-input text-input-box uk-width-xlarge@l uk-width-large@m uk-width-medium"
[placeholder]="placeholderText" aria-describedby="sizing-addon2"
[(ngModel)]="keyword" name="keyword">
</div>

View File

@ -44,7 +44,10 @@
<schema2jsonld [URL]="properties.baseLink+baseUrl" type="search" [name]=pageTitle></schema2jsonld>
<div id="tm-main" class=" uk-section uk-padding-remove-top tm-middle" >
<div id="tm-main" class=" uk-section uk-padding-remove-top tm-middle">
<div *ngIf="breadcrumbs" class="uk-container uk-margin-small-top">
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
</div>
<div uk-grid >
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<div class="">
@ -188,8 +191,8 @@
class="uk-grid uk-margin-top uk-margin-bottom">
<!-- <search-results-per-page class="uk-width-1-2@m uk-width-1-1" [(searchUtils)] = "searchUtils" [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-results-per-page> -->
<!-- <search-sorting class="uk-width-1-2@m uk-width-1-1" *ngIf="sort" [(searchUtils)] = "searchUtils" [(sortBy)]="sortBy" [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-sorting> -->
<search-results-per-page class="uk-width-1-2@m uk-width-1-1" [(size)]="searchUtils.size" (sizeChange)="sizeChanged($event)"></search-results-per-page>
<search-sorting class="uk-width-1-2@m uk-width-1-1" *ngIf="sort" [entityType]="entityType" [(sortBy)]="searchUtils.sortBy" (sortByChange)="sortByChanged($event)"></search-sorting>
<search-results-per-page [(size)]="searchUtils.size" (sizeChange)="sizeChanged($event)"></search-results-per-page>
<search-sorting *ngIf="sort" [entityType]="entityType" [(sortBy)]="searchUtils.sortBy" (sortByChange)="sortByChanged($event)"></search-sorting>
</div>
<search-paging *ngIf="searchUtils.totalResults != 1" [type]="type" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues"></search-paging>
<search-paging *ngIf="searchUtils.totalResults == 1" [type]="entityType" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues"></search-paging>

View File

@ -17,6 +17,7 @@ import { SEOService } from '../../sharedComponents/SEO/SEO.servi
import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {ZenodoInformationClass} from "../../deposit/utils/zenodoInformation.class";
import {HelperService} from "../../utils/helper/helper.service";
import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
@Component({
selector: 'search-page',
@ -63,6 +64,7 @@ export class SearchPageComponent {
@ViewChild (ModalLoading) loading : ModalLoading ;
public fieldIdsMap;//: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }};
@Input() keywordFields = [];
@Input() public breadcrumbs: Breadcrumb[];
private searchFieldsHelper:SearchFields = new SearchFields();
private queryParameters: Map<string, string> = new Map<string,string>();
private baseURLWithParameters:string = '';

View File

@ -22,13 +22,14 @@ import { SearchDataproviderMapModule } from './searchDataproviderMap.module';
import {CommunitySearchResultsModule} from "./communitySearchResults.module";
import {SearchResultsModule} from "./searchResults.module";
import {SearchResultsInDepositModule} from "../../deposit/searchResultsInDeposit.module";
import {BreadcrumbsModule} from "../../utils/breadcrumbs/breadcrumbs.module";
@NgModule({
imports: [
CommonModule, FormsModule, RouterModule, SearchFormModule, SearchResultsModule, CommunitySearchResultsModule,
LoadingModalModule, ReportsServiceModule, SearchDataproviderMapModule,
SearchPagingModule, SearchResultsPerPageModule, SearchSortingModule, SearchDownloadModule, ModalModule, SearchFilterModule, PiwikServiceModule, HelperModule, Schema2jsonldModule, SEOServiceModule, SearchResultsModule,
SearchResultsInDepositModule
SearchResultsInDepositModule, BreadcrumbsModule
],
declarations: [
SearchPageComponent

View File

@ -3,21 +3,6 @@ import {Component, Input, Output, EventEmitter} from '@angular/core';
@Component({
selector: 'search-results-per-page',
template: `
<!-- <span class="uk-grid">-->
<!-- <div> Results per page:</div>-->
<!-- <div class="uk-width-small">-->
<!-- <mat-select class="uk-width-auto uk-text-bold matSelection" id="form-horizontal-select" name="select_results_per_page"-->
<!-- [(ngModel)]="size" (ngModelChange)="sizeChanged()"-->
<!-- [disableOptionCentering]="true"-->
<!-- panelClass="matSelectionPanel">-->
<!-- <mat-option [value]="5" > 5</mat-option>-->
<!-- <mat-option [value]="10">10</mat-option>-->
<!-- <mat-option [value]="20">20</mat-option>-->
<!-- <mat-option [value]="50">50</mat-option>-->
<!-- </mat-select>-->
<!-- </div>-->
<!-- </span>-->
<div>
<mat-form-field class="matSelectionFormField">
<mat-label>Results per page:</mat-label>

View File

@ -3,32 +3,6 @@ import {Component, Input, Output, EventEmitter} from '@angular/core';
@Component({
selector: 'search-sorting',
template: `
<!-- <span class="uk-grid">-->
<!-- <div class=""> Sort by:</div>-->
<!-- <div class="uk-width-small">-->
<!-- <mat-select *ngIf="(entityType != 'community' && entityType != 'funder' )" -->
<!-- class="uk-width-auto uk-text-bold matSelection" -->
<!-- id="form-horizontal-select" name="select_results_per_page"-->
<!-- [disableOptionCentering]="true"-->
<!-- panelClass="matSelectionPanel"-->
<!-- [(ngModel)]="sortBy" (ngModelChange)="sortByChanged()">-->
<!-- <mat-option value="">Relevance</mat-option>-->
<!-- <mat-option value="resultdateofacceptance,descending">Date (most recent)</mat-option>-->
<!-- <mat-option value="resultdateofacceptance,ascending">Date (least recent)</mat-option>-->
<!-- </mat-select>-->
<!-- <mat-select *ngIf="(entityType == 'community' || entityType == 'funder')" -->
<!-- class="uk-width-small uk-text-bold matSelection" -->
<!-- id="form-horizontal-select" name="select_results_per_page"-->
<!-- [(ngModel)]="sortBy" (ngModelChange)="sortByChanged()"-->
<!-- [disableOptionCentering]="true"-->
<!-- panelClass="matSelectionPanel">-->
<!-- <mat-option value="">Title</mat-option>-->
<!-- <mat-option value="creationdate,descending">Creation Date (most recent)</mat-option>-->
<!-- <mat-option value="creationdate,ascending">Creation Date (least recent)</mat-option>-->
<!-- </mat-select>-->
<!-- </div>-->
<!-- </span>-->
<div>
<mat-form-field class="matSelectionFormField">
<mat-label>Sort by:</mat-label>
@ -42,7 +16,7 @@ import {Component, Input, Output, EventEmitter} from '@angular/core';
<mat-option value="resultdateofacceptance,ascending">Date (least recent)</mat-option>
</mat-select>
<mat-select *ngIf="(entityType == 'community' || entityType == 'funder')">
<mat-select *ngIf="(entityType == 'community' || entityType == 'funder')"
class="uk-text-bold matSelection"
id="form-horizontal-select" name="select_results_per_page"
[(ngModel)]="sortBy" (ngModelChange)="sortByChanged()"

View File

@ -2,14 +2,11 @@ import { Component, Input} from '@angular/core';
@Component({
selector: 'manage',
template: `
<a [href]="'https://beta.admin.connect.openaire.eu/dashboard?communityId='+communityId"
[class]=" ((buttonSizeSmall)?'uk-button-small':'')+' uk-button uk-button-primary'"
[class]=" ((buttonSizeSmall)?'uk-button-small':'')+' uk-button portal-button'"
target="_blank">
Manage
</a>
`
})