Commit 0af4eb18 authored by ncastejon's avatar ncastejon
Browse files

Add new placeholders for data series and non data series for results page

parent d2620678
Pipeline #1625 passed with stages
in 23 minutes and 20 seconds
......@@ -4117,7 +4117,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
......@@ -4579,6 +4580,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......
......@@ -24,20 +24,24 @@
</span>
<div class="related-dataset">
<div class="related-dataset-item">
<img [src]="parent.imageUrl" alt="dataset parent thumbnail image" onerror="this.onerror=null;this.src='./assets/img/no-image.png';this.alt='Default image'">
<a class="link-without-decoration" [routerLink]="['/', AppRoutes.datasets.uri, parent.id]">{{parent.title}}</a>
<img [src]="parent.imageUrl" alt="dataset parent thumbnail image"
onerror="this.onerror=null;this.src='./assets/img/vignette-collection.png';this.alt='Default image'">
<a class="link-without-decoration"
[routerLink]="['/', AppRoutes.datasets.uri, parent.id]">{{parent.title}}</a>
</div>
</div>
</div>
<div class="info-section" *ngIf="children.length > 0">
<span class="info-title" i18n="@@dataset.info.childrenDataset">
Child datasets
Child datasets
</span>
<div class="related-dataset">
<div class="related-dataset-item" *ngFor="let child of children">
<img [src]="child.imageUrl" alt="dataset children thumbnail image" onerror="this.onerror=null;this.src='./assets/img/no-image.png';this.alt='Default image'">
<a class="link-without-decoration" [routerLink]="['/', AppRoutes.datasets.uri, child.uuid]">{{child.title}}</a>
<img [src]="child.imageUrl" alt="dataset children thumbnail image"
onerror="this.onerror=null;this.src='./assets/img/vignette-data.png';this.alt='Default image'">
<a class="link-without-decoration"
[routerLink]="['/', AppRoutes.datasets.uri, child.uuid]">{{child.title}}</a>
</div>
</div>
</div>
......@@ -145,15 +149,17 @@
</span>
<div class="summary">
<div>
<img class="icon-wrapper" src="./assets/img/resume_opened_lock.svg" alt="Opened lock icon" *ngIf="summaryInfo.isOpenAccess; else lockedIconTemplate">
<img class="icon-wrapper" src="./assets/img/resume_opened_lock.svg" alt="Opened lock icon"
*ngIf="summaryInfo.isOpenAccess; else lockedIconTemplate">
<ng-template #lockedIconTemplate>
<img class="icon-wrapper" src="./assets/img/resume_closed_lock.svg" alt="Closed lock icon">
<img class="icon-wrapper" src="./assets/img/resume_closed_lock.svg" alt="Closed lock icon">
</ng-template>
<span>{{ summaryInfo.restriction }}</span>
</div>
<div>
<img class="icon-wrapper" src="./assets/img/resume_publish.svg" alt="Publish icon">
<span i18n="@@dataset.info.publishDate">Published on {{ (summaryInfo.publicationDate | date: 'dd/MM/yyyy') || '-' }}</span>
<span i18n="@@dataset.info.publishDate">Published on
{{ (summaryInfo.publicationDate | date: 'dd/MM/yyyy') || '-' }}</span>
</div>
<div>
<img class="icon-wrapper" src="./assets/img/resume_refresh.svg" alt="Refresh icon">
......@@ -185,7 +191,7 @@
{{ constraint }}
</p>
<a [href]="licenceUrl" target="_blank" class="button btn-blue-text btn-consult-license" *ngIf="licenceUrl"
i18n="@@dataset.info.consultLicense">
i18n="@@dataset.info.consultLicense">
Consult the license
</a>
</div>
......@@ -205,4 +211,4 @@
[queryParams]="{ subject: metadata.title }">Contact us</button>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -3,10 +3,10 @@
<div class="columns is-marginless">
<div class="column is-1 is-paddingless image-item is-hidden-mobile">
<ng-container *ngIf="dataset.metadata.image;else noImage">
<img src="{{dataset.metadata.image.url}}" alt="Image Dataset" onerror="this.src='./assets/img/no-image.png'">
<img src="{{dataset.metadata.image.url}}" alt="Image Dataset" onerror="this.src = noImageUrl">
</ng-container>
<ng-template #noImage>
<img src="./assets/img/no-image.png" alt="No Image Dataset">
<img [src]="noImageUrl" alt="No Image Dataset">
</ng-template>
</div>
......@@ -15,7 +15,8 @@
{{ surTitle[dataset.metadata.type] }}
</span>
<a [routerLink]="['/', AppRoutes.datasets.uri, dataset._index]" class="link-without-decoration">
<span class="h3" [innerHTML]="!dataset.highlights.highlightedTitle ? dataset.metadata.title : dataset.highlights.highlightedTitle">
<span class="h3"
[innerHTML]="!dataset.highlights.highlightedTitle ? dataset.metadata.title : dataset.highlights.highlightedTitle">
</span>
<ng-container *ngIf="dataset.metadata.subtitle || dataset.highlights.highlightedSubtitle">
......@@ -23,7 +24,8 @@
&nbsp;-&nbsp;
</span>
<span class="h3 subtitle" *ngIf="dataset.highlights.highlightedSubtitle;else subtitle" [innerHTML]="dataset.highlights.highlightedSubtitle">
<span class="h3 subtitle" *ngIf="dataset.highlights.highlightedSubtitle;else subtitle"
[innerHTML]="dataset.highlights.highlightedSubtitle">
</span>
<ng-template #subtitle>
......@@ -45,4 +47,4 @@
dataset.highlights.highlightedDescription.join('&nbsp;[...]&nbsp;') : dataset.metadata.abstractTroncated"></p>
</div>
</div>
</ng-container>
</ng-container>
\ No newline at end of file
......@@ -2,6 +2,7 @@ import { Component, OnInit, Input } from '@angular/core';
import { Dataset } from '../../../models';
import { AppRoutes } from '../../../../routes';
import { geosource } from '../../../../../i18n/traductions';
import { typesMetadata } from '../../../models/metadata.model';
@Component({
selector: 'app-result-dataset',
......@@ -12,6 +13,8 @@ export class ResultDatasetComponent implements OnInit {
@Input() dataset: Dataset;
AppRoutes = AppRoutes;
typesMetadata = typesMetadata;
noImageUrl: string;
surTitle = {
dataset: '',
......@@ -21,6 +24,9 @@ export class ResultDatasetComponent implements OnInit {
constructor() { }
ngOnInit() {}
ngOnInit() {
this.noImageUrl = this.dataset.metadata.type === typesMetadata.series ?
'./assets/img/vignette-collection.png' : './assets/img/vignette-data.png';
}
}
......@@ -127,8 +127,9 @@ a:not(.button).link-2 {
}
}
/* stylelint-disable */
a:not(.button).link-without-decoration,
.dropdown a { /* stylelint-disable-line */
.dropdown a {
color: $brand-color;
text-decoration: none;
......@@ -137,6 +138,8 @@ a:not(.button).link-without-decoration,
}
}
/* stylelint-enable */
.active-link {
color: $tomato-color;
}
......@@ -220,17 +223,20 @@ input.is-valid {
color: $warning-color;
}
label,
.label,
label span {
font-size: 0.875rem;
color: $grey-light-color;
text-transform: uppercase;
font-weight: normal;
font-style: normal;
form {
&:hover {
cursor: pointer;
label,
.label,
label span {
font-size: 0.875rem;
color: $grey-light-color;
text-transform: uppercase;
font-weight: normal;
font-style: normal;
&:hover {
cursor: pointer;
}
}
}
......@@ -266,7 +272,8 @@ label span {
height: 3.14em;
width: 13.75rem;
span { /* stylelint-disable-line */
/* stylelint-disable-next-line */
span {
font-size: 0.875rem;
color: $link-color;
white-space: normal;
......@@ -296,7 +303,8 @@ label span {
height: 3.14em;
width: 13.75rem;
span { /* stylelint-disable-line */
/* stylelint-disable-next-line */
span {
font-size: 0.875rem;
color: $tomato-color;
white-space: normal;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment