mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
62264: Group messages
This commit is contained in:
@@ -302,6 +302,12 @@
|
|||||||
},
|
},
|
||||||
"listelement": {
|
"listelement": {
|
||||||
"badge": "Person"
|
"badge": "Person"
|
||||||
|
},
|
||||||
|
"search": {
|
||||||
|
"title": "DSpace Angular :: Person Search",
|
||||||
|
"results": {
|
||||||
|
"head": "Person Search Results"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"project": {
|
"project": {
|
||||||
@@ -342,6 +348,12 @@
|
|||||||
},
|
},
|
||||||
"listelement": {
|
"listelement": {
|
||||||
"badge": "Journal"
|
"badge": "Journal"
|
||||||
|
},
|
||||||
|
"search": {
|
||||||
|
"title": "DSpace Angular :: Journal Search",
|
||||||
|
"results": {
|
||||||
|
"head": "Journal Search Results"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"journalvolume": {
|
"journalvolume": {
|
||||||
@@ -378,6 +390,12 @@
|
|||||||
},
|
},
|
||||||
"listelement": {
|
"listelement": {
|
||||||
"badge": "Publication"
|
"badge": "Publication"
|
||||||
|
},
|
||||||
|
"search": {
|
||||||
|
"title": "DSpace Angular :: Publication Search",
|
||||||
|
"results": {
|
||||||
|
"head": "Publication Search Results"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nav": {
|
"nav": {
|
||||||
@@ -429,24 +447,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"search": {
|
"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",
|
"title": "DSpace Angular :: Search",
|
||||||
"description": "",
|
"description": "",
|
||||||
"form": {
|
"form": {
|
||||||
|
@@ -4,10 +4,8 @@ import { Observable } from 'rxjs';
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
/**
|
/**
|
||||||
* Assemble the correct i18n key for the filtered search page's title depending on the current route's filter parameter
|
* 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 "{filter}.search.title" with:
|
||||||
* The format of the key will be "{title}{filter}.title" with:
|
|
||||||
* - title: The prefix of the key stored in route.data
|
|
||||||
* - filter: The current filter stored in route.params
|
* - filter: The current filter stored in route.params
|
||||||
*/
|
*/
|
||||||
export class FilteredSearchPageGuard implements CanActivate {
|
export class FilteredSearchPageGuard implements CanActivate {
|
||||||
@@ -16,7 +14,7 @@ export class FilteredSearchPageGuard implements CanActivate {
|
|||||||
state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean {
|
state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean {
|
||||||
const filter = route.params.filter;
|
const filter = route.params.filter;
|
||||||
|
|
||||||
const newTitle = route.data.title + filter + '.title';
|
const newTitle = filter + '.search.title';
|
||||||
|
|
||||||
route.data = { title: newTitle };
|
route.data = { title: newTitle };
|
||||||
return true;
|
return true;
|
||||||
|
@@ -9,7 +9,7 @@ import { FilteredSearchPageGuard } from './filtered-search-page.guard';
|
|||||||
imports: [
|
imports: [
|
||||||
RouterModule.forChild([
|
RouterModule.forChild([
|
||||||
{ path: '', component: SearchPageComponent, data: { title: 'search.title' } },
|
{ 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() {
|
getTitleKey() {
|
||||||
if (isNotEmpty(this.fixedFilter)) {
|
if (isNotEmpty(this.fixedFilter)) {
|
||||||
return 'search.' + this.fixedFilter + '.results.head'
|
return this.fixedFilter + '.search.results.head'
|
||||||
} else {
|
} else {
|
||||||
return 'search.results.head';
|
return 'search.results.head';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user