Commit 55eb4888 authored by FORESTIER Fabien's avatar FORESTIER Fabien
Browse files

Switch back to reseach route name for research page

parent 79318627
Pipeline #1807 passed with stages
in 49 seconds
......@@ -20,7 +20,7 @@
</a>
</li>
<li>
<a [routerLink]="['/', AppRoutes.datasets.uri]" routerLinkActive="active-link" [tabIndex]="isOpened ? 0 : -1">
<a [routerLink]="['/', AppRoutes.research.uri]" routerLinkActive="active-link" [tabIndex]="isOpened ? 0 : -1">
<div class="icon-item">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 23">
<path class="main" fill-rule="evenodd"
......
......@@ -150,7 +150,7 @@ export class DatasetDetailComponent implements OnInit, OnDestroy {
goToPreviousPage() {
let index = 1; // Start to retrieve the previous element
let url = this._navigationHistoryService.getFromLast(index);
// While the previous element still has /datasets or is not null (no previous element)
// While the previous element still has /jeux-de-donnees or is not null (no previous element)
// get the previous element of the previous element...
while (url !== null && url.search(`${AppRoutes.datasets.uri}/`) !== -1) {
// the method getFromLast deletes every history after the index required therefor as we already entered
......@@ -161,7 +161,7 @@ export class DatasetDetailComponent implements OnInit, OnDestroy {
// If url is null then redirect to research page
if (url == null) {
url = `/${AppRoutes.datasets.uri}`;
url = `/${AppRoutes.research.uri}`;
}
this._router.navigateByUrl(url);
......
......@@ -5,10 +5,10 @@ import { ResultsComponent } from './components';
export const routes: Routes = [
{
path: AppRoutes.datasets.uri,
path: AppRoutes.research.uri,
component: ResultsComponent,
data: {
title: AppRoutes.datasets.title,
title: AppRoutes.research.title,
},
},
{
......
......@@ -469,8 +469,8 @@ export class DatasetResearchService {
this._elasticsearchOptions.searchString = value;
this._elasticsearchOptions.pageIndex = 0;
this._elasticsearchOptions.shouldAggregateResultCount = true;
if (this._router.url.split('/').pop() !== AppRoutes.datasets.uri) {
this._router.navigate(['/', AppRoutes.datasets.uri]);
if (this._router.url.split('/').pop() !== AppRoutes.research.uri) {
this._router.navigate(['/', AppRoutes.research.uri]);
}
this._searchChangeSubject.next();
}
......
......@@ -15,7 +15,7 @@
</div>
<div class="search column is-7-desktop is-8-tablet ">
<app-search-bar class="app-search-bar"></app-search-bar>
<a class="explore-link" [routerLink]="['/', AppRoutes.datasets.uri]" (click)="trackExploreButtonEvent()">
<a class="explore-link" [routerLink]="['/', AppRoutes.research.uri]" (click)="trackExploreButtonEvent()">
<button class="button explore-button" i18n="@@home.explore">Explore</button>
</a>
</div>
......
......@@ -100,7 +100,7 @@ export class HomeComponent implements OnInit {
goToPostsResearch() {
this._datasetResearchService.resetResearch();
this._datasetResearchService.scopeReasearch = scopesResearch.post;
this._router.navigate(['/', AppRoutes.datasets.uri]);
this._router.navigate(['/', AppRoutes.research.uri]);
}
trackExploreButtonEvent() {
......
......@@ -79,7 +79,7 @@ export class OrganizationsComponent implements OnInit {
this._datasetResearchService.getResults().subscribe(() => {
this._datasetResearchService.updateAggregation('metadata-fr.responsibleParty.organisationName', name, true);
this._datasetResearchService.scopeReasearch = scopesResearch.datasets;
this._router.navigate(['/', AppRoutes.datasets.uri]);
this._router.navigate(['/', AppRoutes.research.uri]);
});
}
......@@ -89,7 +89,7 @@ export class OrganizationsComponent implements OnInit {
this._datasetResearchService.getResults().subscribe(() => {
this._datasetResearchService.updateAggregation('metadata-fr.responsibleParty.organisationName', name, true);
this._datasetResearchService.scopeReasearch = scopesResearch.services;
this._router.navigate(['/', AppRoutes.datasets.uri]);
this._router.navigate(['/', AppRoutes.research.uri]);
});
}
......
......@@ -6,7 +6,7 @@
<p class="pages-group-title" i18n="@@sitemap.mainPages">Main pages</p>
<ul class="pages-list">
<li><a class="link-1" [routerLink]="['/', AppRoutes.home.uri]" i18n="@@sitemap.home">Home</a></li>
<li><a class="link-1" [routerLink]="['/', AppRoutes.datasets.uri]" i18n="@@sitemap.research">Research</a></li>
<li><a class="link-1" [routerLink]="['/', AppRoutes.research.uri]" i18n="@@sitemap.research">Research</a></li>
<li><a class="link-1" [routerLink]="['/', AppRoutes.partners.uri]" i18n="@@sitemap.partners">Partners</a></li>
<li><a class="link-1" [routerLink]="['/', AppRoutes.approach.uri]" i18n="@@sitemap.approach">Approach</a></li>
<li><a class="link-1" [routerLink]="['/', AppRoutes.documentation.uri]">Documentation</a></li>
......
......@@ -182,6 +182,13 @@ export const AppRoutes = {
en: 'Drafts',
},
},
research: {
uri: 'recherche',
title: {
fr: 'Recherche',
en: 'Research',
},
},
datasets: {
uri: 'jeux-de-donnees',
title: {
......
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