diff --git a/src/app/core/components/main/main.component.scss b/src/app/core/components/main/main.component.scss index 73aa60876f233f217ba1e40f299aca4ee0c402d9..950edd1efa9eb4712c1d31e2e0e152597d145b25 100644 --- a/src/app/core/components/main/main.component.scss +++ b/src/app/core/components/main/main.component.scss @@ -9,18 +9,6 @@ grid-template-rows: [header] $header-bar-height [content] 1fr [footer] auto; } -.grid-layout.is-home { - // To make the navbar top to the menu dark color when home page - background-color: $brand-color; - grid-template-rows: [content] 1fr [footer] auto; - - .site-header { - background-color: transparent; - position: absolute; - width: 100%; - } -} - .site-header { grid-row: header; grid-column: 1; @@ -34,6 +22,18 @@ } } +.grid-layout.is-home { + // To make the navbar top to the menu dark color when home page + background-color: $brand-color; + grid-template-rows: [content] 1fr [footer] auto; + + .site-header { + background-color: transparent; + position: absolute; + width: 100%; + } +} + .side-menu { position: fixed; height: calc(100% - #{$header-bar-height}); @@ -56,7 +56,6 @@ transform: translateX(0); } - .site-content { grid-row: content; grid-column: 1; @@ -72,7 +71,6 @@ margin-left: 0; width: 100%; } - } .site-footer { diff --git a/src/app/core/components/notifications/notifications.component.scss b/src/app/core/components/notifications/notifications.component.scss index 24be4a4e0f3a29dd76823e620f1ec47f37868412..e802b9e9d088913e67cb0f468b83adf9125a9499 100644 --- a/src/app/core/components/notifications/notifications.component.scss +++ b/src/app/core/components/notifications/notifications.component.scss @@ -17,7 +17,6 @@ $app-notification-width: 29rem; .app-notification { position: relative; - min-width: $app-notification-width; max-width: $app-notification-width; padding: 1rem; @@ -30,7 +29,18 @@ $app-notification-width: 29rem; max-width: 100%; } - span, p, button { + // Adding slideFromRight animation on notification classe + // The div come from the right and go back after a while + // The animation lasts 5s and is runned only one time + animation: slideFromRight 8s 1; + + @media screen and (max-width: $tablet) { + animation: slideFromRightMobile 8s 1; + } + + span, + p, + button { color: white; } @@ -49,7 +59,7 @@ $app-notification-width: 29rem; font-weight: bold; } } - + p.app-notification-content { font-size: 0.875rem; } @@ -76,29 +86,33 @@ $app-notification-width: 29rem; cursor: pointer; } - // Animation @keyframes slideFromRight { - 0% { transform: translateX($app-notification-width);} - 15%, 85% { transform: translateX(0);} - 100% { transform: translateX($app-notification-width);} + 0% { + transform: translateX($app-notification-width); + } + + 15%, + 85% { + transform: translateX(0); + } + + 100% { + transform: translateX($app-notification-width); + } } @keyframes slideFromRightMobile { - 0% { transform: translateX(100%);} - 15%, 85% { transform: translateX(0);} - 100% { transform: translateX(100%);} -} + 0% { + transform: translateX(100%); + } -// Adding slideFromRight animation on notification classe -// The div come from the right and go back after a while -// The animation lasts 5s and is runned only one time -.app-notification { - animation: slideFromRight 8s 1; -} + 15%, + 85% { + transform: translateX(0); + } -@media screen and (max-width: $tablet) { - .app-notification { - animation: slideFromRightMobile 8s 1; + 100% { + transform: translateX(100%); } -} \ No newline at end of file +} diff --git a/src/app/editorialisation/components/approach/approach.component.scss b/src/app/editorialisation/components/approach/approach.component.scss index b5ad02c8596bbbd90e947976eb2afbb3b0786532..8dee050d8d6975e41ad0b6fabf37195edd576ccd 100644 --- a/src/app/editorialisation/components/approach/approach.component.scss +++ b/src/app/editorialisation/components/approach/approach.component.scss @@ -12,7 +12,6 @@ img { } .item { - /* Masonry bricks or child elements */ .organization { background-color: white; @@ -20,7 +19,7 @@ img { padding: 0.75rem 2rem; &:hover { - box-shadow: inset 0px 0px 3px 0px grey; + box-shadow: inset 0 0 3px 0 grey; } .button { @@ -29,6 +28,7 @@ img { padding-bottom: 0.75rem; text-decoration: none; border-radius: 0; + span { font-size: $size-8; } @@ -38,7 +38,6 @@ img { display: inline-block; margin: 0 0 1em; width: 100%; - } .datasetsCount { @@ -52,6 +51,7 @@ img { word-break: break-word; } } + @supports not (hyphens: auto) { p { text-align: left; @@ -59,7 +59,6 @@ img { } } - .logo-content { min-height: 100px; line-height: 100px; @@ -79,5 +78,4 @@ img { border: none; border-radius: 0; } - } diff --git a/src/app/editorialisation/components/cms-page-error/cms-page-error.component.scss b/src/app/editorialisation/components/cms-page-error/cms-page-error.component.scss index 97c022649a62a3332a26ee5dc9e004eceec63252..8884c8ef2d845b69d3c84150773fdcdb300f95f3 100644 --- a/src/app/editorialisation/components/cms-page-error/cms-page-error.component.scss +++ b/src/app/editorialisation/components/cms-page-error/cms-page-error.component.scss @@ -1,3 +1,3 @@ a { text-decoration: none; -} \ No newline at end of file +} diff --git a/src/app/editorialisation/components/cms-page/cms-page.component.scss b/src/app/editorialisation/components/cms-page/cms-page.component.scss index 20477c663ade19534883be295b9d18cbb40eceb8..81f7fefb8fcad521511b1e0cd9390335cb4e3cdd 100644 --- a/src/app/editorialisation/components/cms-page/cms-page.component.scss +++ b/src/app/editorialisation/components/cms-page/cms-page.component.scss @@ -19,4 +19,4 @@ margin-right: -1.25rem; margin-left: -1.25rem; } -} \ No newline at end of file +} diff --git a/src/app/editorialisation/components/cms-post-detail/cms-post-detail.component.scss b/src/app/editorialisation/components/cms-post-detail/cms-post-detail.component.scss index 20477c663ade19534883be295b9d18cbb40eceb8..81f7fefb8fcad521511b1e0cd9390335cb4e3cdd 100644 --- a/src/app/editorialisation/components/cms-post-detail/cms-post-detail.component.scss +++ b/src/app/editorialisation/components/cms-post-detail/cms-post-detail.component.scss @@ -19,4 +19,4 @@ margin-right: -1.25rem; margin-left: -1.25rem; } -} \ No newline at end of file +} diff --git a/src/app/editorialisation/components/cms-posts-list/cms-drafts-list.component.scss b/src/app/editorialisation/components/cms-posts-list/cms-drafts-list.component.scss index aac10f23c085dd4817f114270e358e1d5dfa4046..df070d0be75f00d8d294fd826a4559d1d8e807f1 100644 --- a/src/app/editorialisation/components/cms-posts-list/cms-drafts-list.component.scss +++ b/src/app/editorialisation/components/cms-posts-list/cms-drafts-list.component.scss @@ -1,4 +1,4 @@ -@import './../../../../scss/variables.scss'; +@import './../../../../scss/variables.scss'; .section { text-align: center; @@ -28,7 +28,6 @@ a:hover { text-decoration: none; color: $brand-color; - } &:hover { @@ -43,4 +42,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/app/editorialisation/components/credits/credits.component.scss b/src/app/editorialisation/components/credits/credits.component.scss index f501b24dd782886c74ca9396893a2c8367352218..97a795c129e9c2adbeb89db6816203b6049fa4b9 100644 --- a/src/app/editorialisation/components/credits/credits.component.scss +++ b/src/app/editorialisation/components/credits/credits.component.scss @@ -4,14 +4,17 @@ img { max-height: 100px; } - .container { text-align: center; - ; +} + +.button { + width: 60%; } .masonry { margin-top: 2rem; + /* Masonry container */ column-count: auto; column-gap: 1em; @@ -34,21 +37,20 @@ img { line-height: 2rem; font-weight: 100; - &:before, - &:after { + &::before, + &::after { content: '\201C'; - font-family: 'Sanchez'; + font-family: 'Sanchez', sans-serif; color: $tomato-color; } - &:after { + &::after { content: '\201D'; } } } .item { - /* Masonry bricks or child elements */ .credit { background-color: white; @@ -56,7 +58,7 @@ img { padding: 0.75rem 2rem; &:hover { - box-shadow: inset 0px 0px 3px 0px grey; + box-shadow: inset 0 0 3px 0 grey; } .button { @@ -75,21 +77,17 @@ img { display: inline-block; margin: 0 0 1em; width: 100%; - } .datasetsCount { text-align: center; } - p { text-align: left; word-break: break-word; } - - .logo-content { min-height: 100px; line-height: 100px; @@ -109,9 +107,4 @@ p { border: none; border-radius: 0; } - -} - -.button { - width: 60%; } diff --git a/src/app/editorialisation/components/home/home.component.scss b/src/app/editorialisation/components/home/home.component.scss index 998b1d7bcde8045ce87d5e121f39a12598c04f8e..fd62a00db88a944c2b2d062eeb9bbbda1c295f5b 100644 --- a/src/app/editorialisation/components/home/home.component.scss +++ b/src/app/editorialisation/components/home/home.component.scss @@ -1,26 +1,39 @@ @import '../../../../scss/variables.scss'; @import '../../../../../node_modules/bulma/sass/utilities/all'; - .home-component { height: 100%; display: flex; flex-direction: column; } +.icon-decoration { + position: absolute; + top: 30vh; + + img { + position: relative; + max-height: 18.75rem; + display: none; + + @media screen and (min-width: $tablet) { + display: block; + left: -6rem; + } + + @media screen and (min-width: $fullhd) { + display: block; + left: -4rem; + } + } +} .research { text-align: center; - - // Color used as background when image is loading - // background-image: linear-gradient(to right, rgba(0, 0, 0, 0.9), rgba(51, 55, 68, 0) 21%, rgba(51, 55, 68, 0) 78%, #000000), - // url('../../../../assets/img/home_image.jpg'); background-color: $brand-color; background-size: contain; background-position: center; position: relative; - - height: 35vh; min-height: 300px; padding-top: 4rem; @@ -63,36 +76,13 @@ } } -.icon-decoration { - position: absolute; - top: 30vh; - - img { - position: relative; - max-height: 18.75rem; - display: none; - - @media screen and (min-width: $tablet) { - display: block; - left: -6rem; - } - - @media screen and (min-width: $fullhd) { - display: block; - left: -4rem; - } - } -} - .posts { flex-grow: 1; background: linear-gradient(to bottom, $grey-background-color, #dedede); - display: flex; justify-content: center; .post-container { - width: 100%; margin-bottom: 1rem; // Make the icon go behind in some screen width when menu is pushed. @@ -141,7 +131,6 @@ } .posts-all-news { - @media screen and (min-width: $desktop) { text-align: right; } @@ -159,7 +148,6 @@ } .post-item { - margin: auto; margin-bottom: 2rem; @@ -182,10 +170,6 @@ } } - a:hover .post-description-title { - text-decoration: underline; - } - .post-image { min-height: 7.5rem; width: 100%; @@ -193,6 +177,8 @@ background-size: cover; background-repeat: no-repeat; border-radius: 0.25rem 0.25rem 0 0; + filter: none; + transition: filter 0.5s ease-in-out; } .post-description { @@ -215,10 +201,8 @@ } } - .post-image { - filter: none; - transition: filter 0.5s ease-in-out; - + a:hover .post-description-title { + text-decoration: underline; } &:hover { diff --git a/src/app/geosource/components/dataset-detail/dataset-resources/resources-queryable/resource-queryable/resource-queryable.component.html b/src/app/geosource/components/dataset-detail/dataset-resources/resources-queryable/resource-queryable/resource-queryable.component.html index 11dd7eb96841c832c802db3e653e1a5e08895bfc..d30ab6058fed997f6ee49eb5c90bbe26d37126e3 100644 --- a/src/app/geosource/components/dataset-detail/dataset-resources/resources-queryable/resource-queryable/resource-queryable.component.html +++ b/src/app/geosource/components/dataset-detail/dataset-resources/resources-queryable/resource-queryable/resource-queryable.component.html @@ -9,14 +9,14 @@ <div class="root-url"> <div class="root-url-label title-label"> <span i18n="@@dataset.resources.url.root"> - Root URL + Root URL </span> </div> <div class="root-url-input"> <div class="link-with-copy"> - <a class="parameters-url" [href]="resource.metadataLink.url" target="_blank"> - <span>{{ resource.metadataLink.url }}</span> - </a> + <span class="parameters-url"> + <a [href]="resource.metadataLink.url" target="_blank">{{ resource.metadataLink.url }}</a> + </span> <button type="button" (click)="copyToClipboard(resource.metadataLink.url, true)" class="button is-medium"> <svg xmlns="http://www.w3.org/2000/svg" id="copy" viewBox="0 0 18 18"> <path @@ -32,10 +32,11 @@ </div> </div> - <div class="create-request" (click)="requestOpen = !requestOpen" [ngClass]="{'is-open': requestOpen}" *ngIf="allSettingsOK"> + <div class="create-request" (click)="requestOpen = !requestOpen" [ngClass]="{'is-open': requestOpen}" + *ngIf="allSettingsOK"> <span i18n="@@dataset.resources.createRequest"> - Create one request - </span> + Create one request + </span> <span class="create-request-icon"> <svg xmlns="http://www.w3.org/2000/svg" id="chevron" viewBox="0 0 15 9"> <path @@ -49,9 +50,9 @@ </div> <div class="no-custom-url" *ngIf="!allSettingsOK"> - <span i18n="@@dataset.resources.impossibleCreate"> - Impossible de créer une requête personalisée pour ce jeu de données - </span> + <span i18n="@@dataset.resources.impossibleCreate"> + Impossible de créer une requête personalisée pour ce jeu de données + </span> </div> <ng-container *ngIf="requestOpen"> @@ -164,13 +165,13 @@ </div> <div class="fromFeature-item"> <div class="title-label"> - <label for="fromFeature"> Numéro du 1er enregistrement</label> + <label for="fromFeature"> Numéro du 1er enregistrement</label> </div> <div> - <input class="input" id="fromFeature" type="number" [value]="fromFeature" min="1" max="10000" [(ngModel)]="fromFeature" - (change)="setActiveFromFeature()"> + <input class="input" id="fromFeature" type="number" [value]="fromFeature" min="1" max="10000" + [(ngModel)]="fromFeature" (change)="setActiveFromFeature()"> </div> - + </div> </ng-container> @@ -183,43 +184,45 @@ </span> </div> <div class="link-with-copy"> - <a class="parameters-url column is-narrow-tablet" [href]="queryableUrl" target="_blank"> - <span> - {{ queryableParameters.baseUrl }} - </span> - <span> - {{ queryableParameters.baseParameters }} - </span> - <span> - {{ queryableParameters.layer }} - </span> - <span *ngIf="selectedProjection" [ngClass]="{'is-active-parameter': queryableParameters.projectionActive}"> - {{ queryableParameters.projection }} - {{ queryableParameters.bbox }} - </span> - <span *ngIf="selectedFormat" [ngClass]="{'is-active-parameter': queryableParameters.outputFormatActive}"> - {{ queryableParameters.outputFormat }} - </span> - <span *ngIf="selectedInsee" [ngClass]="{'is-active-parameter': queryableParameters.inseeActive}"> - {{ queryableParameters.insee }} - </span> - <span *ngIf="resource.type === linkFormats.wfs" - [ngClass]="{'is-active-parameter': queryableParameters.countFeatures}"> - &count={{ countFeatures }} - </span> - <span *ngIf="resource.type === linkFormats.wfs" - [ngClass]="{'is-active-parameter': queryableParameters.fromFeature}"> - &startIndex={{ fromFeature }} - </span> - <span *ngIf="resource.type === linkFormats.ws" - [ngClass]="{'is-active-parameter': queryableParameters.countFeatures}"> - ?maxfeatures={{ countFeatures }} - </span> - <span *ngIf="resource.type === linkFormats.ws" - [ngClass]="{'is-active-parameter': queryableParameters.fromFeature}"> - &start={{ fromFeature }} - </span> - </a> + <span class="parameters-url column is-narrow-tablet"> + <a [href]="queryableUrl" target="_blank"> + <span> + {{ queryableParameters.baseUrl }} + </span> + <span> + {{ queryableParameters.baseParameters }} + </span> + <span> + {{ queryableParameters.layer }} + </span> + <span *ngIf="selectedProjection" [ngClass]="{'is-active-parameter': queryableParameters.projectionActive}"> + {{ queryableParameters.projection }} + {{ queryableParameters.bbox }} + </span> + <span *ngIf="selectedFormat" [ngClass]="{'is-active-parameter': queryableParameters.outputFormatActive}"> + {{ queryableParameters.outputFormat }} + </span> + <span *ngIf="selectedInsee" [ngClass]="{'is-active-parameter': queryableParameters.inseeActive}"> + {{ queryableParameters.insee }} + </span> + <span *ngIf="resource.type === linkFormats.wfs" + [ngClass]="{'is-active-parameter': queryableParameters.countFeatures}"> + &count={{ countFeatures }} + </span> + <span *ngIf="resource.type === linkFormats.wfs" + [ngClass]="{'is-active-parameter': queryableParameters.fromFeature}"> + &startIndex={{ fromFeature }} + </span> + <span *ngIf="resource.type === linkFormats.ws" + [ngClass]="{'is-active-parameter': queryableParameters.countFeatures}"> + ?maxfeatures={{ countFeatures }} + </span> + <span *ngIf="resource.type === linkFormats.ws" + [ngClass]="{'is-active-parameter': queryableParameters.fromFeature}"> + &start={{ fromFeature }} + </span> + </a> + </span> <button type="button" (click)="copyToClipboard(queryableUrl)" class="button is-medium"> <svg xmlns="http://www.w3.org/2000/svg" id="copy" viewBox="0 0 18 18"> <path diff --git a/src/app/geosource/components/dataset-detail/dataset-resources/resources-queryable/resource-queryable/resource-queryable.component.scss b/src/app/geosource/components/dataset-detail/dataset-resources/resources-queryable/resource-queryable/resource-queryable.component.scss index 9d36bb2f17f39aee1ece5cf6e216bce9e02c7a49..409a3a3a7c34f57dc15e5372f4973c960df40db6 100644 --- a/src/app/geosource/components/dataset-detail/dataset-resources/resources-queryable/resource-queryable/resource-queryable.component.scss +++ b/src/app/geosource/components/dataset-detail/dataset-resources/resources-queryable/resource-queryable/resource-queryable.component.scss @@ -1,6 +1,5 @@ @import '../../../../../../../scss/variables.scss'; - .resource-item { display: grid; grid-auto-rows: auto; @@ -29,6 +28,50 @@ padding-bottom: 1rem; } +.format-item { + grid-column: 1 / 2; +} + +.projection-item { + grid-column: 2 / 3; +} + +.division-item { + grid-column: 1 / 3; +} + +.no-custom-url { + grid-column: 1 / 3; + + span { + color: #eb7b3c; + } +} + +.title-label { + margin-bottom: 0.4rem; + + span, + label { + text-transform: uppercase; + color: $grey-dark-color; + font-size: 0.875rem; + line-height: 1.4; + } +} + +.fromFeature-item { + grid-column: 2 / 3; + // Remove Bulma default 100% width + .input { + width: unset; + } +} + +.parameters-url { + word-break: break-all; +} + .create-request { cursor: pointer; grid-column: 1 / 3; @@ -36,18 +79,64 @@ align-items: center; justify-content: space-between; padding-bottom: 1rem; -} + border-bottom: 2px solid $grey-background-color; -.format-item { - grid-column: 1 / 2; + span:first-of-type { + font-weight: 600; + } } -.projection-item { - grid-column: 2 / 3; +.create-request-icon { + svg { + margin-right: 1.2rem; + width: 16px; + fill: grey; + transform: rotate(-90deg); + } } -.division-item { - grid-column: 1 / 3; +.link-with-copy { + display: flex; + justify-content: space-between; + + a, + a span {/* stylelint-disable-line */ + color: $link-color; + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } + + .parameters-url-icon { + color: $brand-color; + + &:hover { + cursor: pointer; + } + } + + .parameters-url { + background-color: $grey-background-color; + transition: all 0.5s ease; + word-break: break-all; + flex-grow: 1; + flex-shrink: 1; + padding: 0.7rem 0.5rem; + } + + .button { + font-size: 0.875rem; + margin-left: 1rem; + height: 2.75rem; + + svg { + width: 1.25rem; + fill: $grey-light-color; + margin-right: 0.5rem; + } + } } .maxFeatures-item { @@ -60,28 +149,19 @@ .warning { margin-top: 0.5rem; - span { + span { /* stylelint-disable-line */ color: #eb7b3c; } } } -.fromFeature-item { - grid-column: 2 / 3; - // Remove Bulma default 100% width - .input { - width: unset; - } -} - .personnalized-url { grid-column: 1 / 3; -} + flex-wrap: wrap; + align-items: stretch; -.no-custom-url { - grid-column: 1 / 3; - span { - color: #eb7b3c; + .link-with-copy { + align-items: flex-start; } } @@ -91,18 +171,6 @@ pointer-events: initial !important; } -.title-label { - margin-bottom: 0.4rem; - - span, - label { - text-transform: uppercase; - color: $grey-dark-color; - font-size: 0.875rem; - line-height: 1.4; - } -} - .tooltip { cursor: pointer; } @@ -117,7 +185,10 @@ h3 { .dropdown-trigger button, .dropdown-menu { width: 100%; +} +.dropdown-menu { + height: 2.5rem; } .dropdown-insee { @@ -129,10 +200,6 @@ h3 { } } -.dropdown-menu { - height: 2.5rem; -} - .dropdown-trigger .button { justify-content: space-between; } @@ -149,7 +216,6 @@ h3 { .full-line-resource { border-bottom: 1px solid white; - .resource-name { font-size: $size-5; @@ -170,84 +236,6 @@ h3 { padding-bottom: 0; } -.personnalized-url { - flex-wrap: wrap; - align-items: stretch; - - .link-with-copy { - align-items: flex-start; - } -} - -.parameters-url { - word-break: break-all; -} - -.link-with-copy { - display: flex; - justify-content: space-between; - - a, - a span { - color: $link-color; - text-decoration: none; - - &:hover { - text-decoration: underline; - } - } - - .parameters-url-icon { - color: $brand-color; - - &:hover { - cursor: pointer; - } - } - - .parameters-url { - background-color: $grey-background-color; - transition: all .5s ease; - } - - .parameters-url { - word-break: break-all; - flex-grow: 1; - flex-shrink: 1; - padding: 0.7rem 0.5rem; - } - - .button { - font-size: 0.875rem; - margin-left: 1rem; - height: 2.75rem; - - svg { - width: 1.25rem; - fill: $grey-light-color; - margin-right: 0.5rem - } - } - -} - -.create-request { - border-bottom: 2px solid $grey-background-color; - - span:first-of-type { - font-weight: 600; - } -} - -.create-request-icon { - svg { - margin-right: 1.2rem; - width: 16px; - fill: grey; - transform: rotate(-90deg); - } -} - .create-request.is-open { border-bottom: none; diff --git a/src/app/geosource/components/filter-list/filter-list.component.ts b/src/app/geosource/components/filter-list/filter-list.component.ts index d24d7ea1e886668bf3d70aeb754545986409b792..c40913b587f4743a5d7ded782d71e1c0b904a7fe 100644 --- a/src/app/geosource/components/filter-list/filter-list.component.ts +++ b/src/app/geosource/components/filter-list/filter-list.component.ts @@ -4,6 +4,7 @@ import { Subscription } from 'rxjs'; import { Filter } from '../../models'; import { Aggregation, IActiveFiltersTemplate } from '../../models/filter.model'; import { scopesResearch } from '../../models/scopes-research'; +import { geosource } from '../../../../i18n/traductions'; @Component({ selector: 'app-filter-list', @@ -46,6 +47,9 @@ export class FilterListComponent implements OnInit, OnDestroy { filter.aggregations.forEach((aggregation) => { if (aggregation.isActive) { + if (aggregation.label === 'null') { + aggregation.label = geosource.filter.other; + } this.activeAggregations.push({ aggregation, filter, @@ -53,6 +57,9 @@ export class FilterListComponent implements OnInit, OnDestroy { } else if (aggregation.subAggregations.length > 0) { aggregation.subAggregations.forEach((subAgg: Aggregation) => { if (subAgg.isActive) { + if (subAgg.label === 'null') { + subAgg.label = geosource.filter.other; + } this.activeAggregations.push({ filter, aggregation: subAgg, diff --git a/src/app/geosource/components/results/result-dataset/result-dataset.component.scss b/src/app/geosource/components/results/result-dataset/result-dataset.component.scss index 652cc093b239e251885363a1740965dadb1552a3..41f1059ed67ad8e81ba7ff374f1aef912ce65a7d 100644 --- a/src/app/geosource/components/results/result-dataset/result-dataset.component.scss +++ b/src/app/geosource/components/results/result-dataset/result-dataset.component.scss @@ -32,15 +32,16 @@ line-height: 1.25rem; font-weight: 600; } + .subtitle { - color: $grey-light-color + color: $grey-light-color; } + p { padding-top: 0.25rem; } } - .providers { color: $grey-light-color; padding-top: 0; @@ -48,10 +49,13 @@ .description { padding-top: 0; + p { border-bottom: 1px solid $grey-super-light-color; padding-bottom: 1.5rem; text-align: left; - word-break: break-all; + overflow-wrap: break-word; + word-break: break-word; + hyphens: auto; } } diff --git a/src/app/geosource/models/filter.model.ts b/src/app/geosource/models/filter.model.ts index a25d58434d7108856df1a088f6caced72b201edc..fbaf21d1576e55392aa1ba853f9d702cca2f4aac 100644 --- a/src/app/geosource/models/filter.model.ts +++ b/src/app/geosource/models/filter.model.ts @@ -47,9 +47,9 @@ export class Aggregation { const execRegex = regex.exec(element); if (execRegex !== null) { const matches = Array.from(execRegex); - newLabel += `${matches[1]} / `; + newLabel += newLabel === '' ? matches[1] : ` / ${matches[1]}`; } else { - newLabel += element; + newLabel += ` / ${element}`; } }); diff --git a/src/app/geosource/services/elasticsearch.service.ts b/src/app/geosource/services/elasticsearch.service.ts index ad5452c7fdc99c25702f852913a139ad6b06f6d5..d470c60c0529aec36c87bc2fefe53278943a0a64 100644 --- a/src/app/geosource/services/elasticsearch.service.ts +++ b/src/app/geosource/services/elasticsearch.service.ts @@ -487,6 +487,7 @@ export class ElasticsearchService { let shouldExpression: Object[] = []; options.filters.forEach((filter) => { + let hasParentAgg = null; const activeAggregations = filter.findActiveAggregations(); if (activeAggregations.length > 0) { activeAggregations.forEach((activeAgg: Aggregation) => { @@ -516,6 +517,9 @@ export class ElasticsearchService { }, }, }); + if (activeAgg.parentAggregation) { + hasParentAgg = activeAgg.parentAggregation; + } } else { // Special treatment for the licences if (filter.label === geosource.filterCategories.licences && @@ -550,6 +554,28 @@ export class ElasticsearchService { ); shouldExpression = []; } + + if (hasParentAgg) { + const fieldParent = `${hasParentAgg.field}.keyword`; + const shouldForParent = { + nested: { + path: filter.nestedPath, + ignore_unmapped: true, + query: { + term: { + [fieldParent]: hasParentAgg.key, + }, + }, + }, + }; + mustExpression.push( + { + bool: { + should: shouldForParent, + }, + }, + ); + } }); // Must is act like an logic "AND" diff --git a/src/i18n/traductions.fr.ts b/src/i18n/traductions.fr.ts index 3e448395d6432e0a00510b4dc440cd68a1c491c6..dd38a7d85747ca41efb54d95791183db73ba8fa8 100644 --- a/src/i18n/traductions.fr.ts +++ b/src/i18n/traductions.fr.ts @@ -193,6 +193,9 @@ export const geosource = { licence: { other: 'Autre licence', }, + filter: { + other: 'Autres', + }, }; export const subjects = [ diff --git a/src/i18n/traductions.ts b/src/i18n/traductions.ts index 2dae299512ec815ff67bbacd76757196531ea627..4cb50cacf91fffd9e091df52e8688eecac1f80d5 100644 --- a/src/i18n/traductions.ts +++ b/src/i18n/traductions.ts @@ -1,3 +1,4 @@ + export const userServicesStatuses = { pending: 'Pending', opened: 'Ok', @@ -191,6 +192,9 @@ export const geosource = { licence: { other: 'Other license', }, + filter: { + other: 'Other', + }, }; export const subjects = [