Commit 7c58c1bb authored by ext.sopra.ncastejon's avatar ext.sopra.ncastejon
Browse files

Fix in Downloads page multiple requests + layout.

parent 84366900
Pipeline #4968 passed with stage
in 5 minutes and 7 seconds
......@@ -31,9 +31,6 @@
.resources-downloadable {
width: 100%;
margin-right: 1rem;
border-bottom: 2px solid $grey-background-color;
background-color: white;
}
@media screen and (min-width: $tablet) {
......@@ -45,14 +42,17 @@
.resources-downloadable {
width: 66%;
padding: 2.5rem;
box-shadow: 0 6px 12px 0 rgba(129, 128, 128, 0.1);
border-radius: 8px;
}
}
.resource-download {
margin-bottom: 1.5rem;
margin-right: 1rem;
border-bottom: 2px solid $grey-background-color;
background-color: white;
padding: 2.5rem;
box-shadow: 0 6px 12px 0 rgba(129, 128, 128, 0.1);
border-radius: 8px;
}
.resource-description {
......@@ -68,6 +68,11 @@
.resource-static {
margin-bottom: 1rem;
border-bottom: 2px solid $grey-background-color;
background-color: white;
padding: 2.5rem;
box-shadow: 0 6px 12px 0 rgba(129, 128, 128, 0.1);
border-radius: 8px;
}
.resource-static-files {
......@@ -83,7 +88,9 @@
margin-top: 1rem;
border-bottom: 2px solid $grey-background-color;
background-color: white;
padding: 2.5rem;
box-shadow: 0 6px 12px 0 rgba(129, 128, 128, 0.1);
border-radius: 8px;
a {
word-break: break-all;
......
......@@ -55,9 +55,13 @@ export class DatasetDownloadsComponent implements OnInit {
this.initialize();
// Why retrieveDatasetData():
// to retrieve the first data for the dataset (if exists). It will be used in the
// Data, Downloads and API tabs.
forkJoin([
this._resourcesService.getProjections(),
this._resourcesService.getResources(),
this._datasetDetailService.retrieveDatasetData(),
]).subscribe((response) => {
this.projections = response[0];
this.resources = response[1];
......
......@@ -88,11 +88,6 @@ export class ResourceDownloadItemComponent implements OnInit {
ngOnInit() {
this.initItems();
// Retrieve the first data for the dataset (if exists). It will be used in the
// Data, Downloads and API tabs.
this._datasetDetailService.retrieveDatasetData().subscribe(() => {
this.initItems();
});
}
initItems() {
......
Markdown is supported
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