Skip to content
Snippets Groups Projects
Commit 461eacff authored by Kristof De Langhe's avatar Kristof De Langhe
Browse files

62264: Group messages

parent 2166e063
No related branches found
No related tags found
No related merge requests found
......@@ -302,6 +302,12 @@
},
"listelement": {
"badge": "Person"
},
"search": {
"title": "DSpace Angular :: Person Search",
"results": {
"head": "Person Search Results"
}
}
},
"project": {
......@@ -342,6 +348,12 @@
},
"listelement": {
"badge": "Journal"
},
"search": {
"title": "DSpace Angular :: Journal Search",
"results": {
"head": "Journal Search Results"
}
}
},
"journalvolume": {
......@@ -378,6 +390,12 @@
},
"listelement": {
"badge": "Publication"
},
"search": {
"title": "DSpace Angular :: Publication Search",
"results": {
"head": "Publication Search Results"
}
}
},
"nav": {
......@@ -429,24 +447,6 @@
}
},
"search": {
"journal": {
"title": "DSpace Angular :: Journal Search",
"results": {
"head": "Journal Search Results"
}
},
"person": {
"title": "DSpace Angular :: Person Search",
"results": {
"head": "Person Search Results"
}
},
"publication": {
"title": "DSpace Angular :: Publication Search",
"results": {
"head": "Publication Search Results"
}
},
"title": "DSpace Angular :: Search",
"description": "",
"form": {
......
......@@ -4,10 +4,8 @@ import { Observable } from 'rxjs';
@Injectable()
/**
* Assemble the correct i18n key for the filtered search page's title depending on the current route's filter parameter
* and title data.
* The format of the key will be "{title}{filter}.title" with:
* - title: The prefix of the key stored in route.data
* Assemble the correct i18n key for the filtered search page's title depending on the current route's filter parameter.
* The format of the key will be "{filter}.search.title" with:
* - filter: The current filter stored in route.params
*/
export class FilteredSearchPageGuard implements CanActivate {
......@@ -16,7 +14,7 @@ export class FilteredSearchPageGuard implements CanActivate {
state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean {
const filter = route.params.filter;
const newTitle = route.data.title + filter + '.title';
const newTitle = filter + '.search.title';
route.data = { title: newTitle };
return true;
......
......@@ -9,7 +9,7 @@ import { FilteredSearchPageGuard } from './filtered-search-page.guard';
imports: [
RouterModule.forChild([
{ path: '', component: SearchPageComponent, data: { title: 'search.title' } },
{ path: ':filter', component: FilteredSearchPageComponent, canActivate: [FilteredSearchPageGuard], data: { title: 'search.' }}
{ path: ':filter', component: FilteredSearchPageComponent, canActivate: [FilteredSearchPageGuard]}
])
]
})
......
......@@ -60,7 +60,7 @@ export class SearchResultsComponent {
*/
getTitleKey() {
if (isNotEmpty(this.fixedFilter)) {
return 'search.' + this.fixedFilter + '.results.head'
return this.fixedFilter + '.search.results.head'
} else {
return 'search.results.head';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment