[Library| Trunk]
In deposit Search : use result Preview Component Result-Preview Component: apply changes for Deposit promote websiteUrl hide url for not compatible datasources not compatible datasources label changed to "not yet registered" git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58253 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
8bb13d0ff5
commit
fdbec493ff
|
@ -19,6 +19,13 @@
|
|||
|
||||
<ul class="uk-margin-top uk-list uk-margin ">
|
||||
<li *ngFor="let result of results" class="uk-animation-fade">
|
||||
<div class="uk-card uk-card-default uk-padding uk-card-hover">
|
||||
<result-preview [properties]="properties" [showOrganizations]="true"
|
||||
[showSubjects]="true" [result]="getResultPreview(result)" [promoteWebsiteURL]="true">
|
||||
</result-preview>
|
||||
</div>
|
||||
</li>
|
||||
<!--<li *ngFor="let result of results" class="uk-animation-fade">
|
||||
<div class=" uk-card uk-card-small uk-card-default uk-card-body uk-padding-remove-horizontal">
|
||||
<h3 class="uk-card-title uk-margin-remove uk-padding uk-padding-remove-vertical">
|
||||
<div [title] = result.title.accessMode class="uk-h5 uk-grid uk-margin-small-bottom">
|
||||
|
@ -34,7 +41,7 @@
|
|||
<span class="uk-width-expand uk-flex uk-flex-bottom uk-flex-right">
|
||||
<a *ngIf="result['websiteURL']" href="{{result['websiteURL']}}" target="_blank" type="submit" class="uk-float-right uk-button portal-button uk-padding uk-padding-remove-vertical uk-margin-small-left">
|
||||
<span><span>Go to website</span><span uk-icon="arrow-right"></span></span>
|
||||
<!-- <span class="uk-button-text ">Visit repository to deposit</span>-->
|
||||
<!– <span class="uk-button-text ">Visit repository to deposit</span>–>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -76,7 +83,7 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <p>Lorem ipsum <a href="#">dolor</a> sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>-->
|
||||
<!– <p>Lorem ipsum <a href="#">dolor</a> sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>–>
|
||||
</div>
|
||||
</li>
|
||||
</li>-->
|
||||
</ul>
|
||||
|
|
|
@ -5,6 +5,7 @@ import {RouterHelper} from '../utils/routerHelper.class';
|
|||
import {EnvProperties} from '../utils/properties/env-properties';
|
||||
import {ZenodoInformationClass} from "./utils/zenodoInformation.class";
|
||||
import {ActivatedRoute} from "@angular/router";
|
||||
import {ResultPreview} from "../utils/result-preview/result-preview";
|
||||
|
||||
@Component({
|
||||
selector: 'deposit-result',
|
||||
|
@ -71,4 +72,8 @@ export class SearchResultsInDepositComponent {
|
|||
public quote(params: string):string {
|
||||
return '"'+params+'"';
|
||||
}
|
||||
public getResultPreview(result: SearchResult): ResultPreview {
|
||||
return ResultPreview.searchResultConvert(result, (result.entityType)?result.entityType:this.type);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,12 +6,13 @@ import {RouterModule} from '@angular/router';
|
|||
import {ErrorMessagesModule} from '../utils/errorMessages.module';
|
||||
import {SearchResultsInDepositComponent} from './searchResultsInDeposit.component';
|
||||
import {ApprovedByCommunityModule} from '../connect/approvedByCommunity/approved.module';
|
||||
import {ResultPreviewModule} from "../utils/result-preview/result-preview.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
RouterModule, ErrorMessagesModule,
|
||||
ApprovedByCommunityModule
|
||||
ApprovedByCommunityModule, ResultPreviewModule
|
||||
],
|
||||
declarations: [
|
||||
SearchResultsInDepositComponent
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
<div uk-grid>
|
||||
<div [class.uk-width-1-1]="!result.relation" [class.uk-width-1-2]="result.relation"
|
||||
[class.uk-width-3-4@s]="result.relation">
|
||||
<!-- deposit website URL -->
|
||||
<span class="uk-width-expand uk-flex-right">
|
||||
<a *ngIf="result.websiteURL && promoteWebsiteURL" href="{{result.websiteURL}}" target="_blank" type="submit"
|
||||
class="uk-float-right uk-button portal-button uk-padding uk-padding-remove-vertical uk-margin-small-left">
|
||||
<span><span>Go to website</span><span uk-icon="arrow-right"></span></span>
|
||||
</a>
|
||||
</span>
|
||||
<div class="uk-text-small">
|
||||
<span class="uk-text-capitalize">
|
||||
{{getTypeName(result.resultType)}}
|
||||
|
@ -23,8 +30,10 @@
|
|||
<!-- Title -->
|
||||
<div class="uk-margin-small-bottom">
|
||||
<div class="uk-h5 uk-margin-remove">
|
||||
<a *ngIf="result.id" (click)="onTitleClick()" [queryParams]="routerHelper.createQueryParam(urlParam, result.id)"
|
||||
routerLink="/search/{{result.resultType}}" class="portal-link">
|
||||
|
||||
<a *ngIf="result.id && !(result.resultType == 'dataprovider' && result.compatibilityUNKNOWN) "
|
||||
(click)="onTitleClick()" [queryParams]="routerHelper.createQueryParam(urlParam,result.id)"
|
||||
routerLink="/search/{{result.resultType}}" class="portal-link uk-width-expand">
|
||||
<div *ngIf="(result.title) || result.acronym">
|
||||
<span *ngIf="result.acronym">
|
||||
{{result.acronym}}
|
||||
|
@ -37,7 +46,7 @@
|
|||
[no title available]
|
||||
</div>
|
||||
</a>
|
||||
<div *ngIf="!result.id">
|
||||
<div *ngIf="!result.id || (result.resultType == 'dataprovider' && result.compatibilityUNKNOWN)" class="uk-width-expand">
|
||||
<div *ngIf="(result.title) || result.acronym">
|
||||
<span *ngIf="result.acronym">
|
||||
{{result.acronym}}
|
||||
|
@ -50,6 +59,7 @@
|
|||
[no title available]
|
||||
</div>
|
||||
</div>
|
||||
<hr *ngIf="result.websiteURL && promoteWebsiteURL">
|
||||
</div>
|
||||
<!-- Download from-->
|
||||
<div *ngIf="result.hostedBy_collectedFrom && result.hostedBy_collectedFrom.length > 0"
|
||||
|
@ -158,10 +168,14 @@
|
|||
<span *ngIf="result.sc39" class="uk-label custom-label label-sc39" title="Special Clause 39">
|
||||
Special Clause 39
|
||||
</span>{{' '}}
|
||||
<span *ngIf="result.compatibility && result.compatibility != ''"
|
||||
<span *ngIf="result.compatibility && result.compatibility != '' && result.compatibility != 'not available'"
|
||||
class="uk-label custom-label label-compatibility" title="Compatibility">
|
||||
{{result.compatibility}}
|
||||
</span>{{' '}}
|
||||
<span *ngIf="result.compatibility != undefined && result.compatibility != '' && result.compatibility ==
|
||||
'not available'"
|
||||
class="uk-label custom-label label-danger" title="OpenAIRE Compatibility">Not yet registered</span>
|
||||
{{' '}}
|
||||
</div>
|
||||
<!-- Identifiers -->
|
||||
<div *ngIf="result.identifiers && result.identifiers.size > 0">
|
||||
|
@ -208,7 +222,7 @@
|
|||
<span *ngIf="result.organizations.length > 10">...</span>
|
||||
</div>
|
||||
<!-- Website URL -->
|
||||
<div *ngIf="result.websiteURL && result.websiteURL != ''" class="uk-text-small uk-margin-small-bottom">
|
||||
<div *ngIf="result.websiteURL && result.websiteURL != '' && !promoteWebsiteURL" class="uk-text-small uk-margin-small-bottom">
|
||||
<span class="uk-text-muted">Website URL: </span>
|
||||
<span>
|
||||
<a href="{{result.websiteURL}}" target="_blank" class="custom-external custom-icon">
|
||||
|
@ -254,4 +268,4 @@
|
|||
<p class="uk-text-small">
|
||||
{{result.description}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -14,6 +14,7 @@ export class ResultPreviewComponent implements OnInit{
|
|||
@Input() showSubjects: boolean = true;
|
||||
@Input() showOrganizations: boolean = true;
|
||||
@Input() modal: AlertModal = null;
|
||||
@Input() promoteWebsiteURL: boolean = false;
|
||||
public routerHelper: RouterHelper = new RouterHelper();
|
||||
public urlParam: string;
|
||||
|
||||
|
@ -70,4 +71,4 @@ export class ResultPreviewComponent implements OnInit{
|
|||
this.modal.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue